3
0
Fork 0
forked from mirrors/nixpkgs

knot-resolver: patch library loading for darwin

Apparently until now it could never start up on x86_64-darwin :-/
This commit is contained in:
Vladimír Čunát 2022-08-24 18:14:26 +02:00
parent 248cf8aca4
commit 6d2168c73c
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA

View file

@ -39,6 +39,13 @@ unwrapped = stdenv.mkDerivation rec {
# ExecStart can't be overwritten in overrides.
# We need that to use wrapped executable and correct config file.
sed '/^ExecStart=/d' -i systemd/kresd@.service.in
# On x86_64-darwin loading by soname fails to find the libs, surprisingly.
# Even though they should already be loaded and they're in RPATH, too.
for f in daemon/lua/{kres,zonefile}.lua; do
substituteInPlace "$f" \
--replace "ffi.load(" "ffi.load('${lib.getLib knot-dns}/lib/' .. "
done
''
# some tests have issues with network sandboxing, apparently
+ optionalString doInstallCheck ''