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

34 lines
914 B
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, udev }:
stdenv.mkDerivation rec {
2015-12-27 22:39:19 +01:00
name = "dhcpcd-6.9.4";
src = fetchurl {
2015-07-22 23:33:06 +02:00
url = "mirror://roy/dhcpcd/${name}.tar.xz";
2015-12-27 22:39:19 +01:00
sha256 = "184vpid8m5175xa2nkh6mmvk8b6z4isfm6nvf4g8l5ggfdsgzwy3";
};
buildInputs = [ pkgconfig udev ];
2015-03-26 19:36:47 +01:00
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
];
makeFlags = "PREFIX=\${out}";
# Hack to make installation succeed. dhcpcd will still use /var/db
# at runtime.
installFlags = "DBDIR=\${TMPDIR}/db SYSCONFDIR=$(out)/etc";
# Check that the udev plugin got built.
postInstall = stdenv.lib.optional (udev != null) "[ -e $out/lib/dhcpcd/dev/udev.so ]";
meta = {
description = "A client for the Dynamic Host Configuration Protocol (DHCP)";
homepage = http://roy.marples.name/projects/dhcpcd;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.eelco ];
};
}