2016-02-20 11:14:29 +00:00
|
|
|
{ stdenv, buildPerlPackage, fetchurl, perlPackages, iproute }:
|
2009-09-16 12:27:18 +01:00
|
|
|
|
2016-02-20 11:14:29 +00:00
|
|
|
buildPerlPackage rec {
|
|
|
|
name = "ddclient-${version}";
|
|
|
|
version = "3.8.3";
|
2009-09-16 12:27:18 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-02-20 11:14:29 +00:00
|
|
|
url = "mirror://sourceforge/ddclient/${name}.tar.gz";
|
|
|
|
sha256 = "1j8zdn7fy7i0bjk3jf0hxnbnshc2yf054vxq64imxdpfd7n5zgfy";
|
2009-09-16 12:27:18 +01:00
|
|
|
};
|
|
|
|
|
2013-11-24 22:02:27 +00:00
|
|
|
buildInputs = [ perlPackages.IOSocketSSL perlPackages.DigestSHA1 ];
|
2012-11-08 12:54:53 +00:00
|
|
|
|
2016-02-20 11:14:29 +00:00
|
|
|
patches = [ ./ddclient-line-buffer-stdout.patch ];
|
2009-09-16 12:27:18 +01:00
|
|
|
|
2012-11-08 12:54:53 +00:00
|
|
|
# Use iproute2 instead of ifconfig
|
2016-02-20 11:14:29 +00:00
|
|
|
preConfigure = ''
|
2009-09-16 12:27:18 +01:00
|
|
|
touch Makefile.PL
|
2012-11-08 12:54:53 +00:00
|
|
|
substituteInPlace ddclient --replace 'in the output of ifconfig' 'in the output of ip addr show'
|
|
|
|
substituteInPlace ddclient --replace 'ifconfig -a' '${iproute}/sbin/ip addr show'
|
|
|
|
substituteInPlace ddclient --replace 'ifconfig $arg' '${iproute}/sbin/ip addr show $arg'
|
2016-02-20 11:14:29 +00:00
|
|
|
'';
|
2009-09-16 12:27:18 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin
|
2009-09-16 12:27:18 +01:00
|
|
|
cp ddclient $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false;
|
2016-02-20 11:14:29 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://sourceforge.net/p/ddclient/wiki/Home/;
|
|
|
|
description = "Client for updating dynamic DNS service entries";
|
|
|
|
license = licenses.gpl2Plus;
|
2016-02-21 19:24:07 +00:00
|
|
|
|
|
|
|
# Mostly since `iproute` is Linux only.
|
|
|
|
platforms = platforms.linux;
|
2016-02-20 11:14:29 +00:00
|
|
|
};
|
2009-09-16 12:27:18 +01:00
|
|
|
}
|