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.
This commit is contained in:
Vladimír Čunát 2021-07-05 18:27:05 +02:00
parent 061caa4e01
commit faaa3bc131
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
2 changed files with 13 additions and 2 deletions

View File

@ -12,7 +12,8 @@ stdenv.mkDerivation rec {
sha256 = "07cq7q71bv3fwddkp2863ylry2ivds00f8sjy8npjpdbkailxm21";
};
patchPhase = "patchShebangs test";
patches = [ ./tests-use-better-shell.patch ];
postPatch = "patchShebangs test";
doCheck = true;
checkTarget = "test";
@ -31,7 +32,7 @@ stdenv.mkDerivation rec {
'';
meta = with lib; {
homepage = "http://megastep.org/makeself";
homepage = "https://makeself.io";
description = "Utility to create self-extracting packages";
license = licenses.gpl2;
maintainers = [ maintainers.wmertens ];

View File

@ -0,0 +1,10 @@
Use full bash's sh in tests instead of /bin/sh, as that would be
too minimalist in the build sandbox. See issue:
https://github.com/NixOS/nixpkgs/issues/110149#issuecomment-874258128
diff --git a/test/extracttest b/test/extracttest
--- a/test/extracttest
+++ b/test/extracttest
@@ -9,2 +9,3 @@ setupTests() {
$SUT $* archive makeself-test.run "Test $*" echo Testing
+ sed "1s|/bin|$(dirname "$SHELL")|" -i ./makeself-test.run
}