2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-05-03 20:48:10 +00:00
|
|
|
, fetchPypi
|
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, canonicaljson
|
|
|
|
, unpaddedbase64
|
|
|
|
, pynacl
|
|
|
|
, typing-extensions
|
2021-05-03 20:48:10 +00:00
|
|
|
, setuptools-scm
|
|
|
|
, importlib-metadata
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "signedjson";
|
2021-04-26 19:14:03 +00:00
|
|
|
version = "1.1.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
patches = [
|
|
|
|
# Do not require importlib_metadata on python 3.8
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/matrix-org/python-signedjson/commit/c40c83f844fee3c1c7b0c5d1508f87052334b4e5.patch";
|
|
|
|
sha256 = "109f135zn9azg5h1ljw3v94kpvnzmlqz1aiknpl5hsqfa3imjca1";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
|
|
|
propagatedBuildInputs = [ canonicaljson unpaddedbase64 pynacl typing-extensions ]
|
|
|
|
++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://pypi.org/project/signedjson/";
|
|
|
|
description = "Sign JSON with Ed25519 signatures";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|