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