From 58be1bf4577132ef8dcbf1efa6427a0679b9b634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 17 May 2022 13:46:49 +0200 Subject: [PATCH] ddclient: 3.9.1 -> 3.10.0 --- pkgs/tools/networking/ddclient/default.nix | 32 ++++++++++------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/pkgs/tools/networking/ddclient/default.nix b/pkgs/tools/networking/ddclient/default.nix index e4bb685b518e..b39af1930100 100644 --- a/pkgs/tools/networking/ddclient/default.nix +++ b/pkgs/tools/networking/ddclient/default.nix @@ -1,48 +1,44 @@ -{ lib, fetchFromGitHub, perlPackages, iproute2, perl }: +{ lib, fetchFromGitHub, perlPackages, autoreconfHook, iproute2, perl }: perlPackages.buildPerlPackage rec { pname = "ddclient"; - version = "3.9.1"; + version = "3.10.0"; + + outputs = [ "out" ]; src = fetchFromGitHub { owner = "ddclient"; repo = "ddclient"; rev = "v${version}"; - sha256 = "0hf377g4j9r9sac75xp17nk2h58mazswz4vkg4g2gl2yyhvzq91w"; + sha256 = "sha256-wWUkjXwVNZRJR1rXPn3IkDRi9is9vsRuNC/zq8RpB1E="; }; - # perl packages by default get devdoc which isn't present - outputs = [ "out" ]; - - buildInputs = with perlPackages; [ IOSocketSSL DigestSHA1 DataValidateIP JSONPP IOSocketInet6 ]; - - # Use iproute2 instead of ifconfig - preConfigure = '' + postPatch = '' touch Makefile.PL - substituteInPlace ddclient \ - --replace 'in the output of ifconfig' 'in the output of ip addr show' \ - --replace 'ifconfig -a' '${iproute2}/sbin/ip addr show' \ - --replace 'ifconfig $arg' '${iproute2}/sbin/ip addr show $arg' \ - --replace '/usr/bin/perl' '${perl}/bin/perl' # Until we get the patchShebangs fixed (issue #55786) we need to patch this manually ''; + 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* ChangeLog README.* RELEASENOTE + install -Dm644 -t $out/share/doc/ddclient COP* README.* ChangeLog.md runHook postInstall ''; - # there are no tests distributed with ddclient + # TODO: run upstream tests doCheck = false; meta = with lib; { description = "Client for updating dynamic DNS service entries"; homepage = "https://ddclient.net/"; license = licenses.gpl2Plus; - # Mostly since `iproute` is Linux only. platforms = platforms.linux; maintainers = with maintainers; [ SuperSandro2000 ]; };