diff options
Diffstat (limited to 'third_party/ddclient/pkg.nix')
-rw-r--r-- | third_party/ddclient/pkg.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/third_party/ddclient/pkg.nix b/third_party/ddclient/pkg.nix new file mode 100644 index 000000000000..586f3891ac96 --- /dev/null +++ b/third_party/ddclient/pkg.nix @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: Copyright (c) 2003-2023 The Nixpkgs/NixOS contributors +{ lib, fetchFromGitHub, perlPackages, autoreconfHook, iproute2, perl }: + +perlPackages.buildPerlPackage rec { + pname = "ddclient"; + version = "3.10.0"; + + outputs = [ "out" ]; + + src = fetchFromGitHub { + owner = "ddclient"; + repo = "ddclient"; + rev = "v${version}"; + sha256 = "sha256-wWUkjXwVNZRJR1rXPn3IkDRi9is9vsRuNC/zq8RpB1E="; + }; + + postPatch = '' + touch Makefile.PL + ''; + + nativeBuildInputs = [ autoreconfHook ]; + + buildInputs = with perlPackages; [ IOSocketINET6 IOSocketSSL JSONPP ]; + + installPhase = '' + runHook preInstall + # patch sheebang ddclient script which only exists after buildPhase + preConfigure + install -Dm755 ddclient $out/bin/ddclient + install -Dm644 -t $out/share/doc/ddclient COP* README.* ChangeLog.md + runHook postInstall + ''; + + # TODO: run upstream tests + doCheck = false; + + meta = with lib; { + description = "Client for updating dynamic DNS service entries"; + homepage = "https://ddclient.net/"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} |