2021-02-16 17:04:54 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, varint
|
|
|
|
, base58
|
|
|
|
, netaddr
|
|
|
|
, idna
|
|
|
|
, py-cid
|
|
|
|
, py-multicodec
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-16 17:04:54 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "multiaddr" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Composable and future-proof network addresses";
|
|
|
|
homepage = "https://github.com/multiformats/py-multiaddr";
|
|
|
|
license = with licenses; [ mit asl20 ];
|
|
|
|
maintainers = with maintainers; [ Luflosi ];
|
|
|
|
};
|
|
|
|
}
|