2016-02-27 21:31:29 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig
|
|
|
|
, SDL, mesa, openal, lua
|
|
|
|
, libdevil, freetype, physfs
|
|
|
|
, libmodplug, mpg123, libvorbis, libogg
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "love-0.7.2";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://bitbucket.org/rude/love/downloads/${name}-linux-src.tar.gz";
|
|
|
|
sha256 = "0s7jywkvydlshlgy11ilzngrnybmq5xlgzp2v2dhlffwrfqdqym5";
|
|
|
|
};
|
|
|
|
|
2017-09-14 20:24:37 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2016-02-27 21:31:29 +00:00
|
|
|
buildInputs = [
|
2017-09-14 20:24:37 +01:00
|
|
|
SDL mesa openal lua
|
2016-02-27 21:31:29 +00:00
|
|
|
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 = ''
|
2016-08-23 01:26:46 +01:00
|
|
|
-I${SDL.dev}/include/SDL
|
2016-04-16 17:52:29 +01:00
|
|
|
-I${freetype.dev}include/freetype2
|
2016-02-27 21:31:29 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://love2d.org;
|
2016-02-27 21:31:29 +00:00
|
|
|
description = "A Lua-based 2D game engine/scripting language";
|
|
|
|
license = stdenv.lib.licenses.zlib;
|
|
|
|
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.raskin ];
|
|
|
|
};
|
|
|
|
}
|