2021-02-16 17:04:54 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, pytestCheckHook
|
|
|
|
, base58
|
|
|
|
, py-multibase
|
|
|
|
, py-multicodec
|
|
|
|
, morphys
|
|
|
|
, py-multihash
|
|
|
|
, hypothesis
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "py-cid";
|
|
|
|
version = "0.3.0";
|
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ipld";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-aN7ee25ghKKa90+FoMDCdGauToePc5AzDLV3tONvh4U=";
|
2021-02-16 17:04:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "base58>=1.0.2,<2.0" "base58>=1.0.2" \
|
|
|
|
--replace "py-multihash>=0.2.0,<1.0.0" "py-multihash>=0.2.0" \
|
|
|
|
--replace "'pytest-runner'," ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
base58
|
|
|
|
py-multibase
|
|
|
|
py-multicodec
|
|
|
|
morphys
|
|
|
|
py-multihash
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-16 17:04:54 +00:00
|
|
|
pytestCheckHook
|
|
|
|
hypothesis
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "cid" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Self-describing content-addressed identifiers for distributed systems implementation in Python";
|
|
|
|
homepage = "https://github.com/ipld/py-cid";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ Luflosi ];
|
|
|
|
};
|
|
|
|
}
|