Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pytest-cid / default.nix
blobeea7a6ead0ee5c006fa3c132571d3235e997fb61
1 { lib
2 , fetchFromGitHub
3 , buildPythonPackage
4 , pythonOlder
5 , flit-core
6 , py-cid
7 , pytestCheckHook
8 , pytest-cov
9 }:
11 buildPythonPackage rec {
12   pname = "pytest-cid";
13   version = "1.1.2";
14   format = "pyproject";
15   disabled = pythonOlder "3.5";
17   src = fetchFromGitHub {
18     owner = "ntninja";
19     repo = pname;
20     rev = "refs/tags/v${version}";
21     hash = "sha256-dcL/i5+scmdXh7lfE8+32w9PdHWf+mkunJL1vpJ5+Co=";
22   };
24   postPatch = ''
25     substituteInPlace pyproject.toml \
26       --replace "pytest >= 5.0, < 7.0" "pytest >= 5.0"
27   '';
29   nativeBuildInputs = [
30     flit-core
31   ];
33   propagatedBuildInputs = [
34     py-cid
35   ];
37   nativeCheckInputs = [
38     pytestCheckHook
39     pytest-cov
40   ];
42   pythonImportsCheck = [ "pytest_cid" ];
44   meta = with lib; {
45     homepage = "https://github.com/ntninja/pytest-cid";
46     description = "A simple wrapper around py-cid for easily writing tests involving CIDs in datastructures";
47     license = licenses.mpl20;
48     maintainers = with maintainers; [ Luflosi ];
49   };