mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
mock,
|
|
pillow,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pilkit";
|
|
version = "3.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "matthewwithanm";
|
|
repo = pname;
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-NmD9PFCkz3lz4AnGoQUpkt35q0zvDVm+kx7lVDFBcHk=";
|
|
};
|
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
propagatedBuildInputs = [ pillow ];
|
|
|
|
nativeCheckInputs = [
|
|
mock
|
|
pytestCheckHook
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace tox.ini \
|
|
--replace " --cov --cov-report term-missing:skip-covered" ""
|
|
substituteInPlace pilkit/processors/resize.py \
|
|
--replace "Image.ANTIALIAS" "Image.Resampling.LANCZOS"
|
|
'';
|
|
|
|
pythonImportsCheck = [ "pilkit" ];
|
|
|
|
meta = with lib; {
|
|
description = "Collection of utilities and processors for the Python Imaging Library";
|
|
homepage = "https://github.com/matthewwithanm/pilkit/";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ domenkozar ];
|
|
};
|
|
}
|