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
|
|
|
|
|
|
|
let
|
|
|
|
aikku93-tilequant = fetchFromGitHub {
|
|
|
|
owner = "SkyTemple";
|
|
|
|
repo = "aikku93-tilequant";
|
|
|
|
rev = "6604e0906edff384b6c8d4cde03e6601731f66fd";
|
|
|
|
sha256 = "0w19h3n2i0xriqsy0b0rifjgbv4hqd7gl78fw0cappkrdykij5r1";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tilequant";
|
|
|
|
version = "0.4.0.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;
|
|
|
|
sha256 = "189af203iay3inj1bbgm3hh1fshn879bcm28ypbvfp27fy7j5b25";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
cp -R --no-preserve=mode ${aikku93-tilequant} __aikku93_tilequant
|
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ xfix ];
|
|
|
|
};
|
|
|
|
}
|