at master 813 B view raw
1{ 2 stdenv, 3 lib, 4 makeWrapper, 5 perl, 6 perlPackages, 7}: 8 9stdenv.mkDerivation { 10 pname = "nixpkgs-lint"; 11 version = "1"; 12 13 nativeBuildInputs = [ makeWrapper ]; 14 buildInputs = [ 15 perl 16 perlPackages.XMLSimple 17 ]; 18 19 dontUnpack = true; 20 dontBuild = true; 21 22 installPhase = '' 23 mkdir -p $out/bin 24 cp ${./nixpkgs-lint.pl} $out/bin/nixpkgs-lint 25 # make the built version hermetic 26 substituteInPlace $out/bin/nixpkgs-lint \ 27 --replace-fail "#! /usr/bin/env nix-shell" "#! ${lib.getExe perl}" 28 wrapProgram $out/bin/nixpkgs-lint --set PERL5LIB $PERL5LIB 29 ''; 30 31 meta = { 32 maintainers = [ lib.maintainers.eelco ]; 33 description = "A utility for Nixpkgs contributors to check Nixpkgs for common errors"; 34 mainProgram = "nixpkgs-lint"; 35 platforms = lib.platforms.unix; 36 }; 37}