Unverified Commit 2cf32f97 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #173384 from SuperSandro2000/ddclient-update

parents 01c02c84 58be1bf4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {

    wrapProgram $out/bin/sieve-connect \
      --prefix PERL5LIB : "${with perlPackages; makePerlPath [
        AuthenSASL Socket6 IOSocketInet6 IOSocketSSL NetSSLeay NetDNS
        AuthenSASL Socket6 IOSocketINET6 IOSocketSSL NetSSLeay NetDNS
        TermReadKey TermReadLineGnu ]}"
  '';

+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
      LWPProtocolHttps
      MozillaCA
      CryptSSLeay
      IOSocketInet6
      IOSocketINET6
      LinuxDistribution
      JSONPP
      JSON
+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
    perlPackages.NetSSLeay
    perlPackages.NetServer
    perlPackages.LogLog4perl
    perlPackages.IOSocketInet6
    perlPackages.IOSocketINET6
    perlPackages.Socket6
    perlPackages.URI
    perlPackages.DBFile
@@ -126,7 +126,7 @@ stdenv.mkDerivation rec {
        esac
        wrapProgram "$file" \
          --set PERL5LIB "$out/${perlPackages.perl.libPrefix}:${with perlPackages; makePerlPath [
                LogLog4perl IOSocketInet6 Socket6 URI DBFile DateManip
                LogLog4perl IOSocketINET6 Socket6 URI DBFile DateManip
                HTMLTemplate FileCopyRecursive FCGI NetCIDR NetSNMP NetServer
                ListMoreUtils DBDPg LWP rrdtool
                ]}"
+14 −18
Original line number Diff line number Diff line
{ lib, fetchFromGitHub, perlPackages, iproute2, perl }:
{ lib, fetchFromGitHub, perlPackages, autoreconfHook, iproute2, perl }:

perlPackages.buildPerlPackage rec {
  pname = "ddclient";
  version = "3.9.1";
  version = "3.10.0";

  outputs = [ "out" ];

  src = fetchFromGitHub {
    owner = "ddclient";
    repo = "ddclient";
    rev = "v${version}";
    sha256 = "0hf377g4j9r9sac75xp17nk2h58mazswz4vkg4g2gl2yyhvzq91w";
    sha256 = "sha256-wWUkjXwVNZRJR1rXPn3IkDRi9is9vsRuNC/zq8RpB1E=";
  };

  # perl packages by default get devdoc which isn't present
  outputs = [ "out" ];

  buildInputs = with perlPackages; [ IOSocketSSL DigestSHA1 DataValidateIP JSONPP IOSocketInet6 ];

  # Use iproute2 instead of ifconfig
  preConfigure = ''
  postPatch = ''
    touch Makefile.PL
    substituteInPlace ddclient \
      --replace 'in the output of ifconfig' 'in the output of ip addr show' \
      --replace 'ifconfig -a' '${iproute2}/sbin/ip addr show' \
      --replace 'ifconfig $arg' '${iproute2}/sbin/ip addr show $arg' \
      --replace '/usr/bin/perl' '${perl}/bin/perl' # Until we get the patchShebangs fixed (issue #55786) we need to patch this manually
  '';

  nativeBuildInputs = [ autoreconfHook ];

  buildInputs = with perlPackages; [ IOSocketINET6 IOSocketSSL JSONPP ];

  installPhase = ''
    runHook preInstall

    # patch sheebang ddclient script which only exists after buildPhase
    preConfigure
    install -Dm755 ddclient $out/bin/ddclient
    install -Dm644 -t $out/share/doc/ddclient COP* ChangeLog README.* RELEASENOTE
    install -Dm644 -t $out/share/doc/ddclient COP* README.* ChangeLog.md

    runHook postInstall
  '';

  # there are no tests distributed with ddclient
  # TODO: run upstream tests
  doCheck = false;

  meta = with lib; {
    description = "Client for updating dynamic DNS service entries";
    homepage = "https://ddclient.net/";
    license = licenses.gpl2Plus;
    # Mostly since `iproute` is Linux only.
    platforms = platforms.linux;
    maintainers = with maintainers; [ SuperSandro2000 ];
  };
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
    EncodeIMAPUTF7
    FileCopyRecursive
    FileTail
    IOSocketInet6
    IOSocketINET6
    IOTee
    JSONWebToken
    LWP
Loading