pygame: fix build, add all deps, use buildPythonPackage
This commit is contained in:
parent
3ff9a7507a
commit
9047f389bf
@ -1,8 +1,8 @@
|
|||||||
{ stdenv, fetchurl, python, pkgconfig
|
{ stdenv, fetchurl, buildPythonPackage, pkgconfig, smpeg, libX11
|
||||||
, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg
|
, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg, portmidi
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
buildPythonPackage {
|
||||||
name = "pygame-1.9.1";
|
name = "pygame-1.9.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
@ -11,24 +11,21 @@ stdenv.mkDerivation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
python pkgconfig SDL SDL_image SDL_mixer SDL_ttf libpng libjpeg
|
pkgconfig SDL SDL_image SDL_mixer SDL_ttf libpng libjpeg
|
||||||
|
smpeg portmidi libX11
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [ ./pygame-v4l.patch ];
|
patches = [ ./pygame-v4l.patch ];
|
||||||
|
|
||||||
configurePhase = ''
|
preConfigure = ''
|
||||||
for i in ${SDL_image} ${SDL_mixer} ${SDL_ttf} ${libpng} ${libjpeg}; do
|
for i in ${SDL_image} ${SDL_mixer} ${SDL_ttf} ${libpng} ${libjpeg} ${portmidi} ${libX11}; do
|
||||||
sed -e "/origincdirs =/a'$i/include'," -i config_unix.py
|
sed -e "/origincdirs =/a'$i/include'," -i config_unix.py
|
||||||
sed -e "/origlibdirs =/aoriglibdirs += '$i/lib'," -i config_unix.py
|
sed -e "/origlibdirs =/aoriglibdirs += '$i/lib'," -i config_unix.py
|
||||||
done
|
done
|
||||||
|
|
||||||
yes Y | LOCALBASE=/ python config.py
|
LOCALBASE=/ python config.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = "python setup.py build";
|
|
||||||
|
|
||||||
installPhase = "python setup.py install --prefix=$out";
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Python library for games";
|
description = "Python library for games";
|
||||||
homepage = "http://www.pygame.org/";
|
homepage = "http://www.pygame.org/";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user