2021-01-17 21:14:59 +01:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
makeWrapper,
|
|
|
|
perl,
|
|
|
|
perlPackages,
|
|
|
|
}:
|
2013-07-25 23:50:14 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2024-05-25 01:03:30 +02:00
|
|
|
pname = "nixpkgs-lint";
|
|
|
|
version = "1";
|
2013-07-25 23:50:14 +02:00
|
|
|
|
2021-02-07 16:17:39 +07:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [
|
|
|
|
perl
|
|
|
|
perlPackages.XMLSimple
|
|
|
|
];
|
2013-07-25 23:50:14 +02:00
|
|
|
|
2019-06-19 11:45:34 -04:00
|
|
|
dontUnpack = true;
|
2024-05-25 01:03:30 +02:00
|
|
|
dontBuild = true;
|
2013-07-25 23:50:14 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ${./nixpkgs-lint.pl} $out/bin/nixpkgs-lint
|
2024-05-25 01:00:03 +02:00
|
|
|
# make the built version hermetic
|
|
|
|
substituteInPlace $out/bin/nixpkgs-lint \
|
|
|
|
--replace-fail "#! /usr/bin/env nix-shell" "#! ${lib.getExe perl}"
|
2013-07-25 23:50:14 +02:00
|
|
|
wrapProgram $out/bin/nixpkgs-lint --set PERL5LIB $PERL5LIB
|
|
|
|
'';
|
|
|
|
|
2025-01-07 14:27:16 -03:00
|
|
|
meta = {
|
|
|
|
maintainers = [ lib.maintainers.eelco ];
|
2013-07-25 23:50:14 +02:00
|
|
|
description = "A utility for Nixpkgs contributors to check Nixpkgs for common errors";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "nixpkgs-lint";
|
2025-01-07 14:27:16 -03:00
|
|
|
platforms = lib.platforms.unix;
|
2013-07-25 23:50:14 +02:00
|
|
|
};
|
|
|
|
}
|