3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #211515 from timbertson/zstd-cross-darwin

This commit is contained in:
Artturi 2023-01-19 17:23:14 +02:00 committed by GitHub
commit 90aa73fc8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,11 +77,13 @@ stdenv.mkDerivation rec {
substituteInPlace ../programs/zstdless \
--replace "zstdcat" "$bin/bin/zstdcat"
'' + lib.optionalString buildContrib ''
cp contrib/pzstd/pzstd $bin/bin/pzstd
'' + lib.optionalString stdenv.isDarwin ''
install_name_tool -change @rpath/libzstd.1.dylib $out/lib/libzstd.1.dylib $bin/bin/pzstd
'';
'' + lib.optionalString buildContrib (
''
cp contrib/pzstd/pzstd $bin/bin/pzstd
'' + lib.optionalString stdenv.isDarwin ''
install_name_tool -change @rpath/libzstd.1.dylib $out/lib/libzstd.1.dylib $bin/bin/pzstd
''
);
outputs = [ "bin" "dev" ]
++ lib.optional stdenv.hostPlatform.isUnix "man"