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.
wip/yesman
Orivej Desh 4 years ago committed by GitHub
parent cb2686adc3
commit 6817991464
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      pkgs/tools/compression/zstd/default.nix
  2. 18
      pkgs/tools/compression/zstd/playtests-darwin.patch

@ -6,26 +6,26 @@
stdenv.mkDerivation rec {
pname = "zstd";
version = "1.4.4";
version = "1.4.5";
src = fetchFromGitHub {
sha256 = "0zn7r8d4m8w2lblnjalqpz18na0spzkdiw3fwq2fzb7drhb32v54";
rev = "v${version}";
repo = "zstd";
owner = "facebook";
repo = "zstd";
rev = "v${version}";
sha256 = "0ay3qlk4sffnmcl3b34q4zd7mkcmjds023icmib1mdli97qcp38l";
};
nativeBuildInputs = [ cmake ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
patches = [
# From https://github.com/facebook/zstd/pull/1883
./playtests-darwin.patch
(fetchpatch {
url = "https://github.com/facebook/zstd/commit/106278e7e5fafaea3b7deb4147bdc8071562d2f0.diff";
sha256 = "13z7id1qbc05cv1rmak7c8xrchp7jh1i623bq5pwcihg57wzcyr8";
url = "https://github.com/facebook/zstd/pull/2163.patch";
sha256 = "07mfjc5f9wy0w2xlj36hyf7g5ax9r2rf6ixhkffhnwc6rwy0q54p";
})
] # 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;
cmakeFlags = [
@ -41,12 +41,13 @@ stdenv.mkDerivation rec {
checkInputs = [ file ];
doCheck = true;
preCheck = ''
substituteInPlace ../tests/playTests.sh \
--replace 'MD5SUM="md5 -r"' 'MD5SUM="md5sum"'
checkPhase = ''
runHook preCheck
ctest -R playTests # The only relatively fast test.
runHook postCheck
'';
preInstall = stdenv.lib.optionalString enableShared ''
preInstall = ''
substituteInPlace ../programs/zstdgrep \
--replace ":-grep" ":-${gnugrep}/bin/grep" \
--replace ":-zstdcat" ":-$out/bin/zstdcat"

@ -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…
Cancel
Save