diff options
author | Nikolay Amiantov <ab@fmap.me> | 2016-05-23 04:35:07 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2016-05-23 04:38:10 +0300 |
commit | e072200d1804f584d8fc0d0a8442a6a85be1331c (patch) | |
tree | 7cd9941d53f7fca8a8e788ead05f6d9afc28a6f0 /pkgs/development/python-modules | |
parent | 2964212b45fc665dc526ba34471e7c7c78d222e6 (diff) |
pygame: fix for python 3
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r-- | pkgs/development/python-modules/pygame/default.nix | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/pygame/default.nix b/pkgs/development/python-modules/pygame/default.nix index 0928fa6ae7d1..0c193c0a4595 100644 --- a/pkgs/development/python-modules/pygame/default.nix +++ b/pkgs/development/python-modules/pygame/default.nix @@ -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; }; } |