2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2018-10-29 16:55:38 +00:00
|
|
|
, buildPythonPackage
|
2021-04-28 13:38:29 +00:00
|
|
|
, fetchPypi
|
|
|
|
, fetchpatch
|
2018-10-29 16:55:38 +00:00
|
|
|
, canonicaljson
|
|
|
|
, unpaddedbase64
|
|
|
|
, pynacl
|
2020-02-18 14:26:12 +00:00
|
|
|
, typing-extensions
|
2021-04-28 13:38:29 +00:00
|
|
|
, setuptools-scm
|
|
|
|
, importlib-metadata
|
|
|
|
, pythonOlder
|
2018-10-29 16:55:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "signedjson";
|
2021-03-24 17:41:56 +00:00
|
|
|
version = "1.1.1";
|
2018-10-29 16:55:38 +00:00
|
|
|
|
2021-04-28 13:38:29 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m";
|
2018-10-29 16:55:38 +00:00
|
|
|
};
|
|
|
|
|
2021-04-28 13:38:29 +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 ];
|
2018-10-29 16:55:38 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://pypi.org/project/signedjson/";
|
2018-10-29 16:55:38 +00:00
|
|
|
description = "Sign JSON with Ed25519 signatures";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|