summary refs log tree commit diff
path: root/pkgs/development/python-modules/pytest-snapshot/default.nix
blob: cb58e101be7b6facd01bc1134b62fc213efce534 (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
, fetchFromGitHub
, packaging
, pytest
, setuptools-scm
, pytestCheckHook
}:

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

  src = fetchFromGitHub {
    owner = "joseph-roitman";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-xnfsB4wmsvqq5FfhLasSpxZh7+vhQsND6+Lxu0OuCvs=";
  };

  SETUPTOOLS_SCM_PRETEND_VERSION = version;

  nativeBuildInputs = [
    setuptools-scm
  ];

  buildInputs = [
    pytest
  ];

  propagatedBuildInputs = [
    packaging
  ];

  checkInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "pytest_snapshot"
  ];

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