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