pygame-sdl2: reformat with nixfmt-rfc-style, modernize
This commit is contained in:
@@ -1,12 +1,28 @@
|
|||||||
{ lib, buildPythonPackage, fetchurl, isPy27, renpy
|
{
|
||||||
, cython_0, SDL2, SDL2_image, SDL2_ttf, SDL2_mixer, libjpeg, libpng, setuptools }:
|
lib,
|
||||||
|
buildPythonPackage,
|
||||||
buildPythonPackage rec {
|
fetchurl,
|
||||||
|
isPy27,
|
||||||
|
renpy,
|
||||||
|
cython_0,
|
||||||
|
SDL2,
|
||||||
|
SDL2_image,
|
||||||
|
SDL2_ttf,
|
||||||
|
SDL2_mixer,
|
||||||
|
libjpeg,
|
||||||
|
libpng,
|
||||||
|
setuptools,
|
||||||
|
}:
|
||||||
|
let
|
||||||
pname = "pygame-sdl2";
|
pname = "pygame-sdl2";
|
||||||
version = "2.1.0";
|
version = "2.1.0";
|
||||||
pyproject = true;
|
|
||||||
renpy_version = renpy.base_version;
|
renpy_version = renpy.base_version;
|
||||||
|
in
|
||||||
|
|
||||||
|
buildPythonPackage {
|
||||||
|
inherit pname version;
|
||||||
name = "${pname}-${version}-${renpy_version}";
|
name = "${pname}-${version}-${renpy_version}";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://www.renpy.org/dl/${renpy_version}/pygame_sdl2-${version}+renpy${renpy_version}.tar.gz";
|
url = "https://www.renpy.org/dl/${renpy_version}/pygame_sdl2-${version}+renpy${renpy_version}.tar.gz";
|
||||||
@@ -24,27 +40,26 @@ buildPythonPackage rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
SDL2.dev cython_0 setuptools
|
SDL2.dev
|
||||||
|
cython_0
|
||||||
|
setuptools
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
SDL2 SDL2_image SDL2_ttf SDL2_mixer
|
SDL2
|
||||||
libjpeg libpng
|
SDL2_image
|
||||||
|
SDL2_ttf
|
||||||
|
SDL2_mixer
|
||||||
|
libjpeg
|
||||||
|
libpng
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
doCheck = isPy27; # python3 tests are non-functional
|
doCheck = isPy27; # python3 tests are non-functional
|
||||||
|
|
||||||
postInstall = ''
|
meta = {
|
||||||
( cd "$out"/include/python*/ ;
|
|
||||||
ln -s pygame-sdl2 pygame_sdl2 || true ; )
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "A reimplementation of parts of pygame API using SDL2";
|
description = "A reimplementation of parts of pygame API using SDL2";
|
||||||
homepage = "https://github.com/renpy/pygame_sdl2";
|
homepage = "https://github.com/renpy/pygame_sdl2";
|
||||||
# Some parts are also available under Zlib License
|
license = with lib.licenses; [ lgpl2 zlib ];
|
||||||
license = licenses.lgpl2;
|
maintainers = with lib.maintainers; [ raskin ];
|
||||||
maintainers = with maintainers; [ raskin ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user