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