diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-02-25 00:13:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-25 00:13:49 +0000 |
commit | 257171f024023815158819b0cb35b5958f1b4975 (patch) | |
tree | 91f9a728162c7e67be0ebf5602148377f1841da1 /pkgs/test | |
parent | 57bbe4245f80b90b4b48079750f91bdc0437c66e (diff) | |
parent | 7794d8a78570335f10b0f97ae72b14b33c6addc2 (diff) |
Merge master into haskell-updates
Diffstat (limited to 'pkgs/test')
-rw-r--r-- | pkgs/test/stdenv/patch-shebangs.nix | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/pkgs/test/stdenv/patch-shebangs.nix b/pkgs/test/stdenv/patch-shebangs.nix index 888d4a53a2733..db9ca2fcaafef 100644 --- a/pkgs/test/stdenv/patch-shebangs.nix +++ b/pkgs/test/stdenv/patch-shebangs.nix @@ -72,11 +72,26 @@ let }; }; + without-trailing-newline = stdenv.mkDerivation { + name = "without-trailing-newline"; + strictDeps = false; + dontUnpack = true; + installPhase = '' + mkdir -p $out/bin + printf "#!/bin/bash" > $out/bin/test + chmod +x $out/bin/test + dontPatchShebangs= + ''; + passthru = { + assertion = "grep '^#!${stdenv.shell}' $out/bin/test > /dev/null"; + }; + }; + }; in stdenv.mkDerivation { name = "test-patch-shebangs"; - passthru = { inherit (tests) bad-shebang ignores-nix-store updates-nix-store split-string; }; + passthru = { inherit (tests) bad-shebang ignores-nix-store updates-nix-store split-string without-trailing-newline; }; buildCommand = '' validate() { local name=$1 |