2021-01-19 06:50:56 +00:00
|
|
|
{ stdenv, fetchurl, python2Packages, pkg-config, SDL2
|
2020-06-07 13:39:09 +01:00
|
|
|
, libpng, ffmpeg_3, freetype, glew, libGL, libGLU, fribidi, zlib
|
2017-03-17 13:14:08 +00:00
|
|
|
, glib
|
2013-06-09 05:45:56 +01:00
|
|
|
}:
|
|
|
|
|
2019-11-13 14:32:10 +00:00
|
|
|
with python2Packages;
|
2016-08-14 11:01:09 +01:00
|
|
|
|
2018-03-22 02:26:29 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "renpy";
|
2019-11-06 17:53:53 +00:00
|
|
|
version = "7.3.5";
|
2013-12-11 05:05:07 +00:00
|
|
|
|
2018-03-22 02:26:29 +00:00
|
|
|
meta = with stdenv.lib; {
|
2013-12-11 05:05:07 +00:00
|
|
|
description = "Ren'Py Visual Novel Engine";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://renpy.org/";
|
2018-03-22 02:26:29 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2013-12-11 05:05:07 +00:00
|
|
|
};
|
2013-06-09 05:45:56 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-03-22 02:26:29 +00:00
|
|
|
url = "https://www.renpy.org/dl/${version}/renpy-${version}-source.tar.bz2";
|
2019-11-06 17:53:53 +00:00
|
|
|
sha256 = "1anr5cfbvbsbik4v4rvrkdkciwhg700k4lydfbs4n85raimz9mw4";
|
2013-06-09 05:45:56 +01:00
|
|
|
};
|
|
|
|
|
2018-03-22 02:26:29 +00:00
|
|
|
patches = [
|
|
|
|
./launcherenv.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace launcher/game/choose_directory.rpy --replace /usr/bin/python ${python.interpreter}
|
|
|
|
'';
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2013-06-09 05:45:56 +01:00
|
|
|
buildInputs = [
|
2018-03-22 02:26:29 +00:00
|
|
|
python cython wrapPython tkinter
|
2020-06-07 13:39:09 +01:00
|
|
|
SDL2 libpng ffmpeg_3 freetype glew libGLU libGL fribidi zlib pygame_sdl2 glib
|
2013-06-09 05:45:56 +01:00
|
|
|
];
|
|
|
|
|
2018-03-22 02:26:29 +00:00
|
|
|
pythonPath = [ pygame_sdl2 tkinter ];
|
2013-06-09 05:45:56 +01:00
|
|
|
|
2019-09-09 00:38:31 +01:00
|
|
|
RENPY_DEPS_INSTALL = stdenv.lib.concatStringsSep "::" (map (path: path) [
|
2020-06-07 13:39:09 +01:00
|
|
|
SDL2 SDL2.dev libpng ffmpeg_3 ffmpeg_3.out freetype glew.dev glew.out libGLU libGL fribidi zlib
|
2013-06-09 05:45:56 +01:00
|
|
|
]);
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
python module/setup.py build
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/renpy
|
2018-03-22 02:26:29 +00:00
|
|
|
cp -vr * $out/share/renpy
|
|
|
|
rm -rf $out/share/renpy/module
|
|
|
|
|
2013-06-09 05:45:56 +01:00
|
|
|
python module/setup.py install --prefix=$out --install-lib=$out/share/renpy/module
|
|
|
|
|
|
|
|
makeWrapper ${python}/bin/python $out/bin/renpy \
|
2017-03-17 13:14:08 +00:00
|
|
|
--set PYTHONPATH $PYTHONPATH \
|
2013-06-09 05:45:56 +01:00
|
|
|
--set RENPY_BASE $out/share/renpy \
|
|
|
|
--add-flags "-O $out/share/renpy/renpy.py"
|
|
|
|
'';
|
|
|
|
|
2017-03-17 13:14:08 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-I${pygame_sdl2}/include/${python.libPrefix}";
|
2013-06-09 05:45:56 +01:00
|
|
|
}
|