1 { lib, stdenv, fetchurl, python2Packages, pkg-config, SDL2
2 , libpng, ffmpeg_3, freetype, glew, libGL, libGLU, fribidi, zlib
8 stdenv.mkDerivation rec {
13 description = "Ren'Py Visual Novel Engine";
14 homepage = "https://renpy.org/";
15 license = licenses.mit;
16 platforms = platforms.linux;
20 url = "https://www.renpy.org/dl/${version}/renpy-${version}-source.tar.bz2";
21 sha256 = "1anr5cfbvbsbik4v4rvrkdkciwhg700k4lydfbs4n85raimz9mw4";
29 substituteInPlace launcher/game/choose_directory.rpy --replace /usr/bin/python ${python.interpreter}
32 nativeBuildInputs = [ pkg-config ];
34 python cython wrapPython tkinter
35 SDL2 libpng ffmpeg_3 freetype glew libGLU libGL fribidi zlib pygame_sdl2 glib
38 pythonPath = [ pygame_sdl2 tkinter ];
40 RENPY_DEPS_INSTALL = lib.concatStringsSep "::" (map (path: path) [
41 SDL2 SDL2.dev libpng ffmpeg_3 ffmpeg_3.out freetype glew.dev glew.out libGLU libGL fribidi zlib
45 python module/setup.py build
49 mkdir -p $out/share/renpy
50 cp -vr * $out/share/renpy
51 rm -rf $out/share/renpy/module
53 python module/setup.py install --prefix=$out --install-lib=$out/share/renpy/module
55 makeWrapper ${python}/bin/python $out/bin/renpy \
56 --set PYTHONPATH $PYTHONPATH \
57 --set RENPY_BASE $out/share/renpy \
58 --add-flags "-O $out/share/renpy/renpy.py"
61 NIX_CFLAGS_COMPILE = "-I${pygame_sdl2}/include/${python.libPrefix}";