11{
2- stdenv ,
32 lib ,
4- substituteAll ,
5- fetchpatch ,
6- fetchFromGitHub ,
3+ stdenv ,
74 buildPythonPackage ,
8- pythonOlder ,
5+ fetchFromGitHub ,
6+ substituteAll ,
7+ fontconfig ,
8+ python ,
99
1010 # build-system
1111 cython ,
1212 setuptools ,
13+
14+ # nativeBuildInputs
15+ SDL2 ,
1316 pkg-config ,
1417
15- # native dependencies
16- AppKit ,
17- fontconfig ,
18+ # buildInputs
1819 freetype ,
1920 libjpeg ,
2021 libpng ,
2122 libX11 ,
2223 portmidi ,
23- SDL2 ,
2424 SDL2_image ,
2525 SDL2_mixer ,
2626 SDL2_ttf ,
27-
28- # tests
29- python ,
3027} :
3128
3229buildPythonPackage rec {
3330 pname = "pygame" ;
34- version = "2.6.0 " ;
31+ version = "2.6.1 " ;
3532 pyproject = true ;
3633
37- disabled = pythonOlder "3.6" ;
38-
3934 src = fetchFromGitHub {
40- owner = pname ;
41- repo = pname ;
42- rev = "refs/tags/ ${ version } " ;
35+ owner = "pygame" ;
36+ repo = "pygame" ;
37+ tag = version ;
4338 # Unicode file names lead to different checksums on HFS+ vs. other
4439 # filesystems because of unicode normalisation. The documentation
4540 # has such files and will be removed.
46- hash = "sha256-wNXcmH0IIuAOoomIdmhAPxe4TiEzes3Kq+Vth2r4/IA =" ;
41+ hash = "sha256-paSDF0oPogq0g0HSDRagGu0OfsqIku6q4GGAMveGntk =" ;
4742 postFetch = "rm -rf $out/docs/reST" ;
4843 } ;
4944
@@ -76,13 +71,16 @@ buildPythonPackage rec {
7671 --replace-fail /usr/X11/bin/fc-list ${ fontconfig } /bin/fc-list
7772 '' ;
7873
79- nativeBuildInputs = [
74+ build-system = [
8075 cython
81- pkg-config
82- SDL2
8376 setuptools
8477 ] ;
8578
79+ nativeBuildInputs = [
80+ SDL2
81+ pkg-config
82+ ] ;
83+
8684 buildInputs = [
8785 freetype
8886 libjpeg
@@ -93,7 +91,7 @@ buildPythonPackage rec {
9391 SDL2_image
9492 SDL2_mixer
9593 SDL2_ttf
96- ] ++ lib . optionals stdenv . hostPlatform . isDarwin [ AppKit ] ;
94+ ] ;
9795
9896 preConfigure = ''
9997 ${ python . pythonOnBuildForHost . interpreter } buildconfig/config.py
@@ -110,17 +108,20 @@ buildPythonPackage rec {
110108 export SDL_VIDEODRIVER=dummy
111109 export SDL_AUDIODRIVER=disk
112110
113- ${ python . interpreter } -m pygame.tests -v --exclude opengl,timing --time_out 300
111+ ${ python . interpreter } -m pygame.tests -v \
112+ --exclude opengl,timing \
113+ --time_out 300
114114
115115 runHook postCheck
116116 '' ;
117117 pythonImportsCheck = [ "pygame" ] ;
118118
119- meta = with lib ; {
119+ meta = {
120120 description = "Python library for games" ;
121121 homepage = "https://www.pygame.org/" ;
122- license = licenses . lgpl21Plus ;
123- maintainers = with maintainers ; [ emilytrau ] ;
124- platforms = platforms . unix ;
122+ changelog = "https://github.com/pygame/pygame/releases/tag/${ src . tag } " ;
123+ license = lib . licenses . lgpl21Plus ;
124+ maintainers = with lib . maintainers ; [ emilytrau ] ;
125+ platforms = lib . platforms . unix ;
125126 } ;
126127}
0 commit comments