summary refs log tree commit diff
path: root/pkgs/tools/compression
diff options
context:
space:
mode:
authorRyan Burns <rtburns@protonmail.com>2021-06-20 18:10:23 -0700
committerRyan Burns <rtburns@protonmail.com>2021-06-20 18:10:23 -0700
commite5f563ef0391bf7be52025ea79b35cde139fff09 (patch)
treee3862d45ec21291f2cdee183433fdf9b0a50ed69 /pkgs/tools/compression
parentd90080e1f6282b3b7b5ed9ff0a5cd6f950655ba5 (diff)
downloadnixpkgs-e5f563ef0391bf7be52025ea79b35cde139fff09.tar
nixpkgs-e5f563ef0391bf7be52025ea79b35cde139fff09.tar.gz
nixpkgs-e5f563ef0391bf7be52025ea79b35cde139fff09.tar.bz2
nixpkgs-e5f563ef0391bf7be52025ea79b35cde139fff09.tar.lz
nixpkgs-e5f563ef0391bf7be52025ea79b35cde139fff09.tar.xz
nixpkgs-e5f563ef0391bf7be52025ea79b35cde139fff09.tar.zst
nixpkgs-e5f563ef0391bf7be52025ea79b35cde139fff09.zip
zstd: fix darwin patch
Since v1.4.9, another stat command has been added to playTests.sh.
Similar to other uses in this file, it attempts to use BSD syntax on
Darwin/BSD, and must be patched to unconditionally use GNU syntax.
Diffstat (limited to 'pkgs/tools/compression')
-rw-r--r--pkgs/tools/compression/zstd/playtests-darwin.patch15
1 files changed, 10 insertions, 5 deletions
diff --git a/pkgs/tools/compression/zstd/playtests-darwin.patch b/pkgs/tools/compression/zstd/playtests-darwin.patch
index f829c93c705..bcb895a697c 100644
--- a/pkgs/tools/compression/zstd/playtests-darwin.patch
+++ b/pkgs/tools/compression/zstd/playtests-darwin.patch
@@ -1,6 +1,6 @@
 --- a/tests/playTests.sh
 +++ b/tests/playTests.sh
-@@ -112,17 +112,10 @@ case "$OS" in
+@@ -112,22 +112,12 @@ case "$OS" in
  esac
  
  case "$UNAME" in
@@ -16,13 +16,18 @@
 -    Darwin | FreeBSD | OpenBSD | NetBSD) MTIME="stat -f %m" ;;
 -esac
  
- DIFF="diff"
- case "$UNAME" in
-@@ -842,7 +835,6 @@ $MD5SUM dirTestDict/* > tmph1
+ GET_PERMS="stat -c %a"
+-case "$UNAME" in
+-    Darwin | FreeBSD | OpenBSD | NetBSD) GET_PERMS="stat -f %Lp" ;;
+-esac
+ 
+ assertFilePermissions() {
+     STAT1=$($GET_PERMS "$1")
+@@ -967,7 +957,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
 -  Darwin) println "md5sum -c not supported on OS-X : test skipped" ;;  # not compatible with OS-X's md5
    *) $MD5SUM -c tmph1 ;;
  esac
- rm -rf dirTestDict
\ No newline at end of file
+ rm -rf dirTestDict