2023-10-15 17:53:42 +02:00
|
|
|
{ lib, fetchFromGitHub, perlPackages, autoreconfHook, iproute2, perl, curl }:
|
2023-10-15 16:32:44 +02:00
|
|
|
|
2023-10-16 21:25:03 +02:00
|
|
|
let
|
|
|
|
myPerl = perl.withPackages (ps: [ ps.JSONPP ]);
|
|
|
|
in
|
2023-10-15 16:32:44 +02:00
|
|
|
perlPackages.buildPerlPackage rec {
|
|
|
|
pname = "ddclient";
|
2023-10-15 17:53:42 +02:00
|
|
|
version = "3.11.0_1";
|
2023-10-15 16:32:44 +02:00
|
|
|
|
|
|
|
outputs = [ "out" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ddclient";
|
|
|
|
repo = "ddclient";
|
|
|
|
rev = "v${version}";
|
2023-10-15 17:53:42 +02:00
|
|
|
sha256 = "sha256-pl1kbzY5nUIvx1QiDdL9TP4vKtQnnv3RWklE4gbxXCw=";
|
2023-10-15 16:32:44 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
touch Makefile.PL
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
2023-10-16 21:25:03 +02:00
|
|
|
buildInputs = [ curl myPerl ];
|
|
|
|
|
|
|
|
# Prevent ddclient from picking up build time perl which is implicitly added
|
|
|
|
# by buildPerlPackage.
|
|
|
|
configureFlags = [
|
|
|
|
"--with-perl=${lib.getExe myPerl}"
|
|
|
|
];
|
2023-10-15 16:32:44 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm755 ddclient $out/bin/ddclient
|
|
|
|
install -Dm644 -t $out/share/doc/ddclient COP* README.* ChangeLog.md
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
# TODO: run upstream tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Client for updating dynamic DNS service entries";
|
|
|
|
homepage = "https://ddclient.net/";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
2023-10-15 16:38:13 +02:00
|
|
|
maintainers = with maintainers; [ bjornfor ];
|
2023-10-15 16:32:44 +02:00
|
|
|
};
|
|
|
|
}
|