2022-12-17 10:02:37 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gitpython
|
|
|
|
, click
|
|
|
|
, ordered-set
|
|
|
|
, pythonOlder
|
|
|
|
, pillow
|
|
|
|
, sortedcollections
|
|
|
|
}:
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tilequant";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.4.1.post0";
|
2022-12-17 10:02:37 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SkyTemple";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-7vU/AYnX7deOH3PjrseRIj9BUJMWzDlwR3UcMpBRyfc=";
|
|
|
|
fetchSubmodules = true;
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
buildInputs = [
|
|
|
|
gitpython
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
ordered-set
|
|
|
|
pillow
|
|
|
|
sortedcollections
|
|
|
|
];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
doCheck = false; # there are no tests
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"skytemple_tilequant"
|
|
|
|
];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Tool for quantizing image colors using tile-based palette restrictions";
|
2022-12-17 10:02:37 +00:00
|
|
|
homepage = "https://github.com/SkyTemple/tilequant";
|
2021-06-04 09:07:49 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2023-04-29 16:46:19 +00:00
|
|
|
maintainers = with maintainers; [ marius851000 xfix ];
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
}
|