Skip to content

Instantly share code, notes, and snippets.

@mmahut
Created May 25, 2019 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmahut/f5e5366ad37ca027feaca3751ff08752 to your computer and use it in GitHub Desktop.
Save mmahut/f5e5366ad37ca027feaca3751ff08752 to your computer and use it in GitHub Desktop.
[root@bastion:~/mm/nixpkgs]# cat ./pkgs/tools/networking/ddclient/default.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;
};
}
[root@bastion:~/mm/nixpkgs]# nix-build -A ddclient
/nix/store/8zv5ivfddpjkqd88h6lqslxa07c545pm-perl5.28.2-ddclient-3.9.0
[root@bastion:~/mm/nixpkgs]# ls /nix/store/8zv5ivfddpjkqd88h6lqslxa07c545pm-perl5.28.2-ddclient-3.9.0/
bin share
[root@bastion:~/mm/nixpkgs]# head /nix/store/8zv5ivfddpjkqd88h6lqslxa07c545pm-perl5.28.2-ddclient-3.9.0/bin/ddclient
#!/usr/bin/perl -w -I/nix/store/qd4j58ykdkg9yvy8kvgh0i00gacy0ldm-perl-5.28.2/lib/perl5/site_perl -I/nix/store/3d6viccaxzaya7vfkbcbbg14h0g0ap4k-perl5.28.2-IO-Socket-SSL-2.066/lib/perl5/site_perl -I/nix/store/i4c5izf71mfrwgyc5fxwbicw6ar2j6gq-perl5.28.2-Mozilla-CA-20180117/lib/perl5/site_perl -I/nix/store/x0x49hlznv4dg78g2bca89xmrfwclim2-perl5.28.2-Net-SSLeay-1.85/lib/perl5/site_perl -I/nix/store/r928gc3q0xymvwx9x0a9hcxdh3i4x2cq-perl5.28.2-Digest-SHA1-2.13/lib/perl5/site_perl -I/nix/store/w63xlv824qqk3lswdicz5m1c57a002q9-perl5.28.2-Data-Validate-IP-0.27/lib/perl5/site_perl -I/nix/store/azbx4mfxzx1bhz7y4v3pyhaqbqrb13b1-perl5.28.2-NetAddr-IP-4.079/lib/perl5/site_perl -I/nix/store/v3kka3dlmrbr42chqxfhqbqjqy926sdq-perl5.28.2-JSON-PP-4.02/lib/perl5/site_perl -I/nix/store/qd4j58ykdkg9yvy8kvgh0i00gacy0ldm-perl-5.28.2/lib/perl5/site_perl -I/nix/store/3d6viccaxzaya7vfkbcbbg14h0g0ap4k-perl5.28.2-IO-Socket-SSL-2.066/lib/perl5/site_perl -I/nix/store/i4c5izf71mfrwgyc5fxwbicw6ar2j6gq-perl5.28.2-Mozilla-CA-20180117/lib/perl5/site_perl -I/nix/store/x0x49hlznv4dg78g2bca89xmrfwclim2-perl5.28.2-Net-SSLeay-1.85/lib/perl5/site_perl -I/nix/store/r928gc3q0xymvwx9x0a9hcxdh3i4x2cq-perl5.28.2-Digest-SHA1-2.13/lib/perl5/site_perl -I/nix/store/w63xlv824qqk3lswdicz5m1c57a002q9-perl5.28.2-Data-Validate-IP-0.27/lib/perl5/site_perl -I/nix/store/azbx4mfxzx1bhz7y4v3pyhaqbqrb13b1-perl5.28.2-NetAddr-IP-4.079/lib/perl5/site_perl -I/nix/store/v3kka3dlmrbr42chqxfhqbqjqy926sdq-perl5.28.2-JSON-PP-4.02/lib/perl5/site_perl -I/nix/store/qd4j58ykdkg9yvy8kvgh0i00gacy0ldm-perl-5.28.2/lib/perl5/site_perl -I/nix/store/3d6viccaxzaya7vfkbcbbg14h0g0ap4k-perl5.28.2-IO-Socket-SSL-2.066/lib/perl5/site_perl -I/nix/store/i4c5izf71mfrwgyc5fxwbicw6ar2j6gq-perl5.28.2-Mozilla-CA-20180117/lib/perl5/site_perl -I/nix/store/x0x49hlznv4dg78g2bca89xmrfwclim2-perl5.28.2-Net-SSLeay-1.85/lib/perl5/site_perl -I/nix/store/r928gc3q0xymvwx9x0a9hcxdh3i4x2cq-perl5.28.2-Digest-SHA1-2.13/lib/perl5/site_perl -I/nix/store/w63xlv824qqk3lswdicz5m1c57a002q9-perl5.28.2-Data-Validate-IP-0.27/lib/perl5/site_perl -I/nix/store/azbx4mfxzx1bhz7y4v3pyhaqbqrb13b1-perl5.28.2-NetAddr-IP-4.079/lib/perl5/site_perl -I/nix/store/v3kka3dlmrbr42chqxfhqbqjqy926sdq-perl5.28.2-JSON-PP-4.02/lib/perl5/site_perl -I/nix/store/8zv5ivfddpjkqd88h6lqslxa07c545pm-perl5.28.2-ddclient-3.9.0/lib/perl5/site_perl
#!/usr/local/bin/perl -w -I/nix/store/qd4j58ykdkg9yvy8kvgh0i00gacy0ldm-perl-5.28.2/lib/perl5/site_perl -I/nix/store/3d6viccaxzaya7vfkbcbbg14h0g0ap4k-perl5.28.2-IO-Socket-SSL-2.066/lib/perl5/site_perl -I/nix/store/i4c5izf71mfrwgyc5fxwbicw6ar2j6gq-perl5.28.2-Mozilla-CA-20180117/lib/perl5/site_perl -I/nix/store/x0x49hlznv4dg78g2bca89xmrfwclim2-perl5.28.2-Net-SSLeay-1.85/lib/perl5/site_perl -I/nix/store/r928gc3q0xymvwx9x0a9hcxdh3i4x2cq-perl5.28.2-Digest-SHA1-2.13/lib/perl5/site_perl -I/nix/store/w63xlv824qqk3lswdicz5m1c57a002q9-perl5.28.2-Data-Validate-IP-0.27/lib/perl5/site_perl -I/nix/store/azbx4mfxzx1bhz7y4v3pyhaqbqrb13b1-perl5.28.2-NetAddr-IP-4.079/lib/perl5/site_perl -I/nix/store/v3kka3dlmrbr42chqxfhqbqjqy926sdq-perl5.28.2-JSON-PP-4.02/lib/perl5/site_perl -I/nix/store/qd4j58ykdkg9yvy8kvgh0i00gacy0ldm-perl-5.28.2/lib/perl5/site_perl -I/nix/store/3d6viccaxzaya7vfkbcbbg14h0g0ap4k-perl5.28.2-IO-Socket-SSL-2.066/lib/perl5/site_perl -I/nix/store/i4c5izf71mfrwgyc5fxwbicw6ar2j6gq-perl5.28.2-Mozilla-CA-20180117/lib/perl5/site_perl -I/nix/store/x0x49hlznv4dg78g2bca89xmrfwclim2-perl5.28.2-Net-SSLeay-1.85/lib/perl5/site_perl -I/nix/store/r928gc3q0xymvwx9x0a9hcxdh3i4x2cq-perl5.28.2-Digest-SHA1-2.13/lib/perl5/site_perl -I/nix/store/w63xlv824qqk3lswdicz5m1c57a002q9-perl5.28.2-Data-Validate-IP-0.27/lib/perl5/site_perl -I/nix/store/azbx4mfxzx1bhz7y4v3pyhaqbqrb13b1-perl5.28.2-NetAddr-IP-4.079/lib/perl5/site_perl -I/nix/store/v3kka3dlmrbr42chqxfhqbqjqy926sdq-perl5.28.2-JSON-PP-4.02/lib/perl5/site_perl -I/nix/store/qd4j58ykdkg9yvy8kvgh0i00gacy0ldm-perl-5.28.2/lib/perl5/site_perl -I/nix/store/3d6viccaxzaya7vfkbcbbg14h0g0ap4k-perl5.28.2-IO-Socket-SSL-2.066/lib/perl5/site_perl -I/nix/store/i4c5izf71mfrwgyc5fxwbicw6ar2j6gq-perl5.28.2-Mozilla-CA-20180117/lib/perl5/site_perl -I/nix/store/x0x49hlznv4dg78g2bca89xmrfwclim2-perl5.28.2-Net-SSLeay-1.85/lib/perl5/site_perl -I/nix/store/r928gc3q0xymvwx9x0a9hcxdh3i4x2cq-perl5.28.2-Digest-SHA1-2.13/lib/perl5/site_perl -I/nix/store/w63xlv824qqk3lswdicz5m1c57a002q9-perl5.28.2-Data-Validate-IP-0.27/lib/perl5/site_perl -I/nix/store/azbx4mfxzx1bhz7y4v3pyhaqbqrb13b1-perl5.28.2-NetAddr-IP-4.079/lib/perl5/site_perl -I/nix/store/v3kka3dlmrbr42chqxfhqbqjqy926sdq-perl5.28.2-JSON-PP-4.02/lib/perl5/site_perl -I/nix/store/8zv5ivfddpjkqd88h6lqslxa07c545pm-perl5.28.2-ddclient-3.9.0/lib/perl5/site_perl
######################################################################
#
# DDCLIENT - a Perl client for updating DynDNS information
#
# Author: Paul Burry (paul+ddclient@burry.ca)
# ddclient-developers: see https://sourceforge.net/project/memberlist.php?group_id=116817
#
# website: http://ddclient.sf.net
[root@bastion:~/mm/nixpkgs]#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment