about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pygame_sdl2
diff options
context:
space:
mode:
authorwisut hantanong <wizzup@gmail.com>2017-07-14 21:30:45 +0700
committerJörg Thalheim <joerg@thalheim.io>2017-07-15 17:40:54 +0100
commit3e75b0fd129bb1fda3736fc6950181097534f34b (patch)
treec6a45b362db743f8ed99731438603bf7dab67ebe /pkgs/development/python-modules/pygame_sdl2
parent6506c41fd9d6b02d6378cf9c8b88109823802ef5 (diff)
python.pkgs.pygame_sdl2: move to separate expression
Diffstat (limited to 'pkgs/development/python-modules/pygame_sdl2')
-rw-r--r--pkgs/development/python-modules/pygame_sdl2/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pygame_sdl2/default.nix b/pkgs/development/python-modules/pygame_sdl2/default.nix
new file mode 100644
index 0000000000000..6f6163bb35e8b
--- /dev/null
+++ b/pkgs/development/python-modules/pygame_sdl2/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, pkgs, buildPythonPackage, fetchFromGitHub
+, cython, SDL2, SDL2_image, SDL2_ttf, SDL2_mixer, libjpeg, libpng }:
+
+buildPythonPackage rec {
+  pname = "pygame_sdl2";
+  version = "6.99.10.1227";
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "renpy";
+    repo = "${pname}";
+    rev = "renpy-${version}";
+    sha256 = "10n6janvqh5adn7pcijqwqfh234sybjz788kb8ac6b4l11hy2lx1";
+  };
+
+  buildInputs = [
+    SDL2 SDL2_image SDL2_ttf SDL2_mixer
+    cython libjpeg libpng
+  ];
+
+  postInstall = ''
+    ( cd "$out"/include/python*/ ;
+      ln -s pygame-sdl2 pygame_sdl2 || true ; )
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A reimplementation of parts of pygame API using SDL2";
+    homepage    = "https://github.com/renpy/pygame_sdl2";
+    # Some parts are also available under Zlib License
+    license     = licenses.lgpl2;
+    maintainers = with maintainers; [ raskin ];
+  };
+}