diff --git a/pkgs/servers/dns/knot-resolver/default.nix b/pkgs/servers/dns/knot-resolver/default.nix index 61f105a62bd4..833be5b53429 100644 --- a/pkgs/servers/dns/knot-resolver/default.nix +++ b/pkgs/servers/dns/knot-resolver/default.nix @@ -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 ''