1{ lib, buildPythonPackage, fetchFromGitHub, GitPython, click, ordered-set, pillow, sortedcollections }: 2 3let 4 aikku93-tilequant = fetchFromGitHub { 5 owner = "SkyTemple"; 6 repo = "aikku93-tilequant"; 7 rev = "6604e0906edff384b6c8d4cde03e6601731f66fd"; 8 sha256 = "0w19h3n2i0xriqsy0b0rifjgbv4hqd7gl78fw0cappkrdykij5r1"; 9 }; 10in 11buildPythonPackage rec { 12 pname = "tilequant"; 13 version = "0.4.0.post0"; 14 15 src = fetchFromGitHub { 16 owner = "SkyTemple"; 17 repo = pname; 18 rev = version; 19 sha256 = "189af203iay3inj1bbgm3hh1fshn879bcm28ypbvfp27fy7j5b25"; 20 }; 21 22 postPatch = '' 23 cp -R --no-preserve=mode ${aikku93-tilequant} __aikku93_tilequant 24 ''; 25 26 buildInputs = [ GitPython ]; 27 propagatedBuildInputs = [ click ordered-set pillow sortedcollections ]; 28 29 doCheck = false; # there are no tests 30 pythonImportsCheck = [ "skytemple_tilequant" ]; 31 32 meta = with lib; { 33 homepage = "https://github.com/SkyTemple/tilequant"; 34 description = "Tool for quantizing image colors using tile-based palette restrictions"; 35 license = licenses.gpl3Plus; 36 maintainers = with maintainers; [ xfix ]; 37 }; 38}