default.nix (809B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 python3Packages, 6 }: 7 8 python3Packages.buildPythonPackage { 9 pname = "pyimagequant"; 10 version = "0-unstable-2022-06-10"; 11 12 src = fetchFromGitHub { 13 owner = "wladich"; 14 repo = "pyimagequant"; 15 rev = "55a76cb90c75b598d40bd92cf61e6ec9aa846d1e"; 16 hash = "sha256-80SsAcN0iEaEEQpNTsi81n71DEQksSYiaSe/LQpqMbc="; 17 fetchSubmodules = true; 18 }; 19 20 postPatch = '' 21 # error: could not create 'build': File exists 22 rm BUILD 23 ''; 24 25 propagatedBuildInputs = with python3Packages; [ cython ]; 26 27 pythonImportsCheck = [ "imagequant" ]; 28 29 meta = { 30 description = "Python bindings for libimagequant (pngquant core)"; 31 homepage = "https://github.com/wladich/pyimagequant"; 32 license = lib.licenses.free; 33 maintainers = [ lib.maintainers.sikmir ]; 34 }; 35 }