2021-01-13 09:23:02 +00:00
|
|
|
{ lib, fetchFromGitHub
|
|
|
|
, python, buildPythonPackage, isPy27
|
|
|
|
, pygame, pyglet, pysdl2, six
|
|
|
|
}:
|
2019-10-16 21:20:44 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytmx";
|
2021-01-13 09:23:02 +00:00
|
|
|
version = "3.24.0";
|
|
|
|
|
|
|
|
disabled = isPy27;
|
2019-10-16 21:20:44 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
# The release was not git tagged.
|
|
|
|
owner = "bitcraft";
|
|
|
|
repo = "PyTMX";
|
2021-01-13 09:23:02 +00:00
|
|
|
rev = "eb96efea30d57b731654b2a167d86b8b553b147d";
|
|
|
|
sha256 = "1g1j4w75zw76p5f8m5v0hdigdlva2flf0ngyk8nvqcwzcl5vq5wc";
|
2019-10-16 21:20:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pygame pyglet pysdl2 six ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
2021-01-13 09:23:02 +00:00
|
|
|
# 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.lgpl3;
|
2020-08-15 14:25:59 +01:00
|
|
|
maintainers = with maintainers; [ oxzi ];
|
2019-10-16 21:20:44 +01:00
|
|
|
};
|
|
|
|
}
|