summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pytmx/default.nix
blob: d29dffa189a6f33cc5975918dcc8979f60eac689 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pygame,
  pyglet,
  pysdl2,
  pytestCheckHook,
  setuptools-scm,
}:

buildPythonPackage {
  pname = "pytmx";
  version = "3.32";

  pyproject = true;

  src = fetchFromGitHub {
    owner = "bitcraft";
    repo = "PyTMX";
    # Latest release was not tagged. However, the changes of this commit - the
    # current HEAD - are part of the 3.32 release on PyPI.
    rev = "7af805bc916e666fdf7165d5d6ba4c0eddfcde18";
    hash = "sha256-zRrMk812gAZoCAeYq4Uz/1RwJ0lJc7szyZ3IQDYZOd4=";
  };

  build-system = [
    setuptools-scm
  ];

  dependencies = [
    pygame
    pyglet
    pysdl2
  ];

  pythonImportsCheck = [
    "pytmx.pytmx"
    "pytmx.util_pygame"
    "pytmx.util_pyglet"
    "pytmx.util_pysdl2"
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTests = [
    # AssertionError on the property name
    "test_contains_reserved_property_name"
  ];

  meta = {
    homepage = "https://github.com/bitcraft/PyTMX";
    description = "Python library to read Tiled Map Editor's TMX maps";
    license = lib.licenses.lgpl3Plus;
    maintainers = with lib.maintainers; [ oxzi ];
  };
}