1{buildPerlPackage, fetchurl, perlPackages, iproute}:
2
3buildPerlPackage {
4 name = "ddclient-3.8.2";
5
6 src = fetchurl {
7 url = mirror://sourceforge/ddclient/ddclient-3.8.2.tar.gz ;
8 sha256 = "17mcdqxcwa6c05m8xhxi4r37j4qvbp3wgbpvzqgmrmgwava5wcrw";
9 };
10
11 buildInputs = [ perlPackages.IOSocketSSL perlPackages.DigestSHA1 ];
12
13 patches = [ ./ddclient-foreground.patch ./ddclient-line-buffer-stdout.patch ];
14
15 # Use iproute2 instead of ifconfig
16 preConfigure = ''
17 touch Makefile.PL
18 substituteInPlace ddclient --replace 'in the output of ifconfig' 'in the output of ip addr show'
19 substituteInPlace ddclient --replace 'ifconfig -a' '${iproute}/sbin/ip addr show'
20 substituteInPlace ddclient --replace 'ifconfig $arg' '${iproute}/sbin/ip addr show $arg'
21 '';
22
23 installPhase = ''
24 mkdir -p $out/bin
25 cp ddclient $out/bin
26 '';
27
28 doCheck = false;
29}