1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, gitpython
5, click
6, ordered-set
7, pythonOlder
8, pillow
9, sortedcollections
10}:
11
12buildPythonPackage rec {
13 pname = "tilequant";
14 version = "0.4.1.post0";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "SkyTemple";
21 repo = pname;
22 rev = version;
23 hash = "sha256-7vU/AYnX7deOH3PjrseRIj9BUJMWzDlwR3UcMpBRyfc=";
24 fetchSubmodules = true;
25 };
26
27 buildInputs = [
28 gitpython
29 ];
30
31 propagatedBuildInputs = [
32 click
33 ordered-set
34 pillow
35 sortedcollections
36 ];
37
38 doCheck = false; # there are no tests
39
40 pythonImportsCheck = [
41 "skytemple_tilequant"
42 ];
43
44 meta = with lib; {
45 description = "Tool for quantizing image colors using tile-based palette restrictions";
46 homepage = "https://github.com/SkyTemple/tilequant";
47 license = licenses.gpl3Plus;
48 maintainers = with maintainers; [ marius851000 xfix ];
49 };
50}