From a7f98b836966cff672c900de99aec12f78f182b3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 14 Jan 2024 12:07:11 +0100 Subject: [PATCH 1/2] python311Packages.pyisemail: init at 2.0.1 Module for email validation https://github.com/michaelherold/pyIsEmail --- .../python-modules/pyisemail/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/pyisemail/default.nix diff --git a/pkgs/development/python-modules/pyisemail/default.nix b/pkgs/development/python-modules/pyisemail/default.nix new file mode 100644 index 000000000000..dfa60a85eaf6 --- /dev/null +++ b/pkgs/development/python-modules/pyisemail/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, dnspython +, fetchFromGitHub +, hatchling +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pyisemail"; + version = "2.0.1"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "michaelherold"; + repo = "pyIsEmail"; + rev = "refs/tags/v${version}"; + hash = "sha256-bJCaVUhvEAoQ8zMsbcb1Et728XHt+shEPhhBzPzY/vo="; + }; + + nativeBuildInputs = [ + hatchling + ]; + + propagatedBuildInputs = [ + dnspython + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pyisemail" + ]; + + meta = with lib; { + description = "Module for email validation"; + homepage = "https://github.com/michaelherold/pyIsEmail"; + changelog = "https://github.com/michaelherold/pyIsEmail/blob/${version}/CHANGELOG.rst"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 10046fa26d7e..191c2872f636 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9435,6 +9435,8 @@ self: super: with self; { pyinstaller-versionfile = callPackage ../development/python-modules/pyinstaller-versionfile { }; + pyisemail = callPackage ../development/python-modules/pyisemail { }; + pyisy = callPackage ../development/python-modules/pyisy { }; pyixapi = callPackage ../development/python-modules/pyixapi { }; From cf3f392abec5e0e41fb33991c3db9fd5d00a47af Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 14 Jan 2024 11:41:22 +0100 Subject: [PATCH 2/2] packj: init at 0.15-beta Tool to detect malicious/vulnerable open-source dependencies https://github.com/ossillate-inc/packj --- pkgs/by-name/pa/packj/package.nix | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 pkgs/by-name/pa/packj/package.nix diff --git a/pkgs/by-name/pa/packj/package.nix b/pkgs/by-name/pa/packj/package.nix new file mode 100644 index 000000000000..5e859823efdf --- /dev/null +++ b/pkgs/by-name/pa/packj/package.nix @@ -0,0 +1,62 @@ +{ lib +, python3 +, fetchFromGitHub +}: + +python3.pkgs.buildPythonApplication rec { + pname = "packj"; + version = "0.15-beta"; + pyproject = true; + + src = fetchFromGitHub { + owner = "ossillate-inc"; + repo = "packj"; + rev = "refs/tags/v${version}"; + hash = "sha256-OWcJE2Gtjgoj9bCGZcHDfAFLWRP4wdENeJAnILMdUXY="; + }; + + preBuild = '' + export HOME=$(mktemp -d) + ''; + + nativeBuildInputs = with python3.pkgs; [ + setuptools + wheel + ]; + + propagatedBuildInputs = with python3.pkgs; [ + asttokens + colorama + django + dnspython + esprima + func-timeout + github3-py + gitpython + networkx + protobuf + pyisemail + python-dateutil + python-gitlab + python-magic + pytz + pyyaml + rarfile + requests + six + tldextract + ]; + + pythonImportsCheck = [ + "packj" + ]; + + meta = with lib; { + description = "Tool to detect malicious/vulnerable open-source dependencies"; + homepage = "https://github.com/ossillate-inc/packj"; + changelog = "https://github.com/ossillate-inc/packj/releases/tag/v${version}"; + license = licenses.agpl3Only; + maintainers = with maintainers; [ fab ]; + mainProgram = "packj"; + }; +}