diff --git a/pkgs/development/python-modules/exrex/default.nix b/pkgs/development/python-modules/exrex/default.nix new file mode 100644 index 00000000000..8c980c8d00f --- /dev/null +++ b/pkgs/development/python-modules/exrex/default.nix @@ -0,0 +1,25 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "exrex"; + version = "0.10.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "1wq8nyycdprxl9q9y1pfhkbca4rvysj45h1xn7waybl3v67v3f1z"; + }; + + # Projec thas no released tests + doCheck = false; + pythonImportsCheck = [ "exrex" ]; + + meta = with lib; { + description = "Irregular methods on regular expressions"; + homepage = "https://github.com/asciimoo/exrex"; + license = with licenses; [ agpl3Plus ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/myjwt/default.nix b/pkgs/development/python-modules/myjwt/default.nix new file mode 100644 index 00000000000..d80e66e07bf --- /dev/null +++ b/pkgs/development/python-modules/myjwt/default.nix @@ -0,0 +1,58 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchFromGitHub +, click +, colorama +, cryptography +, exrex +, pyopenssl +, pyperclip +, questionary +, requests +, pytestCheckHook +, pytest-mock +, requests-mock +}: + +buildPythonPackage rec { + pname = "myjwt"; + version = "1.4.0"; + + src = fetchFromGitHub { + owner = "mBouamama"; + repo = "MyJWT"; + rev = version; + sha256 = "1n3lvdrzp6wbbcygjwa7xar2jnhjnrz7a9khmn2phhkkngxm5rc4"; + }; + + patches = [ ./pinning.patch ]; + + propagatedBuildInputs = [ + click + colorama + cryptography + exrex + pyopenssl + pyperclip + questionary + requests + ]; + + checkInputs = [ + pytestCheckHook + pytest-mock + requests-mock + ]; + + pythonImportsCheck = [ "myjwt" ]; + + meta = with lib; { + description = "CLI tool for testing vulnerabilities on Json Web Token(JWT)"; + homepage = "https://github.com/mBouamama/MyJWT"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + # Build failures + broken = stdenv.isDarwin; + }; +} diff --git a/pkgs/development/python-modules/myjwt/pinning.patch b/pkgs/development/python-modules/myjwt/pinning.patch new file mode 100644 index 00000000000..abae9d0e2ec --- /dev/null +++ b/pkgs/development/python-modules/myjwt/pinning.patch @@ -0,0 +1,21 @@ +diff --git a/requirements.txt b/requirements.txt +index 3017e02..2b465db 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -1,8 +1,8 @@ +-click==7.1.2 +-colorama==0.4.4 +-cryptography==3.3.1 +-exrex==0.10.5 +-pyOpenSSL==20.0.1 +-pyperclip==1.8.1 +-questionary==1.9.0 +-requests==2.25.1 ++click ++colorama ++cryptography ++exrex ++pyOpenSSL ++pyperclip ++questionary ++requests diff --git a/pkgs/development/python-modules/questionary/default.nix b/pkgs/development/python-modules/questionary/default.nix new file mode 100644 index 00000000000..ecb33f6adb1 --- /dev/null +++ b/pkgs/development/python-modules/questionary/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry +, prompt_toolkit +, pytest-cov +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "questionary"; + version = "1.9.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "tmbo"; + repo = pname; + rev = version; + sha256 = "1x748bz7l2r48031dj6vr6jvvac28pv6vx1bina4lz60h1qac1kf"; + }; + + nativeBuildInputs = [ poetry ]; + + propagatedBuildInputs = [ prompt_toolkit ]; + + checkInputs = [ + pytest-cov + pytestCheckHook + ]; + + pythonImportsCheck = [ "questionary" ]; + + meta = with lib; { + description = "Python library to build command line user prompts"; + homepage = "https://github.com/bachya/regenmaschine"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f9a1752edc3..7270853d84e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2157,6 +2157,8 @@ in { exifread = callPackage ../development/python-modules/exifread { }; + exrex = callPackage ../development/python-modules/exrex { }; + extras = callPackage ../development/python-modules/extras { }; eyeD3 = callPackage ../development/python-modules/eyed3 { }; @@ -4296,6 +4298,8 @@ in { mygpoclient = callPackage ../development/python-modules/mygpoclient { }; + myjwt = callPackage ../development/python-modules/myjwt { }; + mypy = callPackage ../development/python-modules/mypy { }; mypy-extensions = callPackage ../development/python-modules/mypy/extensions.nix { }; @@ -6763,6 +6767,8 @@ in { querystring_parser = callPackage ../development/python-modules/querystring-parser { }; + questionary = callPackage ../development/python-modules/questionary { }; + queuelib = callPackage ../development/python-modules/queuelib { }; r2pipe = callPackage ../development/python-modules/r2pipe { };