zstd: 1.5.0 -> 1.5.1 (#153103)

While at it added trivial updater plumbing.
This commit is contained in:
Sergei Trofimovich 2022-01-02 22:25:18 +00:00 committed by GitHub
parent e8effac006
commit 088277aafb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 9 deletions

View file

@ -7,17 +7,18 @@
# these need to be ran on the host, thus disable when cross-compiling
, buildContrib ? stdenv.hostPlatform == stdenv.buildPlatform
, doCheck ? stdenv.hostPlatform == stdenv.buildPlatform
, nix-update-script
}:
stdenv.mkDerivation rec {
pname = "zstd";
version = "1.5.0";
version = "1.5.1";
src = fetchFromGitHub {
owner = "facebook";
repo = "zstd";
rev = "v${version}";
sha256 = "0icc0x89c35rq5bxd4d241vqxnz2i1qj2wwy01xls63p0z93brj7";
sha256 = "sha256-D9+kuIjPYnmg5ht/ezIeYCpyiLkrtdiH3fwpmemIPGM=";
};
nativeBuildInputs = [ cmake ]
@ -28,12 +29,6 @@ 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
# Fixes linking for static builds
(fetchpatch {
url = "https://github.com/facebook/zstd/pull/2724/commits/e1f85dbca3a0ed5ef06c8396912a0914db8dea6a.patch";
sha256 = "sha256-PuYAqnJWAE+L9bsroOnnBGJhERW8LHrGSLtIEkKU9vg=";
})
];
postPatch = lib.optionalString (!static) ''
@ -90,6 +85,12 @@ stdenv.mkDerivation rec {
++ lib.optional stdenv.hostPlatform.isUnix "man"
++ [ "out" ];
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
meta = with lib; {
description = "Zstandard real-time compression algorithm";
longDescription = ''

View file

@ -1,6 +1,6 @@
--- a/tests/playTests.sh
+++ b/tests/playTests.sh
@@ -112,22 +112,12 @@ case "$OS" in
@@ -112,29 +112,19 @@ case "$OS" in
esac
case "$UNAME" in
@ -16,6 +16,13 @@
- Darwin | FreeBSD | OpenBSD | NetBSD) MTIME="stat -f %m" ;;
-esac
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)"
}
GET_PERMS="stat -c %a"
-case "$UNAME" in
- Darwin | FreeBSD | OpenBSD | NetBSD) GET_PERMS="stat -f %Lp" ;;