python3.pkgs.signedjson: fix build (#120669)

This commit is contained in:
ajs124 2021-04-28 15:38:29 +02:00 committed by GitHub
parent e1af1d1f81
commit 10d24382cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 7 deletions

View File

@ -1,24 +1,36 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchPypi
, fetchpatch
, canonicaljson , canonicaljson
, unpaddedbase64 , unpaddedbase64
, pynacl , pynacl
, typing-extensions , typing-extensions
, setuptools-scm
, importlib-metadata
, pythonOlder
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "signedjson"; pname = "signedjson";
version = "1.1.1"; version = "1.1.1";
src = fetchFromGitHub { src = fetchPypi {
owner = "matrix-org"; inherit pname version;
repo = "python-${pname}"; sha256 = "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m";
rev = "v${version}";
sha256 = "0y5c9v4vx9hqpnca892gc9b4xgs4gp5xk6l1wma5ciz8zswp9yfs";
}; };
propagatedBuildInputs = [ canonicaljson unpaddedbase64 pynacl typing-extensions ]; 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 ];
meta = with lib; { meta = with lib; {
homepage = "https://pypi.org/project/signedjson/"; homepage = "https://pypi.org/project/signedjson/";