2017-03-17 14:14:08 +01:00
|
|
|
{ stdenv, fetchurl, pythonPackages, pkgconfig, SDL2
|
2016-08-14 12:01:09 +02:00
|
|
|
, libpng, ffmpeg, freetype, glew, mesa, fribidi, zlib
|
2017-03-17 14:14:08 +01:00
|
|
|
, glib
|
2013-06-09 06:45:56 +02:00
|
|
|
}:
|
|
|
|
|
2016-08-14 12:01:09 +02:00
|
|
|
with pythonPackages;
|
|
|
|
|
2013-06-09 06:45:56 +02:00
|
|
|
stdenv.mkDerivation {
|
2017-03-17 14:14:08 +01:00
|
|
|
name = "renpy-6.99.12.4";
|
2013-12-11 06:05:07 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Ren'Py Visual Novel Engine";
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = http://renpy.org/;
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2013-12-11 06:05:07 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2017-03-17 11:07:12 +01:00
|
|
|
# This is an ancient version, last updated in 2014 (3d59f42ce); it fails to
|
|
|
|
# build with the most recent pygame version, and fails to run with 1.9.1.
|
|
|
|
broken = true;
|
2013-12-11 06:05:07 +01:00
|
|
|
};
|
2013-06-09 06:45:56 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-03-17 14:14:08 +01:00
|
|
|
url = "http://www.renpy.org/dl/6.99.12.4/renpy-6.99.12.4-source.tar.bz2";
|
|
|
|
sha256 = "035342rr39zp7krp08z0xhcl73gqbqyilshgmljq0ynfrxxckn35";
|
2013-06-09 06:45:56 +02:00
|
|
|
};
|
|
|
|
|
2017-09-14 21:24:37 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2013-06-09 06:45:56 +02:00
|
|
|
buildInputs = [
|
2017-09-14 21:24:37 +02:00
|
|
|
python cython wrapPython
|
2017-03-17 14:14:08 +01:00
|
|
|
SDL2 libpng ffmpeg freetype glew mesa fribidi zlib pygame_sdl2 glib
|
2013-06-09 06:45:56 +02:00
|
|
|
];
|
|
|
|
|
2017-03-17 14:14:08 +01:00
|
|
|
pythonPath = [ pygame_sdl2 ];
|
2013-06-09 06:45:56 +02:00
|
|
|
|
|
|
|
RENPY_DEPS_INSTALL = stdenv.lib.concatStringsSep "::" (map (path: "${path}") [
|
2017-03-17 14:14:08 +01:00
|
|
|
SDL2 SDL2.dev libpng ffmpeg ffmpeg.out freetype glew.dev glew.out mesa fribidi zlib
|
2013-06-09 06:45:56 +02:00
|
|
|
]);
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
python module/setup.py build
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/renpy
|
|
|
|
cp -r renpy renpy.py $out/share/renpy
|
|
|
|
python module/setup.py install --prefix=$out --install-lib=$out/share/renpy/module
|
|
|
|
|
|
|
|
makeWrapper ${python}/bin/python $out/bin/renpy \
|
2017-03-17 14:14:08 +01:00
|
|
|
--set PYTHONPATH $PYTHONPATH \
|
2013-06-09 06:45:56 +02:00
|
|
|
--set RENPY_BASE $out/share/renpy \
|
|
|
|
--add-flags "-O $out/share/renpy/renpy.py"
|
|
|
|
'';
|
|
|
|
|
2017-03-17 14:14:08 +01:00
|
|
|
NIX_CFLAGS_COMPILE = "-I${pygame_sdl2}/include/${python.libPrefix}";
|
2013-06-09 06:45:56 +02:00
|
|
|
}
|