Merge pull request #314421 from pbsds/fix-nixpkgs-lint-1716591469

nixpkgs-lint: patch nix-shell shebang
This commit is contained in:
Peder Bergebakken Sundt 2024-05-30 22:11:20 +02:00 committed by GitHub
commit 0f8c6bed7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,18 +1,22 @@
{ stdenv, lib, makeWrapper, perl, perlPackages }:
stdenv.mkDerivation {
name = "nixpkgs-lint-1";
pname = "nixpkgs-lint";
version = "1";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perl perlPackages.XMLSimple ];
dontUnpack = true;
buildPhase = "true";
dontBuild = true;
installPhase =
''
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
'';