2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, base58
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2020-11-12 09:05:59 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, morphys
|
2021-02-13 14:23:35 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, six
|
|
|
|
, varint
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "py-multihash";
|
2021-02-13 14:23:35 +00:00
|
|
|
version = "2.0.1";
|
2023-07-15 17:15:38 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
disabled = pythonOlder "3.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "multiformats";
|
|
|
|
repo = pname;
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-z1lmSypGCMFWJNzNgV9hx/IStyXbpd5jvrptFpewuOA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pytest-runner', " ""
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
base58
|
|
|
|
morphys
|
|
|
|
six
|
|
|
|
varint
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-13 14:23:35 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"multihash"
|
|
|
|
];
|
2020-11-12 09:05:59 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Self describing hashes - for future proofing";
|
|
|
|
homepage = "https://github.com/multiformats/py-multihash";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ rakesh4g ];
|
|
|
|
};
|
2020-09-25 04:45:31 +00:00
|
|
|
}
|