makeself: try to finally solve issues with tests

Hopefully fixes #110149. I'm really annoyed with this on 21.05 now:
https://hydra.nixos.org/build/147005675#tabs-buildsteps
and this isn't the first time it's caused significant issues.

+13 -2
+3 -2
pkgs/applications/misc/makeself/default.nix
··· 12 sha256 = "07cq7q71bv3fwddkp2863ylry2ivds00f8sjy8npjpdbkailxm21"; 13 }; 14 15 - patchPhase = "patchShebangs test"; 16 17 doCheck = true; 18 checkTarget = "test"; ··· 31 ''; 32 33 meta = with lib; { 34 - homepage = "http://megastep.org/makeself"; 35 description = "Utility to create self-extracting packages"; 36 license = licenses.gpl2; 37 maintainers = [ maintainers.wmertens ];
··· 12 sha256 = "07cq7q71bv3fwddkp2863ylry2ivds00f8sjy8npjpdbkailxm21"; 13 }; 14 15 + patches = [ ./tests-use-better-shell.patch ]; 16 + postPatch = "patchShebangs test"; 17 18 doCheck = true; 19 checkTarget = "test"; ··· 32 ''; 33 34 meta = with lib; { 35 + homepage = "https://makeself.io"; 36 description = "Utility to create self-extracting packages"; 37 license = licenses.gpl2; 38 maintainers = [ maintainers.wmertens ];
+10
pkgs/applications/misc/makeself/tests-use-better-shell.patch
···
··· 1 + Use full bash's sh in tests instead of /bin/sh, as that would be 2 + too minimalist in the build sandbox. See issue: 3 + https://github.com/NixOS/nixpkgs/issues/110149#issuecomment-874258128 4 + diff --git a/test/extracttest b/test/extracttest 5 + --- a/test/extracttest 6 + +++ b/test/extracttest 7 + @@ -9,2 +9,3 @@ setupTests() { 8 + $SUT $* archive makeself-test.run "Test $*" echo Testing 9 + + sed "1s|/bin|$(dirname "$SHELL")|" -i ./makeself-test.run 10 + }