summary refs log tree commit diff
path: root/pkgs/tools/compression
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/compression')
-rw-r--r--pkgs/tools/compression/advancecomp/default.nix4
-rw-r--r--pkgs/tools/compression/brotli/default.nix35
-rw-r--r--pkgs/tools/compression/bzip2/default.nix11
-rw-r--r--pkgs/tools/compression/mozlz4a/default.nix31
-rw-r--r--pkgs/tools/compression/upx/default.nix4
-rw-r--r--pkgs/tools/compression/zfp/default.nix2
-rw-r--r--pkgs/tools/compression/zstd/default.nix5
7 files changed, 48 insertions, 44 deletions
diff --git a/pkgs/tools/compression/advancecomp/default.nix b/pkgs/tools/compression/advancecomp/default.nix
index 32bae24a6c4..b57e3f6806f 100644
--- a/pkgs/tools/compression/advancecomp/default.nix
+++ b/pkgs/tools/compression/advancecomp/default.nix
@@ -6,13 +6,13 @@
 
 stdenv.mkDerivation rec {
   pname = "advancecomp";
-  version = "2.5";
+  version = "2.6";
 
   src = fetchFromGitHub {
     owner = "amadvance";
     repo = "advancecomp";
     rev = "v${version}";
-    hash = "sha256-dlVTMd8sm84M8JZsCfVR/s4jXMQWmrVj7xwUVDsehQY=";
+    hash = "sha256-MwXdXT/ZEvTcYV4DjhCUFflrPKBFu0fk5PmaWt4MMOU=";
   };
 
   nativeBuildInputs = [ autoreconfHook ];
diff --git a/pkgs/tools/compression/brotli/default.nix b/pkgs/tools/compression/brotli/default.nix
index 3d15cbd395c..263478e4ba3 100644
--- a/pkgs/tools/compression/brotli/default.nix
+++ b/pkgs/tools/compression/brotli/default.nix
@@ -1,8 +1,8 @@
 { lib
 , stdenv
 , fetchFromGitHub
-, cmake
 , fetchpatch
+, cmake
 , staticOnly ? stdenv.hostPlatform.isStatic
 , testers
 }:
@@ -11,23 +11,27 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "brotli";
-  version = "1.0.9";
+  version = "1.1.0";
 
   src = fetchFromGitHub {
     owner = "google";
     repo = "brotli";
     rev = "v${finalAttrs.version}";
-    sha256 = "z6Dhrabav1MDQ4rAcXaDv0aN+qOoh9cvoXZqEWBB13c=";
+    hash = "sha256-MvceRcle2dSkkucC2PlsCizsIf8iv95d8Xjqew266wc=";
   };
 
-  nativeBuildInputs = [ cmake ];
+  patches = [
+    # revert runpath change, breaks curl on darwin:
+    #   https://github.com/NixOS/nixpkgs/pull/254532#issuecomment-1722337476
+    (fetchpatch {
+      name = "revert-runpath.patch";
+      url = "https://github.com/google/brotli/commit/f842c1bcf9264431cd3b15429a72b7dafbe80509.patch";
+      hash = "sha256-W3LY3EjoHP74YsKOOcYQrzo+f0HbooOvEbnOibtN6TM=";
+      revert = true;
+    })
+  ];
 
-  patches = lib.optional staticOnly (fetchpatch {
-    # context from https://github.com/google/brotli/pull/655
-    # updated patch from https://github.com/google/brotli/pull/655
-    url = "https://github.com/google/brotli/commit/47a554804ceabb899ae924aaee54df806053d0d1.patch";
-    sha256 = "sOeXNVsCaBSD9i82GRUDrkyreGeQ7qaJWjjy/uLL0/0=";
-  });
+  nativeBuildInputs = [ cmake ];
 
   cmakeFlags = lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF";
 
@@ -37,17 +41,6 @@ stdenv.mkDerivation (finalAttrs: {
 
   checkTarget = "test";
 
-  # This breaks on Darwin because our cmake hook tries to make a build folder
-  # and the wonderful bazel BUILD file is already there (yay case-insensitivity?)
-  prePatch = ''
-    rm BUILD
-
-    # Upstream fixed this reference to runtime-path after the release
-    # and with this references g++ complains about invalid option -R
-    sed -i 's/ -R''${libdir}//' scripts/libbrotli*.pc.in
-    cat scripts/libbrotli*.pc.in
-  '';
-
   # Don't bother with "man" output for now,
   # it currently only makes the manpages hard to use.
   postInstall = ''
diff --git a/pkgs/tools/compression/bzip2/default.nix b/pkgs/tools/compression/bzip2/default.nix
index be456cf5944..bfab2dbb946 100644
--- a/pkgs/tools/compression/bzip2/default.nix
+++ b/pkgs/tools/compression/bzip2/default.nix
@@ -1,5 +1,6 @@
 { lib, stdenv, fetchurl
-, linkStatic ? with stdenv.hostPlatform; isStatic || isCygwin
+, enableStatic ? with stdenv.hostPlatform; isStatic || isCygwin
+, enableShared ? true
 , autoreconfHook
 , testers
 }:
@@ -47,8 +48,12 @@ in {
 
   outputs = [ "bin" "dev" "out" "man" ];
 
-  configureFlags =
-    lib.optionals linkStatic [ "--enable-static" "--disable-shared" ];
+  configureFlags = lib.concatLists [
+    (lib.optional enableStatic "--enable-static")
+    (lib.optional (!enableShared) "--disable-shared")
+  ];
+
+  dontDisableStatic = enableStatic;
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/tools/compression/mozlz4a/default.nix b/pkgs/tools/compression/mozlz4a/default.nix
index 2116fa45c3e..834b7698cf8 100644
--- a/pkgs/tools/compression/mozlz4a/default.nix
+++ b/pkgs/tools/compression/mozlz4a/default.nix
@@ -1,16 +1,23 @@
-{ lib, stdenv, fetchurl, python3, runtimeShell }:
+{ lib
+, stdenv
+, fetchurl
+, python3
+, runtimeShell
+}:
 
 stdenv.mkDerivation rec {
   pname = "mozlz4a";
-  version = "2018-08-23";
-  # or fetchFromGitHub(owner,repo,rev) or fetchgit(rev)
+  version = "2022-03-19";
+
   src = fetchurl {
-    url = "https://gist.githubusercontent.com/kaefer3000/73febe1eec898cd50ce4de1af79a332a/raw/a266410033455d6b4af515d7a9d34f5afd35beec/mozlz4a.py";
-    sha256 = "1d1ai062kdms34bya9dlykkx011rj8d8nh5l7d76xj8k9kv4ssq6";
+    url = "https://gist.githubusercontent.com/Tblue/62ff47bef7f894e92ed5/raw/c12fce199a97ecb214eb913cc5d762eac2e92c57/mozlz4a.py";
+    hash = "sha256-Igj9u6TmV+nIuSg8gI8zD4hTb/Iiog/3aB3DDk0Lqkg=";
   };
 
   dontUnpack = true;
 
+  buildInputs = [ python3 python3.pkgs.lz4 ];
+
   installPhase = ''
     mkdir -p "$out/bin" "$out/${python3.sitePackages}/"
     cp "${src}" "$out/${python3.sitePackages}/mozlz4a.py"
@@ -21,13 +28,11 @@ stdenv.mkDerivation rec {
     chmod a+x "$out/bin/mozlz4a"
   '';
 
-  buildInputs = [ python3 python3.pkgs.lz4 ];
-
-  meta = {
-    description = "A script to handle Mozilla's mozlz4 files";
-    license = lib.licenses.bsd2;
-    maintainers = [lib.maintainers.raskin lib.maintainers.pshirshov lib.maintainers.kira-bruneau];
-    platforms = lib.platforms.unix;
-    homepage = "https://gist.githubusercontent.com/Tblue/62ff47bef7f894e92ed5";
+  meta = with lib; {
+    description = "MozLz4a compression/decompression utility";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ kira-bruneau pshirshov raskin ];
+    platforms = python3.meta.platforms;
+    homepage = "https://gist.github.com/Tblue/62ff47bef7f894e92ed5";
   };
 }
diff --git a/pkgs/tools/compression/upx/default.nix b/pkgs/tools/compression/upx/default.nix
index 4c808acd003..09aab8258a8 100644
--- a/pkgs/tools/compression/upx/default.nix
+++ b/pkgs/tools/compression/upx/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "upx";
-  version = "4.1.0";
+  version = "4.2.0";
   src = fetchFromGitHub {
     owner = "upx";
     repo = pname;
     rev = "v${version}";
     fetchSubmodules = true;
-    sha256 = "sha256-pHJypO+sK7+ytM7yJxJpfBJHTYpGc9nr/JiFGd7hlJM=";
+    sha256 = "sha256-PRfIJSjmeXjbslqWnKrHUPdOJfZU08nr4wXoAnP9qm0=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/tools/compression/zfp/default.nix b/pkgs/tools/compression/zfp/default.nix
index d63140b1476..fdb005007f1 100644
--- a/pkgs/tools/compression/zfp/default.nix
+++ b/pkgs/tools/compression/zfp/default.nix
@@ -2,7 +2,7 @@
 , config
 , enableCfp ? true
 , enableCuda ? config.cudaSupport
-, enableFortran ? builtins.elem stdenv.targetPlatform.system gfortran.meta.platforms
+, enableFortran ? builtins.elem stdenv.hostPlatform.system gfortran.meta.platforms
 , enableOpenMP ? true
 , enablePython ? true
 , enableUtilities ? true }:
diff --git a/pkgs/tools/compression/zstd/default.nix b/pkgs/tools/compression/zstd/default.nix
index 791dda4f11e..75b306b368a 100644
--- a/pkgs/tools/compression/zstd/default.nix
+++ b/pkgs/tools/compression/zstd/default.nix
@@ -2,7 +2,8 @@
 , fixDarwinDylibNames
 , file
 , legacySupport ? false
-, static ? stdenv.hostPlatform.isStatic
+, static ? stdenv.hostPlatform.isStatic # generates static libraries *only*
+, enableStatic ? static
 # these need to be ran on the host, thus disable when cross-compiling
 , buildContrib ? stdenv.hostPlatform == stdenv.buildPlatform
 , doCheck ? stdenv.hostPlatform == stdenv.buildPlatform
@@ -54,7 +55,7 @@ stdenv.mkDerivation rec {
   cmakeFlags = lib.attrsets.mapAttrsToList
     (name: value: "-DZSTD_${name}:BOOL=${if value then "ON" else "OFF"}") {
       BUILD_SHARED = !static;
-      BUILD_STATIC = static;
+      BUILD_STATIC = enableStatic;
       BUILD_CONTRIB = buildContrib;
       PROGRAMS_LINK_SHARED = !static;
       LEGACY_SUPPORT = legacySupport;