libredirect: set install_name on Darwin
fixes https://github.com/NixOS/nixpkgs/pull/50246#issuecomment-437975038
This commit is contained in:
parent
91c130e2f5
commit
d04a1265a1
@ -1,4 +1,4 @@
|
||||
{ stdenv, coreutils }:
|
||||
{ stdenv, lib, coreutils }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "libredirect-0";
|
||||
@ -13,8 +13,10 @@ stdenv.mkDerivation {
|
||||
outputs = ["out" "hook"];
|
||||
|
||||
buildPhase = ''
|
||||
$CC -Wall -std=c99 -O3 -shared libredirect.c \
|
||||
-o "$libName" -fPIC -ldl
|
||||
$CC -Wall -std=c99 -O3 -fPIC -ldl -shared \
|
||||
${lib.optionalString stdenv.isDarwin "-Wl,-install_name,$out/lib/$libName"} \
|
||||
-o "$libName" \
|
||||
libredirect.c
|
||||
|
||||
if [ -n "$doInstallCheck" ]; then
|
||||
$CC -Wall -std=c99 -O3 test.c -o test
|
||||
|
Loading…
Reference in New Issue
Block a user