Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 380171c9f624
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c40576862286
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Mar 21, 2018

  1. lua-{5.2,5.3}: cross fixups, drop crossAttrs

    mostly just forward environment variables to make arguments,
    this partially reverts 5d1e51a
    which removed them because they're already set in env--
    but that's not enough to override make vars.
    
    Also, readline is buildInput not nativeBuildInput
    
    (we need headers and to link against it)
    dtzWill committed Mar 21, 2018
    Copy the full SHA
    ebe7b86 View commit details

Commits on Mar 22, 2018

  1. Merge pull request #37599 from dtzWill/fix/lua-5.2-5.3-cross

    lua-{5.2,5.3}: cross fixups, drop crossAttrs
    dtzWill authored Mar 22, 2018
    Copy the full SHA
    c405768 View commit details
Showing with 6 additions and 56 deletions.
  1. +3 −28 pkgs/development/interpreters/lua-5/5.2.nix
  2. +3 −28 pkgs/development/interpreters/lua-5/5.3.nix
31 changes: 3 additions & 28 deletions pkgs/development/interpreters/lua-5/5.2.nix
Original file line number Diff line number Diff line change
@@ -19,17 +19,17 @@ stdenv.mkDerivation rec {
sha256 = "0b8034v1s82n4dg5rzcn12067ha3nxaylp2vdp8gg08kjsbzphhk";
};

nativeBuildInputs = [ readline ];
buildInputs = [ readline ];

patches = if stdenv.isDarwin then [ ./5.2.darwin.patch ] else [ dsoPatch ];

configurePhase =
if stdenv.isDarwin
then ''
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} )
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} CC="$CC" )
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.${version}.dylib" INSTALL_DATA='cp -d' )
'' else ''
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} )
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} CC="$CC" AR="$AR q" RANLIB="$RANLIB" )
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.a liblua.so liblua.so.${luaversion} liblua.so.${version}" INSTALL_DATA='cp -d' )
'';

@@ -56,31 +56,6 @@ stdenv.mkDerivation rec {
EOF
'';

crossAttrs = let
inherit (hostPlatform) isDarwin isMinGW;
in {
configurePhase = ''
makeFlagsArray=(
INSTALL_TOP=$out
INSTALL_MAN=$out/share/man/man1
V=${luaversion}
R=${version}
${if isMinGW then "mingw" else stdenv.lib.optionalString isDarwin ''
''}
)
'' + stdenv.lib.optionalString isMinGW ''
installFlagsArray=(
TO_BIN="lua.exe luac.exe"
TO_LIB="liblua.a lua52.dll"
INSTALL_DATA="cp -d"
)
'';
} // stdenv.lib.optionalAttrs isDarwin {
postPatch = ''
sed -i -e 's/-Wl,-soname[^ ]* *//' src/Makefile
'';
};

meta = {
homepage = http://www.lua.org;
description = "Powerful, fast, lightweight, embeddable scripting language";
31 changes: 3 additions & 28 deletions pkgs/development/interpreters/lua-5/5.3.nix
Original file line number Diff line number Diff line change
@@ -12,17 +12,17 @@ stdenv.mkDerivation rec {
sha256 = "0320a8dg3aci4hxla380dx1ifkw8gj4gbw5c4dz41g1kh98sm0gn";
};

nativeBuildInputs = [ readline ];
buildInputs = [ readline ];

patches = if stdenv.isDarwin then [ ./5.2.darwin.patch ] else [];

configurePhase =
if stdenv.isDarwin
then ''
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} )
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} CC="$CC" )
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.${version}.dylib" INSTALL_DATA='cp -d' )
'' else ''
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version})
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} CC="$CC" AR="$AR q" RANLIB="$RANLIB" )
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.a liblua.so liblua.so.${luaversion} liblua.so.${version}" INSTALL_DATA='cp -d' )
cat ${./lua-5.3-dso.make} >> src/Makefile
sed -e 's/ALL_T *= */& $(LUA_SO)/' -i src/Makefile
@@ -55,31 +55,6 @@ stdenv.mkDerivation rec {
EOF
'';

crossAttrs = let
inherit (hostPlatform) isDarwin isMinGW;
in {
configurePhase = ''
makeFlagsArray=(
INSTALL_TOP=$out
INSTALL_MAN=$out/share/man/man1
V=${luaversion}
R=${version}
${if isMinGW then "mingw" else stdenv.lib.optionalString isDarwin ''
''}
)
'' + stdenv.lib.optionalString isMinGW ''
installFlagsArray=(
TO_BIN="lua.exe luac.exe"
TO_LIB="liblua.a lua52.dll"
INSTALL_DATA="cp -d"
)
'';
} // stdenv.lib.optionalAttrs isDarwin {
postPatch = ''
sed -i -e 's/-Wl,-soname[^ ]* *//' src/Makefile
'';
};

meta = {
homepage = http://www.lua.org;
description = "Powerful, fast, lightweight, embeddable scripting language";