From ff5ebf9e583d1588c5318a196940db8846076388 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 18 Oct 2024 01:08:32 +0200 Subject: [PATCH 1/2] python312Packages.cymruwhois: init at 1.6 Python client for the whois.cymru.com service https://github.com/JustinAzoff/python-cymruwhois --- .../python-modules/cymruwhois/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/cymruwhois/default.nix diff --git a/pkgs/development/python-modules/cymruwhois/default.nix b/pkgs/development/python-modules/cymruwhois/default.nix new file mode 100644 index 000000000000..8e399069f8f1 --- /dev/null +++ b/pkgs/development/python-modules/cymruwhois/default.nix @@ -0,0 +1,48 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + python-memcached, + pytestCheckHook, + pythonOlder, + setuptools, +}: + +buildPythonPackage rec { + pname = "cymruwhois"; + version = "1.6"; + pyproject = true; + + disabled = pythonOlder "3.10"; + + src = fetchFromGitHub { + owner = "JustinAzoff"; + repo = "python-cymruwhois"; + rev = "refs/tags/${version}"; + hash = "sha256-d9m668JYI9mxUycoVWyaDCR7SOca+ebymZxWtgSPWNU="; + }; + + build-system = [ setuptools ]; + + optional-dependencies = { + CACHE = [ python-memcached ]; + }; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "cymruwhois" ]; + + disabledTests = [ + # Tests require network access + "test_asn" + # AssertionError + "test_doctest" + ]; + + meta = { + description = "Python client for the whois.cymru.com service"; + homepage = "https://github.com/JustinAzoff/python-cymruwhois"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b0d9ca65a2fe..272c673fbff1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2802,6 +2802,8 @@ self: super: with self; { cymem = callPackage ../development/python-modules/cymem { }; + cymruwhois = callPackage ../development/python-modules/cymruwhois { }; + cypari2 = callPackage ../development/python-modules/cypari2 { }; cypherpunkpay = callPackage ../development/python-modules/cypherpunkpay { }; From a6ce630fd796bcff08bfbc166a5c96a154d36dd0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 18 Oct 2024 01:10:09 +0200 Subject: [PATCH 2/2] dnsdiag: init at 2.5.0 DNS Measurement, Troubleshooting and Security Auditing Toolset https://github.com/farrokhi/dnsdiag --- pkgs/by-name/dn/dnsdiag/package.nix | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 pkgs/by-name/dn/dnsdiag/package.nix diff --git a/pkgs/by-name/dn/dnsdiag/package.nix b/pkgs/by-name/dn/dnsdiag/package.nix new file mode 100644 index 000000000000..013d7a75259f --- /dev/null +++ b/pkgs/by-name/dn/dnsdiag/package.nix @@ -0,0 +1,40 @@ +{ + lib, + python3, + fetchFromGitHub, +}: + +python3.pkgs.buildPythonApplication rec { + pname = "dnsdiag"; + version = "2.5.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "farrokhi"; + repo = "dnsdiag"; + rev = "refs/tags/v${version}"; + hash = "sha256-qUbHwbLPDyy24GNu3dDJQKV3B71q1ODNMyRFIWwyRuo="; + }; + + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ + cryptography + cymruwhois + dnspython + h2 + httpx + ]; + + # Project has no tests + doCheck = false; + + meta = { + description = "DNS Measurement, Troubleshooting and Security Auditing Toolset"; + homepage = "https://github.com/farrokhi/dnsdiag"; + changelog = "https://github.com/farrokhi/dnsdiag/releases/tag/v${version}"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "dnsdiag"; + }; +}