mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
nixpkgs-lint: modernize
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
This commit is contained in:
@@ -10,6 +10,9 @@ stdenv.mkDerivation {
|
||||
pname = "nixpkgs-lint";
|
||||
version = "1";
|
||||
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [
|
||||
perl
|
||||
@@ -20,16 +23,20 @@ stdenv.mkDerivation {
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp ${./nixpkgs-lint.pl} $out/bin/nixpkgs-lint
|
||||
# make the built version hermetic
|
||||
substituteInPlace $out/bin/nixpkgs-lint \
|
||||
--replace-fail "#! /usr/bin/env nix-shell" "#! ${lib.getExe perl}"
|
||||
wrapProgram $out/bin/nixpkgs-lint --set PERL5LIB $PERL5LIB
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A utility for Nixpkgs contributors to check Nixpkgs for common errors";
|
||||
description = "Utility for Nixpkgs contributors to check Nixpkgs for common errors";
|
||||
mainProgram = "nixpkgs-lint";
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user