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

47 lines
1.5 KiB
Nix
Raw Normal View History

2021-03-14 16:05:16 +00:00
{ lib, fetchurl, perlPackages, iproute2, perl }:
perlPackages.buildPerlPackage rec {
pname = "ddclient";
2021-06-01 15:47:35 +01:00
version = "3.9.1";
src = fetchurl {
url = "mirror://sourceforge/ddclient/${pname}-${version}.tar.gz";
2021-06-01 15:47:35 +01:00
sha256 = "0w14qnn72j333i3j7flxkw6bzcg4n31d8jfnvhmwa7s9rharx5p4";
};
# perl packages by default get devdoc which isn't present
outputs = [ "out" ];
buildInputs = with perlPackages; [ IOSocketSSL DigestSHA1 DataValidateIP JSONPP ];
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' \
2021-03-14 16:05:16 +00:00
--replace 'ifconfig -a' '${iproute2}/sbin/ip addr show' \
--replace 'ifconfig $arg' '${iproute2}/sbin/ip addr show $arg' \
2019-05-29 16:51:17 +01:00
--replace '/usr/bin/perl' '${perl}/bin/perl' # Until we get the patchShebangs fixed (issue #55786) we need to patch this manually
'';
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 lib; {
description = "Client for updating dynamic DNS service entries";
homepage = "https://sourceforge.net/p/ddclient/wiki/Home/";
2017-08-13 14:45:25 +01:00
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;
};
}