1{
2 lib,
3 buildPythonPackage,
4 click,
5 fetchPypi,
6 ordered-set,
7 pillow,
8 pythonOlder,
9 pythonRelaxDepsHook,
10 setuptools,
11 setuptools-dso,
12 sortedcollections,
13}:
14
15buildPythonPackage rec {
16 pname = "tilequant";
17 version = "1.1.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.9";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-uW1g3nlT6Y+1beifo/MOlGxsGL7on/jcAROxSddySHk=";
25 };
26
27 pythonRelaxDeps = [ "pillow" ];
28
29 build-system = [
30 pythonRelaxDepsHook
31 setuptools
32 ];
33
34 dependencies = [
35 click
36 ordered-set
37 pillow
38 sortedcollections
39 setuptools-dso
40 ];
41
42 doCheck = false; # there are no tests
43
44 pythonImportsCheck = [ "tilequant" ];
45
46 meta = with lib; {
47 description = "Tool for quantizing image colors using tile-based palette restrictions";
48 homepage = "https://github.com/SkyTemple/tilequant";
49 changelog = "https://github.com/SkyTemple/tilequant/releases/tag/${version}";
50 license = licenses.gpl3Plus;
51 maintainers = with maintainers; [ marius851000 ];
52 mainProgram = "tilequant";
53 };
54}