diff options
Diffstat (limited to 'pkgs/development/interpreters/lua-5/5.1.nix')
-rw-r--r-- | pkgs/development/interpreters/lua-5/5.1.nix | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/development/interpreters/lua-5/5.1.nix b/pkgs/development/interpreters/lua-5/5.1.nix index 2923a8f960d1..1b05cb8f7780 100644 --- a/pkgs/development/interpreters/lua-5/5.1.nix +++ b/pkgs/development/interpreters/lua-5/5.1.nix @@ -9,6 +9,7 @@ let in stdenv.mkDerivation rec { name = "lua-5.1.5"; + luaversion = "5.1"; src = fetchurl { url = "http://www.lua.org/ftp/${name}.tar.gz"; @@ -17,10 +18,15 @@ stdenv.mkDerivation rec { buildInputs = [ readline ]; - patches = [ dsoPatch ]; + patches = if stdenv.isDarwin then [ ./5.1.darwin.patch ] else [ dsoPatch ]; - configurePhase = '' - makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC" LDLAGS="-fPIC" ) + configurePhase = + if stdenv.isDarwin + then '' + makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2" LDFLAGS="" ) + 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" LDFLAGS="-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' ) ''; @@ -42,8 +48,8 @@ stdenv.mkDerivation rec { management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping. ''; - license = "MIT"; - platforms = stdenv.lib.platforms.unix; + license = stdenv.lib.licenses.mit; + hydraPlatforms = stdenv.lib.platforms.linux; maintainers = [ stdenv.lib.maintainers.simons ]; }; } |