Support LuaJIT usage when building love2d
This commit is contained in:
parent
b921a787a0
commit
075883c218
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig
|
{ stdenv, fetchurl, pkgconfig
|
||||||
, SDL, mesa, openal, lua5
|
, SDL, mesa, openal, lua
|
||||||
, libdevil, freetype, physfs
|
, libdevil, freetype, physfs
|
||||||
, libmodplug, mpg123, libvorbis, libogg
|
, libmodplug, mpg123, libvorbis, libogg
|
||||||
}:
|
}:
|
||||||
@ -12,10 +12,29 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pkgconfig SDL mesa openal lua5
|
pkgconfig SDL mesa openal lua
|
||||||
libdevil freetype physfs libmodplug mpg123 libvorbis libogg
|
libdevil freetype physfs libmodplug mpg123 libvorbis libogg
|
||||||
];
|
];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
luaoptions="${"''"} lua luajit "
|
||||||
|
for i in lua luajit-; do
|
||||||
|
for j in 5 5.0 5.1 5.2 5.3 5.4; do
|
||||||
|
luaoptions="$luaoptions $i$j "
|
||||||
|
done
|
||||||
|
done
|
||||||
|
luaso="$(echo "${lua}/lib/"lib*.so.*)"
|
||||||
|
luaso="''${luaso##*/lib}"
|
||||||
|
luaso="''${luaso%%.so*}"
|
||||||
|
luaoptions="$luaoptions $luaso"
|
||||||
|
sed -e "s/${"''"} lua lua.*;/$luaoptions;/" -i configure
|
||||||
|
|
||||||
|
luaincdir="$(echo "${lua}/include"/*/ )"
|
||||||
|
test -d "$luaincdir" && {
|
||||||
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$luaincdir"
|
||||||
|
} || true
|
||||||
|
'';
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = ''
|
NIX_CFLAGS_COMPILE = ''
|
||||||
-I${SDL}/include/SDL
|
-I${SDL}/include/SDL
|
||||||
-I${freetype}include/freetype2
|
-I${freetype}include/freetype2
|
||||||
|
@ -3192,7 +3192,8 @@ let
|
|||||||
|
|
||||||
kona = callPackage ../development/interpreters/kona {};
|
kona = callPackage ../development/interpreters/kona {};
|
||||||
|
|
||||||
love = callPackage ../development/interpreters/love {};
|
love = callPackage ../development/interpreters/love {lua=lua5;};
|
||||||
|
love_luajit = callPackage ../development/interpreters/love {lua=luajit;};
|
||||||
|
|
||||||
lua4 = callPackage ../development/interpreters/lua-4 { };
|
lua4 = callPackage ../development/interpreters/lua-4 { };
|
||||||
lua5_0 = callPackage ../development/interpreters/lua-5/5.0.3.nix { };
|
lua5_0 = callPackage ../development/interpreters/lua-5/5.0.3.nix { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user