2016-05-23 02:48:14 +01:00
|
|
|
{ stdenv, lib, fetchFromBitbucket, buildPythonPackage, python, smpeg, libX11
|
|
|
|
, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg, portmidi
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-11-09 11:26:09 +00:00
|
|
|
pname = "pygame";
|
2016-05-23 02:48:14 +01:00
|
|
|
version = "2016-05-17";
|
2017-11-09 11:26:09 +00:00
|
|
|
name = pname + "-" + version;
|
2016-05-23 02:48:14 +01:00
|
|
|
|
|
|
|
src = fetchFromBitbucket {
|
|
|
|
owner = "pygame";
|
|
|
|
repo = "pygame";
|
|
|
|
rev = "575c7a74d85a37db7c645421c02cf0b6b78a889f";
|
|
|
|
sha256 = "1i5xqmw93kfidcji2wacgkm5y4mcnbksy8iimih0729k19rbhznc";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL SDL_image SDL_mixer SDL_ttf libpng libjpeg
|
|
|
|
smpeg portmidi libX11
|
|
|
|
];
|
|
|
|
|
|
|
|
# Tests fail because of no audio device and display.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sed \
|
|
|
|
-e "s/^origincdirs = .*/origincdirs = []/" \
|
|
|
|
-e "s/^origlibdirs = .*/origlibdirs = []/" \
|
|
|
|
-i config_unix.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 = with stdenv.lib; {
|
|
|
|
description = "Python library for games";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://www.pygame.org/;
|
2016-05-23 02:48:14 +01:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
platforms = platforms.linux;
|
2016-12-26 07:49:34 +00:00
|
|
|
broken = true;
|
2016-05-23 02:48:14 +01:00
|
|
|
};
|
|
|
|
}
|