darwin.libpcap: disable condition on PRIVATE to expose symbol; mullvad: fix darwin build (#352747)

This commit is contained in:
misuzu
2024-12-14 12:58:58 +02:00
committed by GitHub
2 changed files with 12 additions and 6 deletions
@@ -10,6 +10,7 @@
, libnftnl
, libmnl
, libwg
, darwin
, enableOpenvpn ? true
, openvpn-mullvad
, shadowsocks-rust
@@ -51,11 +52,15 @@ rustPlatform.buildRustPackage rec {
fakeGoCopyLibwg
];
buildInputs = [
dbus.dev
libnftnl
libmnl
];
buildInputs =
lib.optionals stdenv.hostPlatform.isLinux [
dbus.dev
libnftnl
libmnl
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.libpcap
];
postInstall = ''
compdir=$(mktemp -d)
@@ -4,7 +4,6 @@
apple-sdk_15,
bison,
bluez,
fetchFromGitHub,
flex,
mkAppleDerivation,
stdenv,
@@ -92,6 +91,8 @@ mkAppleDerivation {
postPatch = ''
substituteInPlace libpcap/Makefile.in \
--replace-fail '@PLATFORM_C_SRC@' '@PLATFORM_C_SRC@ pcap-darwin.c pcap-util.c pcapng.c'
substituteInPlace libpcap/pcap/pcap.h \
--replace-fail '#if PRIVATE' '#if 1'
'';
configureFlags = [