From a75f182a47c08d9230175e0e9b3f26c5aa89a95b Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Wed, 22 Feb 2023 08:18:11 -0700 Subject: [PATCH 1/2] python3Packages.python-jwt: init at 1.3.1 --- .../python-modules/python-jwt/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/python-jwt/default.nix diff --git a/pkgs/development/python-modules/python-jwt/default.nix b/pkgs/development/python-modules/python-jwt/default.nix new file mode 100644 index 000000000000..c938832e29d8 --- /dev/null +++ b/pkgs/development/python-modules/python-jwt/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, cryptography +, freezegun +, pytestCheckHook +, pytest-cov +}: + +buildPythonPackage rec { + pname = "jwt"; + version = "1.3.1"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + inherit version; + owner = "GehirnInc"; + repo = "python-jwt"; + rev = "v${version}"; + sha256 = "sha256-N1J8yBVX/O+92cRp+q2gA2cFsd+C7JjUR9jo0VGoINg="; + }; + + postPatch = '' + # pytest-flake8 is incompatible flake8 6.0.0 and currently unmaintained + substituteInPlace setup.cfg --replace "--flake8" "" + ''; + + propagatedBuildInputs = [ + cryptography + ]; + + nativeCheckInputs = [ + pytestCheckHook + freezegun + pytest-cov + ]; + + pythonImportsCheck = [ "jwt" ]; + + meta = with lib; { + description = "JSON Web Token library for Python 3"; + homepage = "https://github.com/GehirnInc/python-jwt"; + license = licenses.asl20; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 267ceb9b8586..2344bbdd794b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6542,6 +6542,8 @@ self: super: with self; { nxt-python = callPackage ../development/python-modules/nxt-python { }; + python-jwt = callPackage ../development/python-modules/python-jwt { }; + python-nvd3 = callPackage ../development/python-modules/python-nvd3 { }; py-deprecate = callPackage ../development/python-modules/py-deprecate { }; From b01d0ee15c81cb13f7405543c7a2200e23f42236 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Wed, 22 Feb 2023 08:18:25 -0700 Subject: [PATCH 2/2] maintainers: add thornycrackers --- maintainers/maintainer-list.nix | 6 ++++++ pkgs/development/python-modules/python-jwt/default.nix | 1 + 2 files changed, 7 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index ff7d1a669179..eab4f0cda6cd 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -14745,6 +14745,12 @@ githubId = 1634990; name = "Tom McLaughlin"; }; + thornycrackers = { + email = "codyfh@gmail.com"; + github = "thornycrackers"; + githubId = 4313010; + name = "Cody Hiar"; + }; thoughtpolice = { email = "aseipp@pobox.com"; github = "thoughtpolice"; diff --git a/pkgs/development/python-modules/python-jwt/default.nix b/pkgs/development/python-modules/python-jwt/default.nix index c938832e29d8..43ff05814965 100644 --- a/pkgs/development/python-modules/python-jwt/default.nix +++ b/pkgs/development/python-modules/python-jwt/default.nix @@ -42,5 +42,6 @@ buildPythonPackage rec { description = "JSON Web Token library for Python 3"; homepage = "https://github.com/GehirnInc/python-jwt"; license = licenses.asl20; + maintainers = with maintainers; [ thornycrackers ]; }; }