summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pytest-cid/default.nix
blob: 2a8fa24ff707898d4b75290ea16d93579e41d35f (plain)
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,
  fetchFromGitHub,
  buildPythonPackage,
  flit-core,
  py-cid,
  pytestCheckHook,
  pytest-cov-stub,
}:

buildPythonPackage rec {
  pname = "pytest-cid";
  version = "1.1.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "ntninja";
    repo = "pytest-cid";
    tag = "v${version}";
    hash = "sha256-dcL/i5+scmdXh7lfE8+32w9PdHWf+mkunJL1vpJ5+Co=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace "pytest >= 5.0, < 7.0" "pytest >= 5.0"
  '';

  nativeBuildInputs = [ flit-core ];

  propagatedBuildInputs = [ py-cid ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-cov-stub
  ];

  pythonImportsCheck = [ "pytest_cid" ];

  meta = {
    homepage = "https://github.com/ntninja/pytest-cid";
    description = "Simple wrapper around py-cid for easily writing tests involving CIDs in datastructures";
    license = lib.licenses.mpl20;
    maintainers = with lib.maintainers; [ Luflosi ];
  };
}