diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2018-03-21 21:13:33 +0100 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2018-03-21 21:28:53 +0100 |
commit | fe37684525d39a3342a25f7123e632f5058bccf3 (patch) | |
tree | 68706084bee28ed9ad3316e72d9fe11a1de113b6 /pkgs | |
parent | c2ca5c057de6a5576cecd2b05381328a63629375 (diff) |
luaffi: fix darwin build
/cc ZHF #36454
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/libraries/luaffi/darwin.patch | 17 | ||||
-rw-r--r-- | pkgs/development/libraries/luaffi/default.nix | 6 |
2 files changed, 20 insertions, 3 deletions
diff --git a/pkgs/development/libraries/luaffi/darwin.patch b/pkgs/development/libraries/luaffi/darwin.patch new file mode 100644 index 0000000000000..50db81b776d74 --- /dev/null +++ b/pkgs/development/libraries/luaffi/darwin.patch @@ -0,0 +1,17 @@ +diff --git a/Makefile b/Makefile +index b2b5f2c..b690a5d 100644 +--- a/Makefile ++++ b/Makefile +@@ -18,10 +18,10 @@ test: + if [ `uname` = "Darwin" ]; then $(MAKE) test_macosx; else $(MAKE) test_posix; fi + + macosx: +- $(MAKE) posix "SOCC=MACOSX_DEPLOYMENT_TARGET=10.3 $(CC) -dynamiclib -single_module -undefined dynamic_lookup $(SOCFLAGS)" ++ $(MAKE) posix "SOCC= $(CC) -dynamiclib -single_module -undefined dynamic_lookup -Wl,-install_name,$(PREFIX)/lib/$(MODSO) $(SOCFLAGS)" + + test_macosx: +- $(MAKE) test_posix "SOCC=MACOSX_DEPLOYMENT_TARGET=10.3 $(CC) -dynamiclib -single_module -undefined dynamic_lookup $(SOCFLAGS)" ++ $(MAKE) test_posix "SOCC= $(CC) -dynamiclib -single_module -undefined dynamic_lookup -Wl,-install_name,$(PREFIX)/lib/$(MODSO) $(SOCFLAGS)" + + posix: $(MODSO) test_cdecl.so + diff --git a/pkgs/development/libraries/luaffi/default.nix b/pkgs/development/libraries/luaffi/default.nix index 1e4cf11d1fa05..065562ac82ec2 100644 --- a/pkgs/development/libraries/luaffi/default.nix +++ b/pkgs/development/libraries/luaffi/default.nix @@ -12,9 +12,9 @@ stdenv.mkDerivation { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ lua ]; - patches = [ - ./makefile-errors.patch - ]; + patches = [ ./darwin.patch ./makefile-errors.patch ]; + + makeFlags = [ "PREFIX=$(out)" ]; installPhase = '' mkdir -p $out/lib |