diff options
author | Ben Wolsieffer <benwolsieffer@gmail.com> | 2020-08-13 15:58:41 -0400 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2020-08-15 08:32:57 +0200 |
commit | 6093f9eb6e2b81d1c50fd7d2597599a5fb568310 (patch) | |
tree | aa17ae441a979089354170b7b90526afed290285 /pkgs/tools/compression/zstd | |
parent | 51f2d47897e735c1406f65b4be39c6edd02739ce (diff) | |
download | nixlib-6093f9eb6e2b81d1c50fd7d2597599a5fb568310.tar nixlib-6093f9eb6e2b81d1c50fd7d2597599a5fb568310.tar.gz nixlib-6093f9eb6e2b81d1c50fd7d2597599a5fb568310.tar.bz2 nixlib-6093f9eb6e2b81d1c50fd7d2597599a5fb568310.tar.lz nixlib-6093f9eb6e2b81d1c50fd7d2597599a5fb568310.tar.xz nixlib-6093f9eb6e2b81d1c50fd7d2597599a5fb568310.tar.zst nixlib-6093f9eb6e2b81d1c50fd7d2597599a5fb568310.zip |
zstd: fix shebangs when cross-compiling
Diffstat (limited to 'pkgs/tools/compression/zstd')
-rw-r--r-- | pkgs/tools/compression/zstd/default.nix | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pkgs/tools/compression/zstd/default.nix b/pkgs/tools/compression/zstd/default.nix index 9c9f91f9c19f..8ce434741a55 100644 --- a/pkgs/tools/compression/zstd/default.nix +++ b/pkgs/tools/compression/zstd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fetchpatch, cmake, gnugrep +{ stdenv, fetchFromGitHub, fetchpatch, cmake, bash, gnugrep , fixDarwinDylibNames , file , legacySupport ? false @@ -18,6 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ bash ]; patches = [ ./playtests-darwin.patch @@ -29,11 +30,7 @@ stdenv.mkDerivation rec { # work fine, and I'm not sure how to write the condition. ++ stdenv.lib.optional stdenv.hostPlatform.isWindows ./mcfgthreads-no-pthread.patch; - postPatch = - # Patch shebangs for playTests - '' - patchShebangs programs/zstdgrep - '' + stdenv.lib.optionalString (!static) '' + postPatch = stdenv.lib.optionalString (!static) '' substituteInPlace build/cmake/CMakeLists.txt \ --replace 'message(SEND_ERROR "You need to build static library to build tests")' "" substituteInPlace build/cmake/tests/CMakeLists.txt \ @@ -60,6 +57,8 @@ stdenv.mkDerivation rec { doCheck = true; checkPhase = '' runHook preCheck + # Patch shebangs for playTests + patchShebangs ../programs/zstdgrep ctest -R playTests # The only relatively fast test. runHook postCheck ''; |