Skip to content

Commit

Permalink
Merge branch 'main' into changelog-review
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe authored Oct 9, 2023
2 parents 5d48786 + 81fc4e0 commit 7af2d74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nix/rocksdb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ stdenv.mkDerivation rec {
mkdir -p $tools/bin
cp tools/{ldb,sst_dump}${stdenv.hostPlatform.extensions.executable} $tools/bin/
'' + lib.optionalString stdenv.isDarwin ''
ls -1 $tools/bin/* | xargs -I{} ${stdenv.cc.bintools.targetPrefix}install_name_tool -change "@rpath/librocksdb.8.dylib" $out/lib/librocksdb.dylib {}
ls -1 $tools/bin/* | xargs -I{} ${stdenv.cc.bintools.targetPrefix}install_name_tool -change "@rpath/librocksdb.${lib.versions.major version}.dylib" $out/lib/librocksdb.dylib {}
'' + lib.optionalString (stdenv.isLinux && enableShared) ''
ls -1 $tools/bin/* | xargs -I{} patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib {}
'';
Expand All @@ -94,7 +94,7 @@ stdenv.mkDerivation rec {
fi
'' + lib.optionalString stdenv.isDarwin ''
${stdenv.cc.targetPrefix}install_name_tool -change "@rpath/libsnappy.1.dylib" "${snappy}/lib/libsnappy.1.dylib" $out/lib/librocksdb.dylib
${stdenv.cc.targetPrefix}install_name_tool -change "@rpath/librocksdb.8.dylib" "$out/lib/librocksdb.8.dylib" $out/lib/librocksdb.dylib
${stdenv.cc.targetPrefix}install_name_tool -change "@rpath/librocksdb.${lib.versions.major version}.dylib" "$out/lib/librocksdb.${lib.versions.major version}.dylib" $out/lib/librocksdb.dylib
'';

meta = with lib; {
Expand Down

0 comments on commit 7af2d74

Please sign in to comment.