shadowsocks-libev: set install name correctly

This avoids having to invoke install_name_tool.
This commit is contained in:
Matthew Bauer 2018-11-06 19:58:20 -06:00
parent 6141939d6e
commit 147ff753f5

View file

@ -16,27 +16,15 @@ stdenv.mkDerivation rec {
};
buildInputs = [ libsodium mbedtls libev c-ares pcre ];
nativeBuildInputs = [ cmake asciidoc xmlto docbook_xml_dtd_45 docbook_xsl libxslt ];
nativeBuildInputs = [ cmake asciidoc xmlto docbook_xml_dtd_45
docbook_xsl libxslt ];
cmakeFlags = [ "-DWITH_STATIC=OFF" ];
cmakeFlags = [ "-DWITH_STATIC=OFF" "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ];
postInstall = ''
cp lib/* $out/lib
chmod +x $out/bin/*
mv $out/pkgconfig $out/lib
${stdenv.lib.optionalString stdenv.isDarwin ''
install_name_tool -change libcork.dylib $out/lib/libcork.dylib $out/lib/libipset.dylib
install_name_tool -change libbloom.dylib $out/lib/libbloom.dylib $out/lib/libipset.dylib
for exe in $out/bin/*; do
install_name_tool -change libmbedtls.dylib ${mbedtls}/lib/libmbedtls.dylib $exe
install_name_tool -change libmbedcrypto.dylib ${mbedtls}/lib/libmbedcrypto.dylib $exe
install_name_tool -change libcork.dylib $out/lib/libcork.dylib $exe
install_name_tool -change libipset.dylib $out/lib/libipset.dylib $exe
install_name_tool -change libbloom.dylib $out/lib/libbloom.dylib $exe
done
''}
'';
meta = with stdenv.lib; {