about summary refs log tree commit diff
path: root/pkgs/applications/networking/dyndns
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2024-05-23 10:32:11 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2024-05-23 10:32:11 +0200
commited907ddac82fceb5701ee82eb36835de44dddfa8 (patch)
tree401a074d9a079e08b513d5e096ff89d74cea7a61 /pkgs/applications/networking/dyndns
parent1349027dbc4f7fe5752b7c5172b0df77c92aa672 (diff)
dyndnsc: refactor
Diffstat (limited to 'pkgs/applications/networking/dyndns')
-rw-r--r--pkgs/applications/networking/dyndns/dyndnsc/default.nix49
1 files changed, 37 insertions, 12 deletions
diff --git a/pkgs/applications/networking/dyndns/dyndnsc/default.nix b/pkgs/applications/networking/dyndns/dyndnsc/default.nix
index 6a9a57d67c3b1..1e4e3fde1e392 100644
--- a/pkgs/applications/networking/dyndns/dyndnsc/default.nix
+++ b/pkgs/applications/networking/dyndns/dyndnsc/default.nix
@@ -1,33 +1,57 @@
-{ lib, python3Packages, fetchPypi, stdenv }:
+{ lib
+, stdenv
+, python3Packages
+, fetchPypi
+}:
 
 python3Packages.buildPythonApplication rec {
   pname = "dyndnsc";
   version = "0.6.1";
+  pyproject = true;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "13078d29eea2f9a4ca01f05676c3309ead5e341dab047e0d51c46f23d4b7fbb4";
+    hash = "sha256-EweNKe6i+aTKAfBWdsMwnq1eNB2rBH4NUcRvI9S3+7Q=";
   };
 
   postPatch = ''
-    substituteInPlace setup.py --replace "bottle==" "bottle>="
+    substituteInPlace setup.py \
+      --replace-fail '"pytest-runner"' ""
   '';
 
-  nativeBuildInputs = with python3Packages; [ pytest-runner ];
-  propagatedBuildInputs = with python3Packages; [
+  pythonRelaxDeps = [
+    "bottle"
+  ];
+
+  build-system = with python3Packages; [
+    setuptools
+  ];
+
+  nativeBuildInputs = with python3Packages; [
+    pythonRelaxDepsHook
+  ];
+
+  dependencies = with python3Packages; [
     daemonocle
     dnspython
+    json-logging
     netifaces
     requests
-    json-logging
     setuptools
   ];
-  nativeCheckInputs = with python3Packages; [ bottle mock pytest-console-scripts pytestCheckHook ];
+
+  nativeCheckInputs = with python3Packages; [
+    bottle
+    pytest-console-scripts
+    pytestCheckHook
+  ];
 
   disabledTests = [
     # dnswanip connects to an external server to discover the
     # machine's IP address.
     "dnswanip"
+    # AssertionError
+    "test_null_dummy"
   ] ++ lib.optionals stdenv.isDarwin [
     # The tests that spawn a server using Bottle cannot be run on
     # macOS or Windows as the default multiprocessing start method
@@ -42,20 +66,21 @@ python3Packages.buildPythonApplication rec {
 
   meta = with lib; {
     description = "Dynamic DNS update client with support for multiple protocols";
-    mainProgram = "dyndnsc";
     longDescription = ''
       Dyndnsc is a command line client for sending updates to Dynamic
-      DNS (DDNS, DynDNS) services.  It supports multiple protocols and
-      services, and it has native support for IPv6.  The configuration
-      file allows using foreign, but compatible services.  Dyndnsc
+      DNS (DDNS, DynDNS) services. It supports multiple protocols and
+      services, and it has native support for IPv6. The configuration
+      file allows using foreign, but compatible services. Dyndnsc
       ships many different IP detection mechanisms, support for
       configuring multiple services in one place and it has a daemon
-      mode for running unattended.  It has a plugin system to provide
+      mode for running unattended. It has a plugin system to provide
       external notification services.
     '';
     homepage = "https://github.com/infothrill/python-dyndnsc";
+    changelog = "https://github.com/infothrill/python-dyndnsc/releases/tag/${version}";
     license = licenses.mit;
     maintainers = with maintainers; [ AluisioASG ];
+    mainProgram = "dyndnsc";
     platforms = platforms.unix;
   };
 }