Merge #78910: libarchive: link to zstd (into staging)
Also split outputs and don't provide static lib by default.
This commit is contained in:
commit
afa9962538
3 changed files with 14 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
fetchFromGitHub, stdenv, pkgconfig, autoreconfHook,
|
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.
|
# Optional but increases closure only negligibly.
|
||||||
xarSupport ? true,
|
xarSupport ? true,
|
||||||
|
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||||
outputs = [ "out" "lib" "dev" ];
|
outputs = [ "out" "lib" "dev" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
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.optionals stdenv.isLinux [ e2fsprogs attr acl ]
|
||||||
++ stdenv.lib.optional xarSupport libxml2;
|
++ stdenv.lib.optional xarSupport libxml2;
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DZSTD_BUILD_SHARED:BOOL=${if enableShared then "ON" else "OFF"}"
|
"-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_LEGACY_SUPPORT:BOOL=${if legacySupport then "ON" else "OFF"}"
|
||||||
"-DZSTD_BUILD_TESTS:BOOL=ON"
|
"-DZSTD_BUILD_TESTS:BOOL=ON"
|
||||||
];
|
];
|
||||||
|
@ -50,11 +51,15 @@ stdenv.mkDerivation rec {
|
||||||
preInstall = ''
|
preInstall = ''
|
||||||
substituteInPlace ../programs/zstdgrep \
|
substituteInPlace ../programs/zstdgrep \
|
||||||
--replace ":-grep" ":-${gnugrep}/bin/grep" \
|
--replace ":-grep" ":-${gnugrep}/bin/grep" \
|
||||||
--replace ":-zstdcat" ":-$out/bin/zstdcat"
|
--replace ":-zstdcat" ":-$bin/bin/zstdcat"
|
||||||
|
|
||||||
substituteInPlace ../programs/zstdless \
|
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; {
|
meta = with stdenv.lib; {
|
||||||
description = "Zstandard real-time compression algorithm";
|
description = "Zstandard real-time compression algorithm";
|
||||||
|
|
|
@ -7918,7 +7918,11 @@ in
|
||||||
|
|
||||||
zssh = callPackage ../tools/networking/zssh { };
|
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 { };
|
zsync = callPackage ../tools/compression/zsync { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue