2021-01-25 11:26:54 +03:00
|
|
|
{ lib, fetchurl, perlPackages, iproute, perl }:
|
2009-09-16 15:27:18 +04:00
|
|
|
|
2018-10-13 02:10:38 +03:00
|
|
|
perlPackages.buildPerlPackage rec {
|
2019-06-20 16:07:56 +03:00
|
|
|
pname = "ddclient";
|
2018-12-04 02:07:28 +03:00
|
|
|
version = "3.9.0";
|
2009-09-16 15:27:18 +04:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-06-20 16:07:56 +03:00
|
|
|
url = "mirror://sourceforge/ddclient/${pname}-${version}.tar.gz";
|
2018-12-04 02:07:28 +03:00
|
|
|
sha256 = "0fwyhab8yga2yi1kdfkbqxa83wxhwpagmj1w1mwkg2iffh1fjjlw";
|
2009-09-16 15:27:18 +04:00
|
|
|
};
|
|
|
|
|
2018-03-12 18:25:28 +03:00
|
|
|
# perl packages by default get devdoc which isn't present
|
2016-04-28 20:48:33 +03:00
|
|
|
outputs = [ "out" ];
|
|
|
|
|
2018-12-04 02:07:28 +03:00
|
|
|
buildInputs = with perlPackages; [ IOSocketSSL DigestSHA1 DataValidateIP JSONPP ];
|
2009-09-16 15:27:18 +04:00
|
|
|
|
2012-11-08 16:54:53 +04:00
|
|
|
# Use iproute2 instead of ifconfig
|
2016-02-20 14:14:29 +03:00
|
|
|
preConfigure = ''
|
2009-09-16 15:27:18 +04:00
|
|
|
touch Makefile.PL
|
2017-08-13 16:45:25 +03:00
|
|
|
substituteInPlace ddclient \
|
|
|
|
--replace 'in the output of ifconfig' 'in the output of ip addr show' \
|
2019-05-29 18:51:17 +03:00
|
|
|
--replace 'ifconfig -a' '${iproute}/sbin/ip addr show' \
|
|
|
|
--replace 'ifconfig $arg' '${iproute}/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
|
2016-02-20 14:14:29 +03:00
|
|
|
'';
|
2009-09-16 15:27:18 +04:00
|
|
|
|
|
|
|
installPhase = ''
|
2018-03-12 18:25:28 +03:00
|
|
|
runHook preInstall
|
|
|
|
|
2017-08-13 16:45:25 +03:00
|
|
|
install -Dm755 ddclient $out/bin/ddclient
|
2018-03-12 18:25:28 +03:00
|
|
|
install -Dm644 -t $out/share/doc/ddclient COP* ChangeLog README.* RELEASENOTE
|
|
|
|
|
|
|
|
runHook postInstall
|
2009-09-16 15:27:18 +04:00
|
|
|
'';
|
|
|
|
|
2017-08-13 16:45:25 +03:00
|
|
|
# there are no tests distributed with ddclient
|
2009-09-16 15:27:18 +04:00
|
|
|
doCheck = false;
|
2016-02-20 14:14:29 +03:00
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2016-02-20 14:14:29 +03:00
|
|
|
description = "Client for updating dynamic DNS service entries";
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://sourceforge.net/p/ddclient/wiki/Home/";
|
2017-08-13 16:45:25 +03:00
|
|
|
license = licenses.gpl2Plus;
|
2016-02-21 22:24:07 +03:00
|
|
|
# Mostly since `iproute` is Linux only.
|
2017-08-13 16:45:25 +03:00
|
|
|
platforms = platforms.linux;
|
2016-02-20 14:14:29 +03:00
|
|
|
};
|
2009-09-16 15:27:18 +04:00
|
|
|
}
|