2013-06-09 05:12:15 +01:00
|
|
|
{ stdenv, fetchurl, python, pkgconfig
|
|
|
|
, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg
|
|
|
|
}:
|
2008-10-06 23:07:53 +01:00
|
|
|
|
2008-01-30 17:20:48 +00:00
|
|
|
stdenv.mkDerivation {
|
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 = [
|
|
|
|
python pkgconfig SDL SDL_image SDL_mixer SDL_ttf libpng libjpeg
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [ ./pygame-v4l.patch ];
|
|
|
|
|
2008-10-06 23:07:53 +01:00
|
|
|
configurePhase = ''
|
2013-06-09 05:12:15 +01:00
|
|
|
for i in ${SDL_image} ${SDL_mixer} ${SDL_ttf} ${libpng} ${libjpeg}; do
|
|
|
|
sed -e "/origincdirs =/a'$i/include'," -i config_unix.py
|
|
|
|
sed -e "/origlibdirs =/aoriglibdirs += '$i/lib'," -i config_unix.py
|
|
|
|
done
|
|
|
|
|
|
|
|
yes Y | LOCALBASE=/ python config.py
|
2008-10-06 23:07:53 +01:00
|
|
|
'';
|
2007-08-09 18:33:18 +01:00
|
|
|
|
2013-06-09 05:12:15 +01:00
|
|
|
buildPhase = "python setup.py build";
|
2007-08-09 18:33:18 +01:00
|
|
|
|
2013-06-09 05:12:15 +01:00
|
|
|
installPhase = "python setup.py install --prefix=$out";
|
2008-10-06 23:47:20 +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/";
|
2013-07-04 17:13:20 +01:00
|
|
|
license = "LGPLv2.1+";
|
2007-08-09 18:33:18 +01:00
|
|
|
};
|
|
|
|
}
|