Created
February 11, 2016 13:30
-
-
Save selenologist/563e428ca7a4e9d0f675 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, fetchurl, pkgconfig | |
, SDL2, mesa, openal, lua, luajit | |
, libdevil, freetype, physfs, libtheora | |
, libmodplug, mpg123, libvorbis, libogg | |
}: | |
stdenv.mkDerivation rec { | |
name = "love-0.10.0"; | |
src = fetchurl { | |
url = "https://bitbucket.org/rude/love/downloads/${name}-linux-src.tar.gz"; | |
sha256 = "1r2n1nrw3hcdvy14fjbwz3l9swcy65v3lqwpj2frnkkcwncdz94p"; | |
}; | |
buildInputs = [ | |
pkgconfig SDL2 mesa openal luajit | |
libdevil freetype physfs libmodplug mpg123 libvorbis libogg libtheora | |
]; | |
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 "${luajit}/lib/"lib*.so.*)" | |
luaso="''${luaso##*/lib}" | |
luaso="''${luaso%%.so*}" | |
luaoptions="$luaoptions $luaso" | |
sed -e "s/${"''"} lua lua.*;/$luaoptions;/" -i configure | |
luaincdir="$(echo "${luajit}/include"/*/ )" | |
test -d "$luaincdir" && { | |
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$luaincdir" | |
} || true | |
''; | |
NIX_CFLAGS_COMPILE = '' | |
-I${SDL2}/include/SDL2 | |
-I${freetype}include/freetype2 | |
''; | |
meta = { | |
homepage = "http://love2d.org"; | |
description = "A Lua-based 2D game engine/scripting language"; | |
license = stdenv.lib.licenses.zlib; | |
platforms = stdenv.lib.platforms.linux; | |
maintainers = [ stdenv.lib.maintainers.raskin ]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment