nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8 setuptools-dso,
9
10 # dependencies
11 click,
12 ordered-set,
13 pillow,
14 sortedcollections,
15}:
16
17buildPythonPackage rec {
18 pname = "tilequant";
19 version = "1.2.0";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "SkyTemple";
24 repo = "tilequant";
25 tag = version;
26 # Fetch tilequant source files
27 fetchSubmodules = true;
28 hash = "sha256-MgyKLwVdL2DRR8J88q7Q57rQiX4FTOlQ5rTY3UuhaJM=";
29 };
30
31 build-system = [
32 setuptools
33 setuptools-dso
34 ];
35
36 pythonRelaxDeps = [
37 "click"
38 ];
39 dependencies = [
40 click
41 ordered-set
42 pillow
43 sortedcollections
44 setuptools-dso
45 ];
46
47 doCheck = false; # there are no tests
48
49 pythonImportsCheck = [ "tilequant" ];
50
51 meta = {
52 description = "Tool for quantizing image colors using tile-based palette restrictions";
53 homepage = "https://github.com/SkyTemple/tilequant";
54 changelog = "https://github.com/SkyTemple/tilequant/releases/tag/${version}";
55 license = lib.licenses.gpl3Plus;
56 maintainers = with lib.maintainers; [ marius851000 ];
57 mainProgram = "tilequant";
58 };
59}