diff --git a/pkgs/development/python-modules/exrex/default.nix b/pkgs/development/python-modules/exrex/default.nix index 0d51a9862ee7..2ef58acc9093 100644 --- a/pkgs/development/python-modules/exrex/default.nix +++ b/pkgs/development/python-modules/exrex/default.nix @@ -1,31 +1,35 @@ { lib , buildPythonPackage , fetchFromGitHub -, fetchpatch +, pythonOlder }: buildPythonPackage rec { pname = "exrex"; - version = "unstable-2021-04-22"; + version = "0.11.0"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "asciimoo"; repo = "exrex"; - rev = "9a66706e7582a9cf31c4121629c9035e329bbe21"; - sha256 = "sha256-g31tHY+LzGxwBmUpSa0DV7ruLfYwmuDg+XyBxMZRa9U="; + # https://github.com/asciimoo/exrex/issues/68 + rev = "239e4da37ff3a66d8b4b398d189299ae295594c3"; + hash = "sha256-Tn/XIIy2wnob+1FmP9bdD9+gHLQZDofF2c1FqOijKWA="; }; - patches = [ - (fetchpatch { - # https://github.com/asciimoo/exrex/pull/65 - url = "https://github.com/asciimoo/exrex/commit/44712bfb1350a509581a5834d9fa8aebcd9434db.patch"; - hash = "sha256-thKotSvdVdVjXaG/AhsXmW51FHLOYUeYTYw8SA/k2t4="; - }) - ]; + postPatch = '' + substituteInPlace setup.py \ + --replace "version=about['__version__']," "version='${version}'," + ''; # Projec thas no released tests doCheck = false; - pythonImportsCheck = [ "exrex" ]; + + pythonImportsCheck = [ + "exrex" + ]; meta = with lib; { description = "Irregular methods on regular expressions"; diff --git a/pkgs/development/python-modules/myjwt/default.nix b/pkgs/development/python-modules/myjwt/default.nix index 807e205eb0d3..a54ab560a235 100644 --- a/pkgs/development/python-modules/myjwt/default.nix +++ b/pkgs/development/python-modules/myjwt/default.nix @@ -6,6 +6,7 @@ , cryptography , exrex , fetchFromGitHub +, poetry-core , pyopenssl , pyperclip , pytest-mock @@ -18,18 +19,28 @@ buildPythonPackage rec { pname = "myjwt"; - version = "1.6.0"; - format = "setuptools"; + version = "1.6.1"; + format = "pyproject"; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "mBouamama"; repo = "MyJWT"; rev = "refs/tags/${version}"; - sha256 = "sha256-A9tsQ6L+y3doL5pJbau3yKnmQtX2IPXWyW/YCLhS7nc="; + hash = "sha256-qdDA8DpJ9kAPTvCkQcPBHNlUqxwsS0vAESglvUygXhg="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "1.6.0" "${version}" \ + --replace 'cryptography = "^39.0.2"' 'cryptography = "^39.0.0"' + ''; + + nativeBuildInputs = [ + poetry-core + ]; + propagatedBuildInputs = [ click colorama @@ -47,11 +58,6 @@ buildPythonPackage rec { requests-mock ]; - postPatch = '' - # Remove all version pinning (E.g., tornado==5.1.1 -> tornado) - sed -i -e "s/==[0-9.]*//" requirements.txt - ''; - pythonImportsCheck = [ "myjwt" ]; @@ -59,6 +65,7 @@ buildPythonPackage rec { meta = with lib; { description = "CLI tool for testing vulnerabilities of JSON Web Tokens (JWT)"; homepage = "https://github.com/mBouamama/MyJWT"; + changelog = "https://github.com/tyki6/MyJWT/releases/tag/${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; # Build failures