mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 03:25:36 +00:00
lua 5: Don't use stdenv.cross, and use less make flags
cc-wrapper will define environment variables matching those now
This commit is contained in:
parent
c3c5793ab2
commit
5d1e51a199
@ -1,4 +1,6 @@
|
||||
{ stdenv, fetchurl, readline, compat ? false }:
|
||||
{ stdenv, fetchurl, readline, compat ? false
|
||||
, hostPlatform
|
||||
}:
|
||||
|
||||
let
|
||||
dsoPatch = fetchurl {
|
||||
@ -55,21 +57,15 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
crossAttrs = let
|
||||
isMingw = stdenv.cross.libc == "msvcrt";
|
||||
isDarwin = stdenv.cross.libc == "libSystem";
|
||||
inherit (hostPlatform) isDarwin isMingw;
|
||||
in {
|
||||
configurePhase = ''
|
||||
makeFlagsArray=(
|
||||
INSTALL_TOP=$out
|
||||
INSTALL_MAN=$out/share/man/man1
|
||||
CC=${stdenv.cross.config}-gcc
|
||||
STRIP=:
|
||||
RANLIB=${stdenv.cross.config}-ranlib
|
||||
V=${luaversion}
|
||||
R=${version}
|
||||
${if isMingw then "mingw" else stdenv.lib.optionalString isDarwin ''
|
||||
AR="${stdenv.cross.config}-ar rcu"
|
||||
macosx
|
||||
''}
|
||||
)
|
||||
'' + stdenv.lib.optionalString isMingw ''
|
||||
|
@ -1,4 +1,6 @@
|
||||
{ stdenv, fetchurl, readline, compat ? false }:
|
||||
{ stdenv, fetchurl, readline, compat ? false
|
||||
, hostPlatform
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "lua-${version}";
|
||||
@ -54,21 +56,15 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
crossAttrs = let
|
||||
isMingw = stdenv.cross.libc == "msvcrt";
|
||||
isDarwin = stdenv.cross.libc == "libSystem";
|
||||
inherit (hostPlatform) isDarwin isMingw;
|
||||
in {
|
||||
configurePhase = ''
|
||||
makeFlagsArray=(
|
||||
INSTALL_TOP=$out
|
||||
INSTALL_MAN=$out/share/man/man1
|
||||
CC=${stdenv.cross.config}-gcc
|
||||
STRIP=:
|
||||
RANLIB=${stdenv.cross.config}-ranlib
|
||||
V=${luaversion}
|
||||
R=${version}
|
||||
${if isMingw then "mingw" else stdenv.lib.optionalString isDarwin ''
|
||||
AR="${stdenv.cross.config}-ar rcu"
|
||||
macosx
|
||||
''}
|
||||
)
|
||||
'' + stdenv.lib.optionalString isMingw ''
|
||||
|
Loading…
Reference in New Issue
Block a user