mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
pygame: fix for python 3
This commit is contained in:
parent
2964212b45
commit
e072200d18
@ -1,9 +1,10 @@
|
||||
{ stdenv, fetchurl, buildPythonPackage, pkgconfig, smpeg, libX11
|
||||
{ stdenv, lib, fetchurl, buildPythonPackage, python, smpeg, libX11
|
||||
, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg, portmidi, isPy3k,
|
||||
}:
|
||||
|
||||
buildPythonPackage {
|
||||
name = "pygame-1.9.1";
|
||||
buildPythonPackage rec {
|
||||
name = "pygame-${version}";
|
||||
version = "1.9.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.pygame.org/ftp/pygame-1.9.1release.tar.gz";
|
||||
@ -11,30 +12,35 @@ buildPythonPackage {
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
pkgconfig SDL SDL_image SDL_mixer SDL_ttf libpng libjpeg
|
||||
SDL SDL_image SDL_mixer SDL_ttf libpng libjpeg
|
||||
smpeg portmidi libX11
|
||||
];
|
||||
|
||||
# /nix/store/94kswjlwqnc0k2bnwgx7ckx0w2kqzaxj-stdenv/setup: line 73: python: command not found
|
||||
disabled = isPy3k;
|
||||
|
||||
# Tests fail because of no audio device and display.
|
||||
doCheck = false;
|
||||
|
||||
patches = [ ./pygame-v4l.patch ];
|
||||
|
||||
preConfigure = stdenv.lib.concatMapStrings (dep: ''
|
||||
preConfigure = ''
|
||||
sed \
|
||||
-e "/origincdirs =/a'${dep.dev or dep.out}/include'," \
|
||||
-e "/origlibdirs =/aoriglibdirs += '${dep.lib or dep.out}/lib'," \
|
||||
-e "s/^origincdirs = .*/origincdirs = []/" \
|
||||
-e "s/^origlibdirs = .*/origlibdirs = []/" \
|
||||
-e "/\/include\/smpeg/d" \
|
||||
-i config_unix.py
|
||||
'') [ SDL_image SDL_mixer SDL_ttf libpng libjpeg portmidi libX11 ] + ''
|
||||
LOCALBASE=/ python config.py
|
||||
${lib.concatMapStrings (dep: ''
|
||||
sed \
|
||||
-e "/^origincdirs =/aorigincdirs += ['${lib.getDev dep}/include']" \
|
||||
-e "/^origlibdirs =/aoriglibdirs += ['${lib.getLib dep}/lib']" \
|
||||
-i config_unix.py
|
||||
'') buildInputs
|
||||
}
|
||||
LOCALBASE=/ ${python.interpreter} config.py
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "Python library for games";
|
||||
homepage = "http://www.pygame.org/";
|
||||
license = stdenv.lib.licenses.lgpl21Plus;
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user