mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
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
|
||||
, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg
|
||||
{ stdenv, fetchurl, buildPythonPackage, pkgconfig, smpeg, libX11
|
||||
, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg, portmidi
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
buildPythonPackage {
|
||||
name = "pygame-1.9.1";
|
||||
|
||||
src = fetchurl {
|
||||
@ -11,24 +11,21 @@ stdenv.mkDerivation {
|
||||
};
|
||||
|
||||
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 ];
|
||||
|
||||
configurePhase = ''
|
||||
for i in ${SDL_image} ${SDL_mixer} ${SDL_ttf} ${libpng} ${libjpeg}; do
|
||||
preConfigure = ''
|
||||
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 "/origlibdirs =/aoriglibdirs += '$i/lib'," -i config_unix.py
|
||||
done
|
||||
|
||||
yes Y | LOCALBASE=/ python config.py
|
||||
LOCALBASE=/ python config.py
|
||||
'';
|
||||
|
||||
buildPhase = "python setup.py build";
|
||||
|
||||
installPhase = "python setup.py install --prefix=$out";
|
||||
|
||||
meta = {
|
||||
description = "Python library for games";
|
||||
homepage = "http://www.pygame.org/";
|
||||
|
Loading…
Reference in New Issue
Block a user