From 759d7fae615ffd14abe9208441c68a6b036a8f5b Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 20 Feb 2025 07:06:23 +0000 Subject: [PATCH] zstd: 1.5.6 -> 1.5.7 Changes: https://github.com/facebook/zstd/releases/tag/v1.5.7 --- pkgs/tools/compression/zstd/default.nix | 14 ++++++++++++-- pkgs/tools/compression/zstd/playtests-darwin.patch | 9 +++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/compression/zstd/default.nix b/pkgs/tools/compression/zstd/default.nix index 27f66232b7ad..f419e8441ec7 100644 --- a/pkgs/tools/compression/zstd/default.nix +++ b/pkgs/tools/compression/zstd/default.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, cmake, bash, gnugrep, @@ -27,13 +28,13 @@ stdenv.mkDerivation rec { pname = "zstd"; - version = "1.5.6"; + version = "1.5.7"; src = fetchFromGitHub { owner = "facebook"; repo = "zstd"; rev = "v${version}"; - hash = "sha256-qcd92hQqVBjMT3hyntjcgk29o9wGQsg5Hg7HE5C0UNc="; + hash = "sha256-tNFWIT9ydfozB8dWcmTMuZLCQmQudTFJIkSr0aG7S44="; }; nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; @@ -43,6 +44,15 @@ stdenv.mkDerivation rec { # This patches makes sure we do not attempt to use the MD5 implementation # of the host platform when running the tests ./playtests-darwin.patch + + # Pull missing manpages update: + # https://github.com/facebook/zstd/pull/4302 + # TODO: remove with 1.5.8 release + (fetchpatch { + name = "man-fix.patch"; + url = "https://github.com/facebook/zstd/commit/6af3842118ea5325480b403213b2a9fbed3d3d74.patch"; + hash = "sha256-i+iv+owUXbKU3UtZBsjfj86kFB3TDlpcVDNsDX8dyZE="; + }) ]; postPatch = lib.optionalString (!static) '' diff --git a/pkgs/tools/compression/zstd/playtests-darwin.patch b/pkgs/tools/compression/zstd/playtests-darwin.patch index 454489a24a12..83bde5cb19f2 100644 --- a/pkgs/tools/compression/zstd/playtests-darwin.patch +++ b/pkgs/tools/compression/zstd/playtests-darwin.patch @@ -1,11 +1,10 @@ --- a/tests/playTests.sh +++ b/tests/playTests.sh -@@ -112,29 +112,19 @@ case "$OS" in +@@ -119,16 +119,10 @@ case "$OS" in esac case "$UNAME" in - Darwin) MD5SUM="md5 -r" ;; -- FreeBSD) MD5SUM="gmd5sum" ;; - NetBSD) MD5SUM="md5 -n" ;; - OpenBSD) MD5SUM="md5" ;; *) MD5SUM="md5sum" ;; @@ -18,9 +17,7 @@ assertSameMTime() { MT1=$($MTIME "$1") - MT2=$($MTIME "$2") - echo MTIME $MT1 $MT2 - [ "$MT1" = "$MT2" ] || die "mtime on $1 doesn't match mtime on $2 ($MT1 != $MT2)" +@@ -138,9 +132,6 @@ assertSameMTime() { } GET_PERMS="stat -c %a" @@ -30,7 +27,7 @@ assertFilePermissions() { STAT1=$($GET_PERMS "$1") -@@ -967,7 +957,6 @@ $MD5SUM dirTestDict/* > tmph1 +@@ -1155,7 +1146,6 @@ $MD5SUM dirTestDict/* > tmph1 zstd -f --rm dirTestDict/* -D tmpDictC zstd -d --rm dirTestDict/*.zst -D tmpDictC # note : use internal checksum by default case "$UNAME" in