diff options
author | John Wiegley <johnw@newartisans.com> | 2014-04-14 14:39:23 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2014-04-14 14:39:23 -0500 |
commit | f9c2f684e816df1241b66afddd14341cac68dda3 (patch) | |
tree | 469c5bf6191308f4e390f64d5a0803dc807c38ce /pkgs/development/interpreters/lua-5/5.1.nix | |
parent | 7ce743b4226e44067e1562eac125d267dcce04f3 (diff) | |
download | nixlib-f9c2f684e816df1241b66afddd14341cac68dda3.tar nixlib-f9c2f684e816df1241b66afddd14341cac68dda3.tar.gz nixlib-f9c2f684e816df1241b66afddd14341cac68dda3.tar.bz2 nixlib-f9c2f684e816df1241b66afddd14341cac68dda3.tar.lz nixlib-f9c2f684e816df1241b66afddd14341cac68dda3.tar.xz nixlib-f9c2f684e816df1241b66afddd14341cac68dda3.tar.zst nixlib-f9c2f684e816df1241b66afddd14341cac68dda3.zip |
Allow lua5 to build as a dylib on Darwin
Diffstat (limited to 'pkgs/development/interpreters/lua-5/5.1.nix')
-rw-r--r-- | pkgs/development/interpreters/lua-5/5.1.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/lua-5/5.1.nix b/pkgs/development/interpreters/lua-5/5.1.nix index 27b1589d27fa..9a57a034ad19 100644 --- a/pkgs/development/interpreters/lua-5/5.1.nix +++ b/pkgs/development/interpreters/lua-5/5.1.nix @@ -18,9 +18,14 @@ stdenv.mkDerivation rec { buildInputs = [ readline ]; - patches = [ dsoPatch ]; + patches = if stdenv.isDarwin then [ ./5.1.darwin.patch ] else [ dsoPatch ]; - configurePhase = '' + configurePhase = + if stdenv.isDarwin + then '' + makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2" LDLAGS="" ) + installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.5.1.5.dylib" INSTALL_DATA='cp -d' ) + '' else '' makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC" LDLAGS="-fPIC" ) installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.a liblua.so liblua.so.5.1 liblua.so.5.1.5" INSTALL_DATA='cp -d' ) ''; |