Skip to content

Commit 63d1272

Browse files
committed
keep install_name_tool
1 parent db75227 commit 63d1272

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

nix/rocksdb.nix

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,16 @@ stdenv.mkDerivation (finalAttrs: {
115115
'';
116116

117117
# Old version doesn't ship the .pc file, new version puts wrong paths in there.
118-
postFixup = ''
119-
if [ -f "$out"/lib/pkgconfig/rocksdb.pc ]; then
120-
substituteInPlace "$out"/lib/pkgconfig/rocksdb.pc \
121-
--replace '="''${prefix}//' '="/'
122-
fi
123-
'';
118+
postFixup =
119+
''
120+
if [ -f "$out"/lib/pkgconfig/rocksdb.pc ]; then
121+
substituteInPlace "$out"/lib/pkgconfig/rocksdb.pc \
122+
--replace '="''${prefix}//' '="/'
123+
fi
124+
''
125+
+ lib.optionalString stdenv.isDarwin ''
126+
${stdenv.cc.targetPrefix}install_name_tool -change "@rpath/libsnappy.1.dylib" "${snappy}/lib/libsnappy.1.dylib" $out/lib/librocksdb.dylib
127+
'';
124128

125129
meta = with lib; {
126130
homepage = "https://rocksdb.org";

0 commit comments

Comments
 (0)