aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2020-12-03 18:56:10 +0100
committerGitHub <noreply@github.com>2020-12-03 18:56:10 +0100
commit555641c50462d5ab87afe9ceab7df9d8c7755a37 (patch)
tree5bc14071e5beaa609562ac108b733e24012bf81a
parentc273a4be19846512aabb466d7ba9ed1727e73c1b (diff)
parentb0d6df575c32f8cebd352c342657e1928648bdf4 (diff)
Merge pull request #105715 from AluisioASG/aasg/dyndnsc
-rw-r--r--pkgs/applications/networking/dyndns/dyndnsc/default.nix59
-rw-r--r--pkgs/development/python-modules/daemonocle/default.nix42
-rw-r--r--pkgs/top-level/all-packages.nix2
-rw-r--r--pkgs/top-level/python-packages.nix2
4 files changed, 105 insertions, 0 deletions
diff --git a/pkgs/applications/networking/dyndns/dyndnsc/default.nix b/pkgs/applications/networking/dyndns/dyndnsc/default.nix
new file mode 100644
index 000000000000..65d463057416
--- /dev/null
+++ b/pkgs/applications/networking/dyndns/dyndnsc/default.nix
@@ -0,0 +1,59 @@
+{ stdenv, lib, python3Packages }:
+
+python3Packages.buildPythonApplication rec {
+ pname = "dyndnsc";
+ version = "0.5.1";
+
+ src = python3Packages.fetchPypi {
+ inherit pname version;
+ hash = "sha256-Sy6U0XhIQ9mPmznmWKqoyqE34vaE84fwlivouaF7Dd0=";
+ };
+
+ postPatch = ''
+ substituteInPlace setup.py --replace "bottle==" "bottle>="
+ '';
+
+ nativeBuildInputs = with python3Packages; [ pytestrunner ];
+ propagatedBuildInputs = with python3Packages; [
+ daemonocle
+ dnspython
+ netifaces
+ requests
+ setuptools
+ ];
+ checkInputs = with python3Packages; [ bottle pytestCheckHook ];
+
+ disabledTests = [
+ # dnswanip connects to an external server to discover the
+ # machine's IP address.
+ "dnswanip"
+ ] ++ 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
+ # on those platforms is 'spawn', which requires the code to be
+ # run to be picklable, which this code isn't.
+ # Additionaly, other start methods are unsafe and prone to failure
+ # on macOS; see https://bugs.python.org/issue33725.
+ "BottleServer"
+ ];
+ # Allow tests that bind or connect to localhost on macOS.
+ __darwinAllowLocalNetworking = true;
+
+ meta = with lib; {
+ description = "Dynamic DNS update client with support for multiple protocols";
+ 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
+ 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
+ external notification services.
+ '';
+ homepage = "https://github.com/infothrill/python-dyndnsc";
+ license = licenses.mit;
+ maintainers = with maintainers; [ AluisioASG ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/pkgs/development/python-modules/daemonocle/default.nix b/pkgs/development/python-modules/daemonocle/default.nix
new file mode 100644
index 000000000000..ac470b83f7b2
--- /dev/null
+++ b/pkgs/development/python-modules/daemonocle/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, click
+, psutil
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+ pname = "daemonocle";
+ version = "1.0.2";
+
+ src = fetchFromGitHub {
+ owner = "jnrbsn";
+ repo = "daemonocle";
+ rev = "v${version}";
+ hash = "sha256-kDCbosXTIffuCzHcReXhiW4YPbxDW3OPnTbMC/EGJrM=";
+ };
+
+ propagatedBuildInputs = [ click psutil ];
+ checkInputs = [ pytestCheckHook ];
+
+ # One third of the tests fail on the sandbox with
+ # "psutil.NoSuchProcess: no process found with pid 0".
+ doCheck = false;
+ disabledTests = [ "sudo" ];
+ pythonImportsCheck = [ "daemonocle" ];
+
+ meta = with lib; {
+ description = "A Python library for creating super fancy Unix daemons";
+ longDescription = ''
+ daemonocle is a library for creating your own Unix-style daemons
+ written in Python. It solves many problems that other daemon
+ libraries have and provides some really useful features you don't
+ often see in other daemons.
+ '';
+ homepage = "https://github.com/jnrbsn/daemonocle";
+ license = licenses.mit;
+ maintainers = [ maintainers.AluisioASG ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 27fe0d6a2255..ce73a1477a73 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2039,6 +2039,8 @@ in
dyncall = callPackage ../development/libraries/dyncall { };
+ dyndnsc = callPackage ../applications/networking/dyndns/dyndnsc { };
+
earlyoom = callPackage ../os-specific/linux/earlyoom { };
EBTKS = callPackage ../development/libraries/science/biology/EBTKS { };
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index d294c1398bbf..aa3a001a8210 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -1452,6 +1452,8 @@ in {
daemonize = callPackage ../development/python-modules/daemonize { };
+ daemonocle = callPackage ../development/python-modules/daemonocle { };
+
daphne = callPackage ../development/python-modules/daphne { };
darcsver = callPackage ../development/python-modules/darcsver { };