lua52/cross: Allow to cross-compile to mingw-w64.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
fbc307a183
commit
4f69722ee5
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "004zyh9p3lpvbwhyhlmrw6wwcia5abx84q4h2brkn4zdypipvmiz";
|
sha256 = "004zyh9p3lpvbwhyhlmrw6wwcia5abx84q4h2brkn4zdypipvmiz";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ readline ];
|
nativeBuildInputs = [ readline ];
|
||||||
|
|
||||||
patches = [ dsoPatch ];
|
patches = [ dsoPatch ];
|
||||||
|
|
||||||
@ -49,6 +49,29 @@ stdenv.mkDerivation rec {
|
|||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
crossAttrs = let
|
||||||
|
isMingwW64 = stdenv.cross.config == "x86_64-w64-mingw32";
|
||||||
|
in {
|
||||||
|
configurePhase = ''
|
||||||
|
makeFlagsArray=(
|
||||||
|
INSTALL_TOP=$out
|
||||||
|
INSTALL_MAN=$out/share/man/man1
|
||||||
|
CC=${stdenv.cross.config}-gcc
|
||||||
|
STRIP=:
|
||||||
|
RANLIB=${stdenv.cross.config}-ranlib
|
||||||
|
V=${majorVersion}
|
||||||
|
R=${version}
|
||||||
|
${stdenv.lib.optionals isMingwW64 "mingw"}
|
||||||
|
)
|
||||||
|
'' + stdenv.lib.optionalString isMingwW64 ''
|
||||||
|
installFlagsArray=(
|
||||||
|
TO_BIN="lua.exe luac.exe"
|
||||||
|
TO_LIB="liblua.a lua52.dll"
|
||||||
|
INSTALL_DATA="cp -d"
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://www.lua.org";
|
homepage = "http://www.lua.org";
|
||||||
description = "Powerful, fast, lightweight, embeddable scripting language";
|
description = "Powerful, fast, lightweight, embeddable scripting language";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user