1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 pythonOlder,
6 flit-core,
7 py-cid,
8 pytestCheckHook,
9 pytest-cov-stub,
10}:
11
12buildPythonPackage rec {
13 pname = "pytest-cid";
14 version = "1.1.2";
15 format = "pyproject";
16 disabled = pythonOlder "3.5";
17
18 src = fetchFromGitHub {
19 owner = "ntninja";
20 repo = "pytest-cid";
21 tag = "v${version}";
22 hash = "sha256-dcL/i5+scmdXh7lfE8+32w9PdHWf+mkunJL1vpJ5+Co=";
23 };
24
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace "pytest >= 5.0, < 7.0" "pytest >= 5.0"
28 '';
29
30 nativeBuildInputs = [ flit-core ];
31
32 propagatedBuildInputs = [ py-cid ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 pytest-cov-stub
37 ];
38
39 pythonImportsCheck = [ "pytest_cid" ];
40
41 meta = with lib; {
42 homepage = "https://github.com/ntninja/pytest-cid";
43 description = "Simple wrapper around py-cid for easily writing tests involving CIDs in datastructures";
44 license = licenses.mpl20;
45 maintainers = with maintainers; [ Luflosi ];
46 };
47}