diff options
-rw-r--r-- | pkgs/development/libraries/libarchive/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/compression/zstd/default.nix | 9 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 6 |
3 files changed, 14 insertions, 5 deletions
diff --git a/pkgs/development/libraries/libarchive/default.nix b/pkgs/development/libraries/libarchive/default.nix index 118adc61623a5..d1917de37d6ac 100644 --- a/pkgs/development/libraries/libarchive/default.nix +++ b/pkgs/development/libraries/libarchive/default.nix @@ -1,6 +1,6 @@ { fetchFromGitHub, stdenv, pkgconfig, autoreconfHook, - acl, attr, bzip2, e2fsprogs, libxml2, lzo, openssl, sharutils, xz, zlib, + acl, attr, bzip2, e2fsprogs, libxml2, lzo, openssl, sharutils, xz, zlib, zstd, # Optional but increases closure only negligibly. xarSupport ? true, @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "lib" "dev" ]; nativeBuildInputs = [ pkgconfig autoreconfHook ]; - buildInputs = [ sharutils zlib bzip2 openssl xz lzo ] + buildInputs = [ sharutils zlib bzip2 openssl xz lzo zstd ] ++ stdenv.lib.optionals stdenv.isLinux [ e2fsprogs attr acl ] ++ stdenv.lib.optional xarSupport libxml2; diff --git a/pkgs/tools/compression/zstd/default.nix b/pkgs/tools/compression/zstd/default.nix index 2f89331f92c63..f919fb92ed1d3 100644 --- a/pkgs/tools/compression/zstd/default.nix +++ b/pkgs/tools/compression/zstd/default.nix @@ -30,6 +30,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DZSTD_BUILD_SHARED:BOOL=${if enableShared then "ON" else "OFF"}" + # They require STATIC for bin/zstd and tests. "-DZSTD_LEGACY_SUPPORT:BOOL=${if legacySupport then "ON" else "OFF"}" "-DZSTD_BUILD_TESTS:BOOL=ON" ]; @@ -50,11 +51,15 @@ stdenv.mkDerivation rec { preInstall = '' substituteInPlace ../programs/zstdgrep \ --replace ":-grep" ":-${gnugrep}/bin/grep" \ - --replace ":-zstdcat" ":-$out/bin/zstdcat" + --replace ":-zstdcat" ":-$bin/bin/zstdcat" substituteInPlace ../programs/zstdless \ - --replace "zstdcat" "$out/bin/zstdcat" + --replace "zstdcat" "$bin/bin/zstdcat" ''; + # Don't duplicate the library code in runtime closures. + postInstall = stdenv.lib.optionalString enableShared ''rm "$out"/lib/libzstd.a''; + + outputs = [ "bin" "dev" "man" "out" ]; meta = with stdenv.lib; { description = "Zstandard real-time compression algorithm"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c25de97cfbe90..df1272e415589 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7918,7 +7918,11 @@ in zssh = callPackage ../tools/networking/zssh { }; - zstd = callPackage ../tools/compression/zstd { }; + zstd = callPackage ../tools/compression/zstd { + cmake = cmake.override { + libarchive = libarchive.override { zstd = null; }; + }; + }; zsync = callPackage ../tools/compression/zsync { }; |