From 0e54c749114b79f6be78486086f5829b176fcba8 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Mon, 23 May 2016 04:48:14 +0300 Subject: [PATCH] pythonPackages.pygame-git: init at 2016-05-17 --- .../python-modules/pygame/default.nix | 3 ++ .../development/python-modules/pygame/git.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 3 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/pygame/git.nix diff --git a/pkgs/development/python-modules/pygame/default.nix b/pkgs/development/python-modules/pygame/default.nix index 0c193c0a4595..226b613a8b4b 100644 --- a/pkgs/development/python-modules/pygame/default.nix +++ b/pkgs/development/python-modules/pygame/default.nix @@ -16,6 +16,9 @@ buildPythonPackage rec { smpeg portmidi libX11 ]; + # http://ubuntuforums.org/showthread.php?t=1960262 + disabled = isPy3k; + # Tests fail because of no audio device and display. doCheck = false; diff --git a/pkgs/development/python-modules/pygame/git.nix b/pkgs/development/python-modules/pygame/git.nix new file mode 100644 index 000000000000..7f815454713d --- /dev/null +++ b/pkgs/development/python-modules/pygame/git.nix @@ -0,0 +1,45 @@ +{ stdenv, lib, fetchFromBitbucket, buildPythonPackage, python, smpeg, libX11 +, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg, portmidi +}: + +buildPythonPackage rec { + name = "pygame-${version}"; + version = "2016-05-17"; + + 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"; + homepage = "http://www.pygame.org/"; + license = licenses.lgpl21Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 080ab3427b61..50928dc76806 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -247,6 +247,8 @@ in modules // { pygame = callPackage ../development/python-modules/pygame { }; + pygame-git = callPackage ../development/python-modules/pygame/git.nix { }; + pygobject = callPackage ../development/python-modules/pygobject { }; pygobject3 = callPackage ../development/python-modules/pygobject/3.nix { };