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