2014-11-26 21:50:48 +01:00
|
|
|
{ stdenv, fetchurl, buildPythonPackage, pkgconfig, smpeg, libX11
|
|
|
|
, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg, portmidi
|
2013-06-09 06:12:15 +02:00
|
|
|
}:
|
2008-10-07 00:07:53 +02:00
|
|
|
|
2014-11-26 21:50:48 +01:00
|
|
|
buildPythonPackage {
|
2013-06-09 06:12:15 +02:00
|
|
|
name = "pygame-1.9.1";
|
2007-08-09 19:33:18 +02:00
|
|
|
|
2008-01-30 18:20:48 +01:00
|
|
|
src = fetchurl {
|
2013-06-09 06:12:15 +02:00
|
|
|
url = "http://www.pygame.org/ftp/pygame-1.9.1release.tar.gz";
|
|
|
|
sha256 = "0cyl0ww4fjlf289pjxa53q4klyn55ajvkgymw0qrdgp4593raq52";
|
2007-08-09 19:33:18 +02:00
|
|
|
};
|
|
|
|
|
2013-06-09 06:12:15 +02:00
|
|
|
buildInputs = [
|
2014-11-26 21:50:48 +01:00
|
|
|
pkgconfig SDL SDL_image SDL_mixer SDL_ttf libpng libjpeg
|
|
|
|
smpeg portmidi libX11
|
2013-06-09 06:12:15 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
patches = [ ./pygame-v4l.patch ];
|
|
|
|
|
2014-11-26 21:50:48 +01:00
|
|
|
preConfigure = ''
|
|
|
|
for i in ${SDL_image} ${SDL_mixer} ${SDL_ttf} ${libpng} ${libjpeg} ${portmidi} ${libX11}; do
|
2013-06-09 06:12:15 +02:00
|
|
|
sed -e "/origincdirs =/a'$i/include'," -i config_unix.py
|
|
|
|
sed -e "/origlibdirs =/aoriglibdirs += '$i/lib'," -i config_unix.py
|
|
|
|
done
|
|
|
|
|
2014-11-26 21:50:48 +01:00
|
|
|
LOCALBASE=/ python config.py
|
2008-10-07 00:07:53 +02:00
|
|
|
'';
|
2007-08-09 19:33:18 +02:00
|
|
|
|
|
|
|
meta = {
|
2009-03-03 14:27:40 +01:00
|
|
|
description = "Python library for games";
|
2013-06-09 06:12:15 +02:00
|
|
|
homepage = "http://www.pygame.org/";
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.lgpl21Plus;
|
2007-08-09 19:33:18 +02:00
|
|
|
};
|
|
|
|
}
|