From 1f03581c0cf5bff9da82b9e20c900da069b50480 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Wed, 6 Sep 2023 21:59:30 -0400 Subject: [PATCH] netcdf: fix tests on Linux `nczarr_test/Makefile.am` prepends new shebang lines to the start of some tests when they are built, which breaks tests on Linux because `/bin/bash` does not exist. --- pkgs/development/libraries/netcdf/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/netcdf/default.nix b/pkgs/development/libraries/netcdf/default.nix index 4f44bff5352d..8fde7050b97a 100644 --- a/pkgs/development/libraries/netcdf/default.nix +++ b/pkgs/development/libraries/netcdf/default.nix @@ -30,6 +30,10 @@ in stdenv.mkDerivation rec { for a in ncdap_test/Makefile.am ncdap_test/Makefile.in; do substituteInPlace $a --replace testurl.sh " " done + + # Prevent building the tests from prepending `#!/bin/bash` and wiping out the patched shenbangs. + substituteInPlace nczarr_test/Makefile.in \ + --replace '#!/bin/bash' '${stdenv.shell}' ''; nativeBuildInputs = [ m4 removeReferencesTo ];