summary refs log tree commit diff
path: root/pkgs/development/python-modules/pytmx
diff options
context:
space:
mode:
authorgeistesk <github.jyf300hj@0x21.biz>2019-10-16 22:20:44 +0200
committerJon <jonringer@users.noreply.github.com>2019-10-17 08:23:13 -0700
commitab42edccc2d5f3f677a56e70e2a751d5034587b7 (patch)
tree3e6e41814d74cb415ad2bc21baf54c478a306b3f /pkgs/development/python-modules/pytmx
parente6167ceaa274339cb4a7ca76d2a1d9eaa8c3215f (diff)
downloadnixpkgs-ab42edccc2d5f3f677a56e70e2a751d5034587b7.tar
nixpkgs-ab42edccc2d5f3f677a56e70e2a751d5034587b7.tar.gz
nixpkgs-ab42edccc2d5f3f677a56e70e2a751d5034587b7.tar.bz2
nixpkgs-ab42edccc2d5f3f677a56e70e2a751d5034587b7.tar.lz
nixpkgs-ab42edccc2d5f3f677a56e70e2a751d5034587b7.tar.xz
nixpkgs-ab42edccc2d5f3f677a56e70e2a751d5034587b7.tar.zst
nixpkgs-ab42edccc2d5f3f677a56e70e2a751d5034587b7.zip
pytmx: init at 3.21.7
Diffstat (limited to 'pkgs/development/python-modules/pytmx')
-rw-r--r--pkgs/development/python-modules/pytmx/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pytmx/default.nix b/pkgs/development/python-modules/pytmx/default.nix
new file mode 100644
index 00000000000..0745aacc378
--- /dev/null
+++ b/pkgs/development/python-modules/pytmx/default.nix
@@ -0,0 +1,33 @@
+{ lib, fetchFromGitHub, isPy3k, buildPythonPackage, pygame, pyglet, pysdl2, six }:
+
+buildPythonPackage rec {
+  pname = "pytmx";
+  version = "3.21.7";
+
+  src = fetchFromGitHub {
+    # The release was not git tagged.
+    owner = "bitcraft";
+    repo = "PyTMX";
+    rev = "38519b94ab9a2db7cacb8e18de4d83750ec6fac2";
+    sha256 = "0p2gc6lgian1yk4qvhbkxfkmndf9ras70amigqzzwr02y2jvq7j8";
+  };
+
+  propagatedBuildInputs = [ pygame pyglet pysdl2 six ];
+
+  # The tests are failing for Python 2.7.
+  doCheck = isPy3k;
+  checkPhase = ''
+    # The following test imports an example file from the current working
+    # directory. Thus, we're cd'ing into the test directory.
+
+    cd tests/
+    python -m unittest test_pytmx
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/bitcraft/PyTMX";
+    description = "Python library to read Tiled Map Editor's TMX maps";
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ geistesk ];
+  };
+}