diff --git a/pkgs/development/interpreters/renpy/default.nix b/pkgs/by-name/re/renpy/package.nix similarity index 57% rename from pkgs/development/interpreters/renpy/default.nix rename to pkgs/by-name/re/renpy/package.nix index 45a3630f7c57..d31ad9ced864 100644 --- a/pkgs/development/interpreters/renpy/default.nix +++ b/pkgs/by-name/re/renpy/package.nix @@ -1,6 +1,20 @@ -{ lib, stdenv, fetchFromGitHub, python3, pkg-config, SDL2 -, libpng, ffmpeg, freetype, glew, libGL, libGLU, fribidi, zlib -, makeWrapper +{ + lib, + stdenv, + fetchFromGitHub, + python3, + pkg-config, + SDL2, + libpng, + ffmpeg, + freetype, + glew, + libGL, + libGLU, + fribidi, + zlib, + harfbuzz, + makeWrapper, }: let @@ -8,42 +22,71 @@ let # base_version is of the form major.minor.patch # vc_version is of the form YYMMDDCC # version corresponds to the tag on GitHub - base_version = "8.1.3"; - vc_version = "23091805"; -in stdenv.mkDerivation rec { - pname = "renpy"; - + base_version = "8.2.1"; + vc_version = "24030407"; version = "${base_version}.${vc_version}"; +in +stdenv.mkDerivation { + pname = "renpy"; + inherit version; src = fetchFromGitHub { owner = "renpy"; repo = "renpy"; rev = version; - sha256 = "sha256-bYqnKSWY8EEGr1+12cWeT9/ZSv5OrKLsRqCnnIruDQw="; + hash = "sha256-07Hj8mJGR0+Pn1DQ+sK5YQ3x3CTMsZ5h5yEoz44b2TM="; }; nativeBuildInputs = [ pkg-config makeWrapper - python3.pkgs.cython + # Ren'Py currently does not compile on Cython 3.x. + # See https://github.com/renpy/renpy/issues/5359 + python3.pkgs.cython_0 python3.pkgs.setuptools ]; - buildInputs = [ - SDL2 libpng ffmpeg freetype glew libGLU libGL fribidi zlib - ] ++ (with python3.pkgs; [ - python pygame-sdl2 tkinter future six pefile requests ecdsa - ]); + buildInputs = + [ + SDL2 + libpng + ffmpeg + freetype + glew + libGLU + libGL + fribidi + zlib + harfbuzz + ] + ++ (with python3.pkgs; [ + python + pygame-sdl2 + tkinter + future + six + pefile + requests + ecdsa + ]); - RENPY_DEPS_INSTALL = lib.concatStringsSep "::" (map (path: path) [ - SDL2 SDL2.dev libpng ffmpeg.lib freetype glew.dev libGLU libGL fribidi zlib - ]); + RENPY_DEPS_INSTALL = lib.concatStringsSep "::" [ + SDL2 + SDL2.dev + libpng + ffmpeg.lib + freetype + glew.dev + libGLU + libGL + fribidi + zlib + harfbuzz.dev + ]; enableParallelBuilding = true; - patches = [ - ./shutup-erofs-errors.patch - ]; + patches = [ ./shutup-erofs-errors.patch ]; postPatch = '' cp tutorial/game/tutorial_director.rpy{m,} @@ -53,7 +96,7 @@ in stdenv.mkDerivation rec { official = False nightly = False # Look at https://renpy.org/latest.html for what to put. - version_name = 'Where No One Has Gone Before' + version_name = '64bit Sensation' EOF ''; @@ -79,15 +122,17 @@ in stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = with python3.pkgs; "-I${pygame-sdl2}/include/${python.libPrefix}"; - meta = with lib; { + meta = { description = "Visual Novel Engine"; mainProgram = "renpy"; homepage = "https://renpy.org/"; changelog = "https://renpy.org/doc/html/changelog.html"; - license = licenses.mit; - platforms = platforms.linux; - maintainers = with maintainers; [ shadowrz ]; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ shadowrz ]; }; - passthru = { inherit base_version vc_version; }; + passthru = { + inherit base_version vc_version; + }; } diff --git a/pkgs/development/interpreters/renpy/shutup-erofs-errors.patch b/pkgs/by-name/re/renpy/shutup-erofs-errors.patch similarity index 100% rename from pkgs/development/interpreters/renpy/shutup-erofs-errors.patch rename to pkgs/by-name/re/renpy/shutup-erofs-errors.patch diff --git a/pkgs/development/python-modules/pygame-sdl2/default.nix b/pkgs/development/python-modules/pygame-sdl2/default.nix index 0201c9cb4a8a..8d8c5dee83a6 100644 --- a/pkgs/development/python-modules/pygame-sdl2/default.nix +++ b/pkgs/development/python-modules/pygame-sdl2/default.nix @@ -1,16 +1,32 @@ -{ lib, buildPythonPackage, fetchurl, isPy27, renpy -, cython_0, SDL2, SDL2_image, SDL2_ttf, SDL2_mixer, libjpeg, libpng }: - -buildPythonPackage rec { +{ + lib, + buildPythonPackage, + fetchurl, + isPy27, + renpy, + cython_0, + SDL2, + SDL2_image, + SDL2_ttf, + SDL2_mixer, + libjpeg, + libpng, + setuptools, +}: +let pname = "pygame-sdl2"; version = "2.1.0"; - format = "setuptools"; renpy_version = renpy.base_version; +in + +buildPythonPackage { + inherit pname version; name = "${pname}-${version}-${renpy_version}"; + pyproject = true; src = fetchurl { url = "https://www.renpy.org/dl/${renpy_version}/pygame_sdl2-${version}+renpy${renpy_version}.tar.gz"; - hash = "sha256-mrfrsRAVEqw7fwtYdeATp/8AtMn74x9pJEXwYZPOl2I="; + hash = "sha256-Zib39NyQ1pGVCWPrK5/Tl3dAylUlmKZKxU8pf+OpAdY="; }; # force rebuild of headers needed for install @@ -24,27 +40,26 @@ buildPythonPackage rec { ''; nativeBuildInputs = [ - SDL2.dev cython_0 + SDL2.dev + cython_0 + setuptools ]; buildInputs = [ - SDL2 SDL2_image SDL2_ttf SDL2_mixer - libjpeg libpng + SDL2 + SDL2_image + SDL2_ttf + SDL2_mixer + libjpeg + libpng ]; - doCheck = isPy27; # python3 tests are non-functional - postInstall = '' - ( cd "$out"/include/python*/ ; - ln -s pygame-sdl2 pygame_sdl2 || true ; ) - ''; - - meta = with lib; { + meta = { description = "A reimplementation of parts of pygame API using SDL2"; - homepage = "https://github.com/renpy/pygame_sdl2"; - # Some parts are also available under Zlib License - license = licenses.lgpl2; - maintainers = with maintainers; [ raskin ]; + homepage = "https://github.com/renpy/pygame_sdl2"; + license = with lib.licenses; [ lgpl2 zlib ]; + maintainers = with lib.maintainers; [ raskin ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5356f1ed4730..606645f9bf85 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12387,8 +12387,6 @@ with pkgs; redsocks = callPackage ../tools/networking/redsocks { }; - renpy = callPackage ../development/interpreters/renpy { }; - rep = callPackage ../development/tools/rep { }; repseek = callPackage ../applications/science/biology/repseek { };