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 {
|
stdenv.mkDerivation {
|
||||||
name = "libredirect-0";
|
name = "libredirect-0";
|
||||||
@ -13,8 +13,10 @@ stdenv.mkDerivation {
|
|||||||
outputs = ["out" "hook"];
|
outputs = ["out" "hook"];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
$CC -Wall -std=c99 -O3 -shared libredirect.c \
|
$CC -Wall -std=c99 -O3 -fPIC -ldl -shared \
|
||||||
-o "$libName" -fPIC -ldl
|
${lib.optionalString stdenv.isDarwin "-Wl,-install_name,$out/lib/$libName"} \
|
||||||
|
-o "$libName" \
|
||||||
|
libredirect.c
|
||||||
|
|
||||||
if [ -n "$doInstallCheck" ]; then
|
if [ -n "$doInstallCheck" ]; then
|
||||||
$CC -Wall -std=c99 -O3 test.c -o test
|
$CC -Wall -std=c99 -O3 test.c -o test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user