git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #105715 from AluisioASG/aasg/dyndnsc
commit555641c50462d5ab87afe9ceab7df9d8c7755a37 authorSandro <sandro.jaeckel@gmail.com> dateThu 3 Dec 2020, 18:56 (6 years ago) parentc273a4bb0d6df5
4 files changed+105
pkgs/applications/networking/dyndns/dyndnsc/default.nix+59 pkgs/development/python-modules/daemonocle/default.nix+42 pkgs/top-level/all-packages.nix+2 pkgs/top-level/python-packages.nix+2
pkgs/applications/networking/dyndns/dyndnsc/default.nixnew file+59
@@ -0,0 +1,59 @@
1+{ stdenv, lib, python3Packages }:
2+
3+python3Packages.buildPythonApplication rec {
4+ pname = "dyndnsc";
5+ version = "0.5.1";
6+
7+ src = python3Packages.fetchPypi {
8+ inherit pname version;
9+ hash = "sha256-Sy6U0XhIQ9mPmznmWKqoyqE34vaE84fwlivouaF7Dd0=";
10+ };
11+
12+ postPatch = ''
13+ substituteInPlace setup.py --replace "bottle==" "bottle>="
14+ '';
15+
16+ nativeBuildInputs = with python3Packages; [ pytestrunner ];
17+ propagatedBuildInputs = with python3Packages; [
18+ daemonocle
19+ dnspython
20+ netifaces
21+ requests
22+ setuptools
23+ ];
24+ checkInputs = with python3Packages; [ bottle pytestCheckHook ];
25+
26+ disabledTests = [
27+ # dnswanip connects to an external server to discover the
28+ # machine's IP address.
29+ "dnswanip"
30+ ] ++ lib.optionals stdenv.isDarwin [
31+ # The tests that spawn a server using Bottle cannot be run on
32+ # macOS or Windows as the default multiprocessing start method
33+ # on those platforms is 'spawn', which requires the code to be
34+ # run to be picklable, which this code isn't.
35+ # Additionaly, other start methods are unsafe and prone to failure
36+ # on macOS; see https://bugs.python.org/issue33725.
37+ "BottleServer"
38+ ];
39+ # Allow tests that bind or connect to localhost on macOS.
40+ __darwinAllowLocalNetworking = true;
41+
42+ meta = with lib; {
43+ description = "Dynamic DNS update client with support for multiple protocols";
44+ longDescription = ''
45+ Dyndnsc is a command line client for sending updates to Dynamic
46+ DNS (DDNS, DynDNS) services. It supports multiple protocols and
47+ services, and it has native support for IPv6. The configuration
48+ file allows using foreign, but compatible services. Dyndnsc
49+ ships many different IP detection mechanisms, support for
50+ configuring multiple services in one place and it has a daemon
51+ mode for running unattended. It has a plugin system to provide
52+ external notification services.
53+ '';
54+ homepage = "https://github.com/infothrill/python-dyndnsc";
55+ license = licenses.mit;
56+ maintainers = with maintainers; [ AluisioASG ];
57+ platforms = platforms.unix;
58+ };
59+}
pkgs/development/python-modules/daemonocle/default.nixnew file+42
@@ -0,0 +1,42 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, click
5+, psutil
6+, pytestCheckHook
7+}:
8+
9+buildPythonPackage rec {
10+ pname = "daemonocle";
11+ version = "1.0.2";
12+
13+ src = fetchFromGitHub {
14+ owner = "jnrbsn";
15+ repo = "daemonocle";
16+ rev = "v${version}";
17+ hash = "sha256-kDCbosXTIffuCzHcReXhiW4YPbxDW3OPnTbMC/EGJrM=";
18+ };
19+
20+ propagatedBuildInputs = [ click psutil ];
21+ checkInputs = [ pytestCheckHook ];
22+
23+ # One third of the tests fail on the sandbox with
24+ # "psutil.NoSuchProcess: no process found with pid 0".
25+ doCheck = false;
26+ disabledTests = [ "sudo" ];
27+ pythonImportsCheck = [ "daemonocle" ];
28+
29+ meta = with lib; {
30+ description = "A Python library for creating super fancy Unix daemons";
31+ longDescription = ''
32+ daemonocle is a library for creating your own Unix-style daemons
33+ written in Python. It solves many problems that other daemon
34+ libraries have and provides some really useful features you don't
35+ often see in other daemons.
36+ '';
37+ homepage = "https://github.com/jnrbsn/daemonocle";
38+ license = licenses.mit;
39+ maintainers = [ maintainers.AluisioASG ];
40+ platforms = platforms.unix;
41+ };
42+}
pkgs/top-level/all-packages.nix+2
@@ -2039,6 +2039,8 @@ in
20392039
20402040 dyncall = callPackage ../development/libraries/dyncall { };
20412041
2042+ dyndnsc = callPackage ../applications/networking/dyndns/dyndnsc { };
2043+
20422044 earlyoom = callPackage ../os-specific/linux/earlyoom { };
20432045
20442046 EBTKS = callPackage ../development/libraries/science/biology/EBTKS { };
pkgs/top-level/python-packages.nix+2
@@ -1452,6 +1452,8 @@ in {
14521452
14531453 daemonize = callPackage ../development/python-modules/daemonize { };
14541454
1455+ daemonocle = callPackage ../development/python-modules/daemonocle { };
1456+
14551457 daphne = callPackage ../development/python-modules/daphne { };
14561458
14571459 darcsver = callPackage ../development/python-modules/darcsver { };