dhcpcd: add support for FreeBSD
This commit is contained in:
parent
2542605888
commit
9fe8517bdb
@ -3,6 +3,7 @@
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, udev
|
||||
, freebsd
|
||||
, runtimeShellPackage
|
||||
, runtimeShell
|
||||
, nixosTests
|
||||
@ -22,8 +23,12 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
udev
|
||||
runtimeShellPackage # So patchShebangs finds a bash suitable for the installed scripts
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
udev
|
||||
] ++ lib.optionals stdenv.isFreeBSD [
|
||||
freebsd.libcapsicum
|
||||
freebsd.libcasper
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@ -52,7 +57,7 @@ stdenv.mkDerivation rec {
|
||||
installFlags = [ "DBDIR=$(TMPDIR)/db" "SYSCONFDIR=${placeholder "out"}/etc" ];
|
||||
|
||||
# Check that the udev plugin got built.
|
||||
postInstall = lib.optionalString (udev != null) "[ -e ${placeholder "out"}/lib/dhcpcd/dev/udev.so ]";
|
||||
postInstall = lib.optionalString (udev != null && stdenv.isLinux) "[ -e ${placeholder "out"}/lib/dhcpcd/dev/udev.so ]";
|
||||
|
||||
passthru = {
|
||||
inherit enablePrivSep;
|
||||
@ -62,7 +67,7 @@ stdenv.mkDerivation rec {
|
||||
meta = with lib; {
|
||||
description = "A client for the Dynamic Host Configuration Protocol (DHCP)";
|
||||
homepage = "https://roy.marples.name/projects/dhcpcd";
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.linux ++ platforms.freebsd;
|
||||
license = licenses.bsd2;
|
||||
maintainers = with maintainers; [ eelco ];
|
||||
mainProgram = "dhcpcd";
|
||||
|
Loading…
Reference in New Issue
Block a user