about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pixelmatch/default.nix
blob: d7473a05bccad26d3bdf8ca3d6e21255e8fc0512 (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
{ lib, buildPythonPackage, fetchgit, poetry-core, pytestCheckHook, pytest-benchmark, pytest-mypy, pillow }:

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

  # test fixtures are stored in LFS
  src = fetchgit {
    url = "https://github.com/whtsky/pixelmatch-py";
    rev = "v${version}";
    sha256 = "1dsix507dxqik9wvgzscvf2pifbg7gx74krrsalqbfcmm7d1i7xl";
    fetchLFS = true;
  };

  nativeBuildInputs = [
    poetry-core
  ];

  checkInputs = [
    pytestCheckHook
    pytest-benchmark
    pytest-mypy
    pillow
  ];

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

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