nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pygame,
6 pyglet,
7 pysdl2,
8 pytestCheckHook,
9 setuptools-scm,
10}:
11
12buildPythonPackage {
13 pname = "pytmx";
14 version = "3.32";
15
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "bitcraft";
20 repo = "PyTMX";
21 # Latest release was not tagged. However, the changes of this commit - the
22 # current HEAD - are part of the 3.32 release on PyPI.
23 rev = "7af805bc916e666fdf7165d5d6ba4c0eddfcde18";
24 hash = "sha256-zRrMk812gAZoCAeYq4Uz/1RwJ0lJc7szyZ3IQDYZOd4=";
25 };
26
27 build-system = [
28 setuptools-scm
29 ];
30
31 dependencies = [
32 pygame
33 pyglet
34 pysdl2
35 ];
36
37 pythonImportsCheck = [
38 "pytmx.pytmx"
39 "pytmx.util_pygame"
40 "pytmx.util_pyglet"
41 "pytmx.util_pysdl2"
42 ];
43
44 nativeCheckInputs = [ pytestCheckHook ];
45
46 disabledTests = [
47 # AssertionError on the property name
48 "test_contains_reserved_property_name"
49 ];
50
51 meta = {
52 homepage = "https://github.com/bitcraft/PyTMX";
53 description = "Python library to read Tiled Map Editor's TMX maps";
54 license = lib.licenses.lgpl3Plus;
55 maintainers = with lib.maintainers; [ oxzi ];
56 };
57}