From 100f49fed46889beff47c2ab698d7f8f096d0a2e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 6 Dec 2024 22:02:46 +0100 Subject: [PATCH] dnsvalidator: init at 0.1-unstable-2023-01-17 Tool to maintain a list of IPv4 DNS servers https://github.com/vortexau/dnsvalidator --- pkgs/by-name/dn/dnsvalidator/package.nix | 48 ++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pkgs/by-name/dn/dnsvalidator/package.nix diff --git a/pkgs/by-name/dn/dnsvalidator/package.nix b/pkgs/by-name/dn/dnsvalidator/package.nix new file mode 100644 index 0000000000000..34077e9f1d261 --- /dev/null +++ b/pkgs/by-name/dn/dnsvalidator/package.nix @@ -0,0 +1,48 @@ +{ + lib, + python3, + fetchFromGitHub, +}: + +python3.pkgs.buildPythonApplication rec { + pname = "dnsvalidator"; + version = "0.1-unstable-2023-01-17"; + pyproject = true; + + src = fetchFromGitHub { + owner = "vortexau"; + repo = "dnsvalidator"; + # https://github.com/vortexau/dnsvalidator/issues/21 + rev = "146c9b0e24d806b25697fbb541bf9f19a3086d41"; + hash = "sha256-8pbBEtkiaGYp5ekkA1UUZ+5DX/iarxKdpQn5hM3cmvA="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace-fail "'pytest-runner'" "" + ''; + + pythonRemoveDeps = [ "ipaddress" ]; + + build-system = with python3.pkgs; [ setuptools ]; + + dependencies = with python3.pkgs; [ + colorclass + dnspython + netaddr + requests + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "dnsvalidator" ]; + + meta = { + description = "Tool to maintain a list of IPv4 DNS servers"; + homepage = "https://github.com/vortexau/dnsvalidator"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "dnsvalidator"; + }; +}