nixpkgs/pkgs/development/python-modules/pytmx/default.nix

41 lines
918 B
Nix
Raw Normal View History

{ lib, fetchFromGitHub
, python, buildPythonPackage, isPy27
, pygame, pyglet, pysdl2, six
}:
2019-10-16 21:20:44 +01:00
buildPythonPackage rec {
pname = "pytmx";
version = "3.25";
disabled = isPy27;
2019-10-16 21:20:44 +01:00
src = fetchFromGitHub {
owner = "bitcraft";
repo = "PyTMX";
rev = version;
sha256 = "0v07zhvzvl2qcqhjzgfzm8hgayq38gaqcxxkyhlq9n0hlk93nm97";
2019-10-16 21:20:44 +01:00
};
propagatedBuildInputs = [ pygame pyglet pysdl2 six ];
pythonImportsCheck = [
"pytmx.pytmx"
"pytmx.util_pygame"
"pytmx.util_pyglet"
"pytmx.util_pysdl2"
];
2019-10-16 21:20:44 +01:00
checkPhase = ''
# Change into the test directory due to a relative resource path.
cd tests/pytmx
${python.interpreter} -m unittest test_pytmx
2019-10-16 21:20:44 +01:00
'';
meta = with lib; {
homepage = "https://github.com/bitcraft/PyTMX";
description = "Python library to read Tiled Map Editor's TMX maps";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ oxzi ];
2019-10-16 21:20:44 +01:00
};
}