2021-01-23 14:15:07 +01:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config
|
2019-11-10 17:44:34 +01:00
|
|
|
, SDL, libGLU, libGL, openal, lua
|
2016-02-27 22:31:29 +01:00
|
|
|
, libdevil, freetype, physfs
|
|
|
|
, libmodplug, mpg123, libvorbis, libogg
|
2019-08-04 18:02:00 +02:00
|
|
|
, libmng
|
2016-02-27 22:31:29 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "love-0.7.2";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://bitbucket.org/rude/love/downloads/${name}-linux-src.tar.gz";
|
|
|
|
sha256 = "0s7jywkvydlshlgy11ilzngrnybmq5xlgzp2v2dhlffwrfqdqym5";
|
|
|
|
};
|
|
|
|
|
2019-08-04 18:02:00 +02:00
|
|
|
# see discussion on arch linux user repository (https://aur.archlinux.org/packages/love07/?setlang=cs#comment-684696)
|
|
|
|
patches = [ ./0.7-gl-prototypes.patch ];
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2016-02-27 22:31:29 +01:00
|
|
|
buildInputs = [
|
2019-11-10 17:44:34 +01:00
|
|
|
SDL libGLU libGL openal lua
|
2019-08-04 18:02:00 +02:00
|
|
|
libdevil freetype physfs libmodplug mpg123 libvorbis libogg libmng
|
2016-02-27 22:31:29 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
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 02:26:46 +02:00
|
|
|
-I${SDL.dev}/include/SDL
|
2016-04-16 18:52:29 +02:00
|
|
|
-I${freetype.dev}include/freetype2
|
2016-02-27 22:31:29 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://love2d.org";
|
2016-02-27 22:31:29 +01:00
|
|
|
description = "A Lua-based 2D game engine/scripting language";
|
2021-01-23 14:15:07 +01:00
|
|
|
license = lib.licenses.zlib;
|
2016-02-27 22:31:29 +01:00
|
|
|
|
2021-01-23 14:15:07 +01:00
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = [ lib.maintainers.raskin ];
|
2016-02-27 22:31:29 +01:00
|
|
|
};
|
|
|
|
}
|