Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pytest-golden / default.nix
blobdede2e30b9fdd8a5e4b3124e67b563b3d0955377
1 { lib
2 , atomicwrites
3 , buildPythonPackage
4 , fetchFromGitHub
5   #, hatchling
6 , ruamel-yaml
7 , poetry-core
8 , pytest
9 , pytest-asyncio
10 , pytestCheckHook
11 , pythonOlder
12 , pythonRelaxDepsHook
13 , testfixtures
16 buildPythonPackage rec {
17   pname = "pytest-golden";
18   version = "0.2.2";
19   format = "pyproject";
21   disabled = pythonOlder "3.7";
23   src = fetchFromGitHub {
24     owner = "oprypin";
25     repo = pname;
26     rev = "refs/tags/v${version}";
27     hash = "sha256-l5fXWDK6gWJc3dkYFTokI9tWvawMRnF0td/lSwqkYXE=";
28   };
30   postPatch = ''
31     substituteInPlace pyproject.toml \
32       --replace "poetry>=0.12" poetry-core \
33       --replace poetry.masonry.api poetry.core.masonry.api
34   '';
36   pythonRelaxDeps = [
37     "testfixtures"
38   ];
40   nativeBuildInputs = [
41     # hatchling used for > 0.2.2
42     poetry-core
43     pythonRelaxDepsHook
44   ];
46   buildInputs = [
47     pytest
48   ];
50   propagatedBuildInputs = [
51     atomicwrites
52     ruamel-yaml
53     testfixtures
54   ];
56   nativeCheckInputs = [
57     pytest-asyncio
58     pytestCheckHook
59   ];
61   pythonImportsCheck = [
62     "pytest_golden"
63   ];
65   meta = with lib; {
66     description = "Plugin for pytest that offloads expected outputs to data files";
67     homepage = "https://github.com/oprypin/pytest-golden";
68     license = licenses.mit;
69     maintainers = with maintainers; [ fab ];
70   };