zstd: 1.4.4 -> 1.4.5 (#88609)
The previous CMake version did not run any tests, the current version tries to run all tests (I could not await their completion), and the last GNU Make version ran `make -C tests shortest` which ran only playTests.sh, so I've enabled only the playTests test.
This commit is contained in:
parent
cb2686adc3
commit
6817991464
@ -6,26 +6,26 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "zstd";
|
pname = "zstd";
|
||||||
version = "1.4.4";
|
version = "1.4.5";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
sha256 = "0zn7r8d4m8w2lblnjalqpz18na0spzkdiw3fwq2fzb7drhb32v54";
|
|
||||||
rev = "v${version}";
|
|
||||||
repo = "zstd";
|
|
||||||
owner = "facebook";
|
owner = "facebook";
|
||||||
|
repo = "zstd";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0ay3qlk4sffnmcl3b34q4zd7mkcmjds023icmib1mdli97qcp38l";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ]
|
nativeBuildInputs = [ cmake ]
|
||||||
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# From https://github.com/facebook/zstd/pull/1883
|
./playtests-darwin.patch
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
url = "https://github.com/facebook/zstd/commit/106278e7e5fafaea3b7deb4147bdc8071562d2f0.diff";
|
url = "https://github.com/facebook/zstd/pull/2163.patch";
|
||||||
sha256 = "13z7id1qbc05cv1rmak7c8xrchp7jh1i623bq5pwcihg57wzcyr8";
|
sha256 = "07mfjc5f9wy0w2xlj36hyf7g5ax9r2rf6ixhkffhnwc6rwy0q54p";
|
||||||
})
|
})
|
||||||
] # This I didn't upstream because if you use posix threads with MinGW it will
|
] # This I didn't upstream because if you use posix threads with MinGW it will
|
||||||
# work find, 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;
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
@ -41,12 +41,13 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
checkInputs = [ file ];
|
checkInputs = [ file ];
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
preCheck = ''
|
checkPhase = ''
|
||||||
substituteInPlace ../tests/playTests.sh \
|
runHook preCheck
|
||||||
--replace 'MD5SUM="md5 -r"' 'MD5SUM="md5sum"'
|
ctest -R playTests # The only relatively fast test.
|
||||||
|
runHook postCheck
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preInstall = stdenv.lib.optionalString enableShared ''
|
preInstall = ''
|
||||||
substituteInPlace ../programs/zstdgrep \
|
substituteInPlace ../programs/zstdgrep \
|
||||||
--replace ":-grep" ":-${gnugrep}/bin/grep" \
|
--replace ":-grep" ":-${gnugrep}/bin/grep" \
|
||||||
--replace ":-zstdcat" ":-$out/bin/zstdcat"
|
--replace ":-zstdcat" ":-$out/bin/zstdcat"
|
||||||
|
18
pkgs/tools/compression/zstd/playtests-darwin.patch
Normal file
18
pkgs/tools/compression/zstd/playtests-darwin.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
--- a/tests/playTests.sh
|
||||||
|
+++ b/tests/playTests.sh
|
||||||
|
@@ -109,5 +109,2 @@ esac
|
||||||
|
case "$UNAME" in
|
||||||
|
- Darwin) MD5SUM="md5 -r" ;;
|
||||||
|
- FreeBSD) MD5SUM="gmd5sum" ;;
|
||||||
|
- OpenBSD) MD5SUM="md5" ;;
|
||||||
|
*) MD5SUM="md5sum" ;;
|
||||||
|
@@ -116,5 +113,2 @@ esac
|
||||||
|
MTIME="stat -c %Y"
|
||||||
|
-case "$UNAME" in
|
||||||
|
- Darwin | FreeBSD | OpenBSD) MTIME="stat -f %m" ;;
|
||||||
|
-esac
|
||||||
|
|
||||||
|
@@ -752,3 +746,2 @@ zstd -d --rm dirTestDict/*.zst -D tmpDictC # note : use internal checksum by de
|
||||||
|
case "$UNAME" in
|
||||||
|
- Darwin) println "md5sum -c not supported on OS-X : test skipped" ;; # not compatible with OS-X's md5
|
||||||
|
*) $MD5SUM -c tmph1 ;;
|
Loading…
x
Reference in New Issue
Block a user