Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, mock 5, pillow 6, pytestCheckHook 7, pythonOlder 8}: 9 10buildPythonPackage rec { 11 pname = "pilkit"; 12 version = "unstable-2022-02-17"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchFromGitHub { 18 owner = "matthewwithanm"; 19 repo = pname; 20 rev = "09ffa2ad33318ae5fd3464655c14c7f01ffc2097"; 21 hash = "sha256-jtnFffKr0yhSv2jBmXzPa6iP2r41MbmGukfmnvgABhk="; 22 }; 23 24 buildInputs = [ 25 pillow 26 ]; 27 28 nativeCheckInputs = [ 29 mock 30 pytestCheckHook 31 ]; 32 33 postPatch = '' 34 substituteInPlace tox.ini \ 35 --replace " --cov --cov-report term-missing:skip-covered" "" 36 substituteInPlace pilkit/processors/resize.py \ 37 --replace "Image.ANTIALIAS" "Image.Resampling.LANCZOS" 38 ''; 39 40 pythonImportsCheck = [ 41 "pilkit" 42 ]; 43 44 meta = with lib; { 45 description = "A collection of utilities and processors for the Python Imaging Library"; 46 homepage = "https://github.com/matthewwithanm/pilkit/"; 47 license = licenses.bsd0; 48 maintainers = with maintainers; [ domenkozar ]; 49 }; 50}