2016-05-23 02:35:07 +01:00
|
|
|
{ stdenv, lib, fetchurl, buildPythonPackage, python, 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
|
|
|
|
2016-05-23 02:35:07 +01:00
|
|
|
buildPythonPackage rec {
|
|
|
|
name = "pygame-${version}";
|
|
|
|
version = "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 = [
|
2016-05-23 02:35:07 +01:00
|
|
|
SDL SDL_image SDL_mixer SDL_ttf libpng libjpeg
|
2014-11-26 20:50:48 +00:00
|
|
|
smpeg portmidi libX11
|
2013-06-09 05:12:15 +01:00
|
|
|
];
|
|
|
|
|
2016-05-23 02:48:14 +01:00
|
|
|
# http://ubuntuforums.org/showthread.php?t=1960262
|
|
|
|
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-05-23 02:35:07 +01:00
|
|
|
preConfigure = ''
|
2016-04-15 04:35:11 +01:00
|
|
|
sed \
|
2016-05-23 02:35:07 +01:00
|
|
|
-e "s/^origincdirs = .*/origincdirs = []/" \
|
|
|
|
-e "s/^origlibdirs = .*/origlibdirs = []/" \
|
|
|
|
-e "/\/include\/smpeg/d" \
|
2016-04-15 04:35:11 +01:00
|
|
|
-i config_unix.py
|
2016-05-23 02:35:07 +01:00
|
|
|
${lib.concatMapStrings (dep: ''
|
|
|
|
sed \
|
|
|
|
-e "/^origincdirs =/aorigincdirs += ['${lib.getDev dep}/include']" \
|
|
|
|
-e "/^origlibdirs =/aoriglibdirs += ['${lib.getLib dep}/lib']" \
|
|
|
|
-i config_unix.py
|
|
|
|
'') buildInputs
|
|
|
|
}
|
|
|
|
LOCALBASE=/ ${python.interpreter} config.py
|
2008-10-06 23:07:53 +01:00
|
|
|
'';
|
2007-08-09 18:33:18 +01:00
|
|
|
|
2016-05-23 02:35:07 +01:00
|
|
|
meta = with stdenv.lib; {
|
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/";
|
2016-05-23 02:35:07 +01:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
platforms = platforms.linux;
|
2007-08-09 18:33:18 +01:00
|
|
|
};
|
|
|
|
}
|