zstd: Add pzstd to compiled binaries
This commit is contained in:
parent
a7cb61bc54
commit
9889bdb6fb
@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
|
||||
(name: value: "-DZSTD_${name}:BOOL=${if value then "ON" else "OFF"}") {
|
||||
BUILD_SHARED = !static;
|
||||
BUILD_STATIC = static;
|
||||
BUILD_CONTRIB = true;
|
||||
PROGRAMS_LINK_SHARED = !static;
|
||||
LEGACY_SUPPORT = legacySupport;
|
||||
BUILD_TESTS = doCheck;
|
||||
@ -62,12 +63,16 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $bin/bin
|
||||
cp contrib/pzstd/pzstd $bin/bin/pzstd
|
||||
substituteInPlace ../programs/zstdgrep \
|
||||
--replace ":-grep" ":-${gnugrep}/bin/grep" \
|
||||
--replace ":-zstdcat" ":-$bin/bin/zstdcat"
|
||||
|
||||
substituteInPlace ../programs/zstdless \
|
||||
--replace "zstdcat" "$bin/bin/zstdcat"
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
install_name_tool -change @rpath/libzstd.1.dylib $out/lib/libzstd.1.dylib $bin/bin/pzstd
|
||||
'';
|
||||
|
||||
outputs = [ "bin" "dev" ]
|
||||
|
Loading…
Reference in New Issue
Block a user