about summary refs log tree commit diff
path: root/pkgs/tools/networking/octodns/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/networking/octodns/default.nix')
-rw-r--r--pkgs/tools/networking/octodns/default.nix63
1 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/tools/networking/octodns/default.nix b/pkgs/tools/networking/octodns/default.nix
new file mode 100644
index 000000000000..56226c29d0e9
--- /dev/null
+++ b/pkgs/tools/networking/octodns/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+, setuptools
+, wheel
+, pytestCheckHook
+, dnspython
+, fqdn
+, idna
+, natsort
+, python-dateutil
+, pyyaml
+, python
+, runCommand
+}:
+
+buildPythonPackage rec {
+  pname = "octodns";
+  version = "1.4.0";
+  pyproject = true;
+
+  disabled = pythonOlder "3.8";
+
+  src = fetchFromGitHub {
+    owner = "octodns";
+    repo = "octodns";
+    rev = "v${version}";
+    hash = "sha256-l4JGodbUmFxHFeEaxgClEozHcbyYP0F2yj5gDqV88IA=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+    wheel
+    pytestCheckHook
+  ];
+
+  propagatedBuildInputs = [
+    dnspython
+    fqdn
+    idna
+    natsort
+    python-dateutil
+    pyyaml
+  ];
+
+  pythonImportsCheck = [ "octodns" ];
+
+  passthru.withProviders = ps: let
+    pyEnv = python.withPackages ps;
+  in runCommand "octodns-with-providers" { } ''
+    mkdir -p $out/bin
+    ln -st $out/bin ${pyEnv}/bin/octodns-*
+  '';
+
+  meta = with lib; {
+    description = "Tools for managing DNS across multiple providers";
+    homepage = "https://github.com/octodns/octodns";
+    changelog = "https://github.com/octodns/octodns/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ janik ];
+  };
+}