Skip to content

Commit e176bec

Browse files
authored
lldpd: build on macOS (#350485)
2 parents c04462b + 69f95d6 commit e176bec

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
@@ -9163,7 +9163,9 @@ with pkgs;
91639163

91649164
lksctp-tools = callPackage ../os-specific/linux/lksctp-tools { };
91659165

9166-
lldpd = callPackage ../tools/networking/lldpd { };
9166+
lldpd = callPackage ../tools/networking/lldpd {
9167+
inherit (darwin.apple_sdk.frameworks) Foundation;
9168+
};
91679169

91689170
llm = with python3Packages; toPythonApplication llm;
91699171

0 commit comments

Comments
 (0)