nixpkgs/pkgs/tools/networking/dhcp/default.nix

77 lines
2.2 KiB
Nix
Raw Normal View History

2015-03-26 19:27:48 +00:00
{ stdenv, fetchurl, perl, file, nettools, iputils, iproute, makeWrapper
, coreutils, gnused, openldap ? null
2015-03-26 19:27:48 +00:00
}:
stdenv.mkDerivation rec {
name = "dhcp-${version}";
dhcp: 4.3.6-P1 -> 4.4.1 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/dhcp/versions. These checks were done: - built on NixOS - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/.dhclient-script-wrapped -h’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/.dhclient-script-wrapped --help’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/.dhclient-script-wrapped help’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhclient -h’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhclient --help’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhclient --version’ and found version 4.4.1 - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhclient-script -h’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhclient-script --help’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhclient-script help’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhcpd -h’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhcpd --help’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhcpd --version’ and found version 4.4.1 - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhcrelay -h’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhcrelay --help’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhcrelay --version’ and found version 4.4.1 - found 4.4.1 with grep in /nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1 - directory tree listing: https://gist.github.com/3f68e1eba2f701473b249d35042cc502
2018-04-08 01:39:32 +00:00
version = "4.4.1";
src = fetchurl {
url = "https://ftp.isc.org/isc/dhcp/${version}/${name}.tar.gz";
dhcp: 4.3.6-P1 -> 4.4.1 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/dhcp/versions. These checks were done: - built on NixOS - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/.dhclient-script-wrapped -h’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/.dhclient-script-wrapped --help’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/.dhclient-script-wrapped help’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhclient -h’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhclient --help’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhclient --version’ and found version 4.4.1 - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhclient-script -h’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhclient-script --help’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhclient-script help’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhcpd -h’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhcpd --help’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhcpd --version’ and found version 4.4.1 - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhcrelay -h’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhcrelay --help’ got 0 exit code - ran ‘/nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1/bin/dhcrelay --version’ and found version 4.4.1 - found 4.4.1 with grep in /nix/store/b2fh17aq0cjj7yrwxs1vgjpas8v3pr9s-dhcp-4.4.1 - directory tree listing: https://gist.github.com/3f68e1eba2f701473b249d35042cc502
2018-04-08 01:39:32 +00:00
sha256 = "025nfqx4zwdgv4b3rkw26ihcj312vir08jk6yi57ndmb4a4m08ia";
};
patches =
2018-01-08 16:33:59 +00:00
[
# Make sure that the hostname gets set on reboot. Without this
# patch, the hostname doesn't get set properly if the old
# hostname (i.e. before reboot) is equal to the new hostname.
./set-hostname.patch
];
buildInputs = [ perl makeWrapper openldap ];
2015-03-26 19:27:48 +00:00
configureFlags = [
"--enable-failover"
"--enable-execute"
"--enable-tracing"
"--enable-delayed-ack"
"--enable-dhcpv6"
"--enable-paranoia"
"--enable-early-chroot"
"--sysconfdir=/etc"
"--localstatedir=/var"
] ++ stdenv.lib.optionals (openldap != null) [ "--with-ldap" "--with-ldapcrypto" ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=pointer-compare" ];
2015-03-26 19:27:48 +00:00
installFlags = [ "DESTDIR=\${out}" ];
postInstall =
''
2015-03-26 19:27:48 +00:00
mv $out/$out/* $out
DIR=$out/$out
while rmdir $DIR 2>/dev/null; do
DIR="$(dirname "$DIR")"
done
cp client/scripts/linux $out/sbin/dhclient-script
substituteInPlace $out/sbin/dhclient-script \
--replace /sbin/ip ${iproute}/sbin/ip
wrapProgram "$out/sbin/dhclient-script" --prefix PATH : \
"${nettools}/bin:${nettools}/sbin:${iputils}/bin:${coreutils}/bin:${gnused}/bin"
'';
preConfigure =
''
substituteInPlace configure --replace "/usr/bin/file" "${file}/bin/file"
sed -i "includes/dhcpd.h" \
-"es|^ *#define \+_PATH_DHCLIENT_SCRIPT.*$|#define _PATH_DHCLIENT_SCRIPT \"$out/sbin/dhclient-script\"|g"
'';
meta = with stdenv.lib; {
description = "Dynamic Host Configuration Protocol (DHCP) tools";
longDescription = ''
ISC's Dynamic Host Configuration Protocol (DHCP) distribution
provides a freely redistributable reference implementation of
all aspects of DHCP, through a suite of DHCP tools: server,
client, and relay agent.
'';
homepage = http://www.isc.org/products/DHCP/;
license = licenses.isc;
platforms = platforms.unix;
};
}