2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
varint,
|
|
|
|
base58,
|
|
|
|
netaddr,
|
|
|
|
idna,
|
|
|
|
py-cid,
|
|
|
|
py-multicodec,
|
|
|
|
pytestCheckHook,
|
2021-02-16 17:04:54 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "py-multiaddr";
|
|
|
|
version = "0.0.9";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-02-16 17:04:54 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "multiformats";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-cGM7iYQPP+UOkbTxRhzuED0pkcydFCO8vpx9wTc0/HI=";
|
2021-02-16 17:04:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace "'pytest-runner'," ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
varint
|
|
|
|
base58
|
|
|
|
netaddr
|
|
|
|
idna
|
|
|
|
py-cid
|
|
|
|
py-multicodec
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-02-16 17:04:54 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "multiaddr" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Composable and future-proof network addresses";
|
|
|
|
homepage = "https://github.com/multiformats/py-multiaddr";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with licenses; [
|
|
|
|
mit
|
|
|
|
asl20
|
|
|
|
];
|
2021-02-16 17:04:54 +00:00
|
|
|
maintainers = with maintainers; [ Luflosi ];
|
|
|
|
};
|
|
|
|
}
|