depot/third_party/nixpkgs/pkgs/development/python-modules/pytest-cid/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

50 lines
1,003 B
Nix

{ lib
, fetchFromGitHub
, buildPythonPackage
, pythonOlder
, flit-core
, py-cid
, pytestCheckHook
, pytest-cov
}:
buildPythonPackage rec {
pname = "pytest-cid";
version = "1.1.2";
format = "pyproject";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "ntninja";
repo = pname;
rev = "refs/tags/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
];
pythonImportsCheck = [ "pytest_cid" ];
meta = with lib; {
homepage = "https://github.com/ntninja/pytest-cid";
description = "A simple wrapper around py-cid for easily writing tests involving CIDs in datastructures";
license = licenses.mpl20;
maintainers = with maintainers; [ Luflosi ];
};
}