3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/ddclient/default.nix

48 lines
1.4 KiB
Nix
Raw Normal View History

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