2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchgit
|
|
|
|
, pillow
|
|
|
|
, poetry-core
|
|
|
|
, pytest-benchmark
|
|
|
|
, pytest-mypy
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pixelmatch";
|
2022-01-13 20:06:32 +00:00
|
|
|
version = "0.2.3";
|
2021-02-13 14:23:35 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
# Test fixtures are stored in LFS
|
2021-02-13 14:23:35 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/whtsky/pixelmatch-py";
|
|
|
|
rev = "v${version}";
|
2022-01-13 20:06:32 +00:00
|
|
|
hash = "sha256-/zRQhwz+HjT0Hs4CunsqHxHWEtoIH9qMBowRb0Pps6Y=";
|
2021-02-13 14:23:35 +00:00
|
|
|
fetchLFS = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2022-01-13 20:06:32 +00:00
|
|
|
pillow
|
2021-02-13 14:23:35 +00:00
|
|
|
pytest-benchmark
|
|
|
|
pytest-mypy
|
2022-01-13 20:06:32 +00:00
|
|
|
pytestCheckHook
|
2021-02-13 14:23:35 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
2022-01-13 20:06:32 +00:00
|
|
|
# Incompatible types in assignment
|
|
|
|
#"--mypy"
|
2021-02-13 14:23:35 +00:00
|
|
|
"--benchmark-disable"
|
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pixelmatch"
|
|
|
|
];
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
meta = with lib; {
|
2022-01-13 20:06:32 +00:00
|
|
|
description = "Pixel-level image comparison library";
|
2021-02-13 14:23:35 +00:00
|
|
|
homepage = "https://github.com/whtsky/pixelmatch-py";
|
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ petabyteboy ];
|
|
|
|
};
|
|
|
|
}
|