about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pixelmatch/default.nix
blob: b6a7b74701cbb97690f608c8883078d80d0bc0b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{ lib
, buildPythonPackage
, fetchgit
, pillow
, poetry-core
, pytest-benchmark
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "pixelmatch";
  version = "0.2.3";
  format = "pyproject";

  disabled = pythonOlder "3.6";

  # Test fixtures are stored in LFS
  src = fetchgit {
    url = "https://github.com/whtsky/pixelmatch-py";
    rev = "v${version}";
    hash = "sha256-/zRQhwz+HjT0Hs4CunsqHxHWEtoIH9qMBowRb0Pps6Y=";
    fetchLFS = true;
  };

  nativeBuildInputs = [
    poetry-core
  ];

  nativeCheckInputs = [
    pillow
    pytest-benchmark
    pytestCheckHook
  ];

  pytestFlagsArray = [
    "--benchmark-disable"
  ];

  pythonImportsCheck = [
    "pixelmatch"
  ];

  meta = with lib; {
    description = "Pixel-level image comparison library";
    homepage = "https://github.com/whtsky/pixelmatch-py";
    license = licenses.isc;
    maintainers = with maintainers; [ ];
  };
}