1{
2 lib,
3 buildPythonPackage,
4 fetchgit,
5 pillow,
6 poetry-core,
7 pytestCheckHook,
8 pytest-benchmark,
9 pythonOlder,
10}:
11let
12 owner = "whtsky";
13 repo = "pixelmatch-py";
14in
15buildPythonPackage rec {
16 pname = "pixelmatch";
17 version = "0.3.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchgit {
23 url = "https://github.com/whtsky/pixelmatch-py.git";
24 tag = "v${version}";
25 hash = "sha256-xq0LT7v83YRz0baw24iDXiuUxiNPMEsiZNIewsH3JPw=";
26 fetchLFS = true;
27 };
28
29 build-system = [
30 poetry-core
31 ];
32
33 nativeCheckInputs = [
34 pillow
35 pytest-benchmark
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [ "pixelmatch" ];
40
41 meta = {
42 description = "A pixel-level image comparison library";
43 homepage = "https://github.com/whtsky/pixelmatch-py";
44 changelog = "https://github.com/whtsky/pixelmatch-py/tree/v${version}#changelog";
45 license = with lib.licenses; [ isc ];
46 teams = [ lib.teams.geospatial ];
47 };
48}