Skip to content

Commit 69f95d6

Browse files
committed
lldpd: build on macOS
1 parent ca30f58 commit 69f95d6

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

pkgs/tools/networking/lldpd/default.nix

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
{ stdenv, lib, fetchurl, pkg-config, removeReferencesTo
2-
, libevent, readline, net-snmp, openssl
1+
{ stdenv
2+
, Foundation
3+
, fetchurl
4+
, lib
5+
, libevent
6+
, net-snmp
7+
, openssl
8+
, pkg-config
9+
, readline
10+
, removeReferencesTo
311
}:
412

513
stdenv.mkDerivation rec {
@@ -16,10 +24,16 @@ stdenv.mkDerivation rec {
1624
"--enable-pie"
1725
"--with-snmp"
1826
"--with-systemdsystemunitdir=\${out}/lib/systemd/system"
27+
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
28+
"--with-launchddaemonsdir=no"
29+
"--with-privsep-chroot=/var/empty"
30+
"--with-privsep-group=nogroup"
31+
"--with-privsep-user=nobody"
1932
];
2033

2134
nativeBuildInputs = [ pkg-config removeReferencesTo ];
22-
buildInputs = [ libevent readline net-snmp openssl ];
35+
buildInputs = [ libevent readline net-snmp openssl ]
36+
++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ];
2337

2438
enableParallelBuilding = true;
2539

@@ -34,6 +48,6 @@ stdenv.mkDerivation rec {
3448
homepage = "https://lldpd.github.io/";
3549
license = licenses.isc;
3650
maintainers = with maintainers; [ fpletz ];
37-
platforms = platforms.linux;
51+
platforms = platforms.unix;
3852
};
3953
}

pkgs/top-level/all-packages.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9157,7 +9157,9 @@ with pkgs;
91579157

91589158
lksctp-tools = callPackage ../os-specific/linux/lksctp-tools { };
91599159

9160-
lldpd = callPackage ../tools/networking/lldpd { };
9160+
lldpd = callPackage ../tools/networking/lldpd {
9161+
inherit (darwin.apple_sdk.frameworks) Foundation;
9162+
};
91619163

91629164
llm = with python3Packages; toPythonApplication llm;
91639165

0 commit comments

Comments
 (0)