about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pytest-snapshot/default.nix
blob: aafe4b5b93ec8c8fd5410df11f8d51d8dd67f616 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  packaging,
  pytest,
  setuptools-scm,
  pytest7CheckHook,
  pythonOlder,
}:

buildPythonPackage rec {
  pname = "pytest-snapshot";
  version = "0.9.0";
  format = "setuptools";

  disabled = pythonOlder "3.5";

  src = fetchFromGitHub {
    owner = "joseph-roitman";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-0PZu9wL29iEppLxxbl4D0E4WfOHe61KUUld003cRBRU=";
  };

  nativeBuildInputs = [ setuptools-scm ];

  buildInputs = [ pytest ];

  propagatedBuildInputs = [ packaging ];

  nativeCheckInputs = [
    # https://github.com/joseph-roitman/pytest-snapshot/issues/71
    pytest7CheckHook
  ];

  pythonImportsCheck = [ "pytest_snapshot" ];

  meta = with lib; {
    description = "Plugin to enable snapshot testing with pytest";
    homepage = "https://github.com/joseph-roitman/pytest-snapshot/";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}