2014-11-26 20:50:48 +00:00
|
|
|
{ stdenv, fetchurl, buildPythonPackage, pkgconfig, smpeg, libX11
|
2015-12-09 09:07:39 +00:00
|
|
|
, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg, portmidi, isPy3k,
|
2013-06-09 05:12:15 +01:00
|
|
|
}:
|
2008-10-06 23:07:53 +01:00
|
|
|
|
2014-11-26 20:50:48 +00:00
|
|
|
buildPythonPackage {
|
2013-06-09 05:12:15 +01:00
|
|
|
name = "pygame-1.9.1";
|
2007-08-09 18:33:18 +01:00
|
|
|
|
2008-01-30 17:20:48 +00:00
|
|
|
src = fetchurl {
|
2013-06-09 05:12:15 +01:00
|
|
|
url = "http://www.pygame.org/ftp/pygame-1.9.1release.tar.gz";
|
|
|
|
sha256 = "0cyl0ww4fjlf289pjxa53q4klyn55ajvkgymw0qrdgp4593raq52";
|
2007-08-09 18:33:18 +01:00
|
|
|
};
|
|
|
|
|
2013-06-09 05:12:15 +01:00
|
|
|
buildInputs = [
|
2014-11-26 20:50:48 +00:00
|
|
|
pkgconfig SDL SDL_image SDL_mixer SDL_ttf libpng libjpeg
|
|
|
|
smpeg portmidi libX11
|
2013-06-09 05:12:15 +01:00
|
|
|
];
|
|
|
|
|
2015-12-09 09:07:39 +00:00
|
|
|
# /nix/store/94kswjlwqnc0k2bnwgx7ckx0w2kqzaxj-stdenv/setup: line 73: python: command not found
|
|
|
|
disabled = isPy3k;
|
|
|
|
|
2016-04-15 04:35:11 +01:00
|
|
|
# Tests fail because of no audio device and display.
|
|
|
|
doCheck = false;
|
2013-06-09 05:12:15 +01:00
|
|
|
|
2016-04-15 04:35:11 +01:00
|
|
|
patches = [ ./pygame-v4l.patch ];
|
2013-06-09 05:12:15 +01:00
|
|
|
|
2016-04-15 04:35:11 +01:00
|
|
|
preConfigure = stdenv.lib.concatMapStrings (dep: ''
|
|
|
|
sed \
|
|
|
|
-e "/origincdirs =/a'${dep.dev or dep.out}/include'," \
|
|
|
|
-e "/origlibdirs =/aoriglibdirs += '${dep.lib or dep.out}/lib'," \
|
|
|
|
-i config_unix.py
|
|
|
|
'') [ SDL_image SDL_mixer SDL_ttf libpng libjpeg portmidi libX11 ] + ''
|
2014-11-26 20:50:48 +00:00
|
|
|
LOCALBASE=/ python config.py
|
2008-10-06 23:07:53 +01:00
|
|
|
'';
|
2007-08-09 18:33:18 +01:00
|
|
|
|
|
|
|
meta = {
|
2009-03-03 13:27:40 +00:00
|
|
|
description = "Python library for games";
|
2013-06-09 05:12:15 +01:00
|
|
|
homepage = "http://www.pygame.org/";
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.lgpl21Plus;
|
2007-08-09 18:33:18 +01:00
|
|
|
};
|
|
|
|
}
|