1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 09:02:46 +00:00
nixpkgs/pkgs/development/python-modules/pygame/default.nix
Vladimír Čunát 4a0952d2fa fix bad "licence" names
Mostly what I merged from @lovek323.
Such errors can be easily checked by
  nix-env -f . -qa \* --meta --xml --drv-path --show-trace >/dev/null
2013-07-04 18:16:34 +02:00

38 lines
958 B
Nix

{ stdenv, fetchurl, python, pkgconfig
, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg
}:
stdenv.mkDerivation {
name = "pygame-1.9.1";
src = fetchurl {
url = "http://www.pygame.org/ftp/pygame-1.9.1release.tar.gz";
sha256 = "0cyl0ww4fjlf289pjxa53q4klyn55ajvkgymw0qrdgp4593raq52";
};
buildInputs = [
python pkgconfig SDL SDL_image SDL_mixer SDL_ttf libpng libjpeg
];
patches = [ ./pygame-v4l.patch ];
configurePhase = ''
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
'';
buildPhase = "python setup.py build";
installPhase = "python setup.py install --prefix=$out";
meta = {
description = "Python library for games";
homepage = "http://www.pygame.org/";
license = "LGPLv2.1+";
};
}