zstd: fix shebangs when cross-compiling
This commit is contained in:
parent
51f2d47897
commit
6093f9eb6e
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchFromGitHub, fetchpatch, cmake, gnugrep
|
{ stdenv, fetchFromGitHub, fetchpatch, cmake, bash, gnugrep
|
||||||
, fixDarwinDylibNames
|
, fixDarwinDylibNames
|
||||||
, file
|
, file
|
||||||
, legacySupport ? false
|
, legacySupport ? false
|
||||||
@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ cmake ]
|
nativeBuildInputs = [ cmake ]
|
||||||
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||||
|
buildInputs = [ bash ];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./playtests-darwin.patch
|
./playtests-darwin.patch
|
||||||
@ -29,11 +30,7 @@ stdenv.mkDerivation rec {
|
|||||||
# work fine, and I'm not sure how to write the condition.
|
# work fine, and I'm not sure how to write the condition.
|
||||||
++ stdenv.lib.optional stdenv.hostPlatform.isWindows ./mcfgthreads-no-pthread.patch;
|
++ stdenv.lib.optional stdenv.hostPlatform.isWindows ./mcfgthreads-no-pthread.patch;
|
||||||
|
|
||||||
postPatch =
|
postPatch = stdenv.lib.optionalString (!static) ''
|
||||||
# Patch shebangs for playTests
|
|
||||||
''
|
|
||||||
patchShebangs programs/zstdgrep
|
|
||||||
'' + stdenv.lib.optionalString (!static) ''
|
|
||||||
substituteInPlace build/cmake/CMakeLists.txt \
|
substituteInPlace build/cmake/CMakeLists.txt \
|
||||||
--replace 'message(SEND_ERROR "You need to build static library to build tests")' ""
|
--replace 'message(SEND_ERROR "You need to build static library to build tests")' ""
|
||||||
substituteInPlace build/cmake/tests/CMakeLists.txt \
|
substituteInPlace build/cmake/tests/CMakeLists.txt \
|
||||||
@ -60,6 +57,8 @@ stdenv.mkDerivation rec {
|
|||||||
doCheck = true;
|
doCheck = true;
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
runHook preCheck
|
runHook preCheck
|
||||||
|
# Patch shebangs for playTests
|
||||||
|
patchShebangs ../programs/zstdgrep
|
||||||
ctest -R playTests # The only relatively fast test.
|
ctest -R playTests # The only relatively fast test.
|
||||||
runHook postCheck
|
runHook postCheck
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user