1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 22:50:49 +00:00
nixpkgs/pkgs/tools/networking/ddclient/default.nix
Nikita Uvarov 6ccc6c7cd1
ddclient: 3.8.3 -> 3.9.0
This release fixes cloudflare protocol usage by switching to a new api
version. See release notes: https://sourceforge.net/p/ddclient/news/2018/08/ddclient-390-released.
Partially fixes #26691.
2019-01-03 13:33:59 +01:00

46 lines
1.3 KiB
Nix

{ stdenv, fetchurl, perlPackages, iproute }:
perlPackages.buildPerlPackage rec {
name = "ddclient-${version}";
version = "3.9.0";
src = fetchurl {
url = "mirror://sourceforge/ddclient/${name}.tar.gz";
sha256 = "0fwyhab8yga2yi1kdfkbqxa83wxhwpagmj1w1mwkg2iffh1fjjlw";
};
# perl packages by default get devdoc which isn't present
outputs = [ "out" ];
buildInputs = with perlPackages; [ IOSocketSSL DigestSHA1 DataValidateIP JSONPP ];
# Use iproute2 instead of ifconfig
preConfigure = ''
touch Makefile.PL
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
install -Dm755 ddclient $out/bin/ddclient
install -Dm644 -t $out/share/doc/ddclient COP* ChangeLog README.* RELEASENOTE
runHook postInstall
'';
# there are no tests distributed with ddclient
doCheck = false;
meta = with stdenv.lib; {
description = "Client for updating dynamic DNS service entries";
homepage = https://sourceforge.net/p/ddclient/wiki/Home/;
license = licenses.gpl2Plus;
# Mostly since `iproute` is Linux only.
platforms = platforms.linux;
};
}