Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

knot-resolver: fix LUA_{PATH,CPATH} #64174

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions pkgs/servers/dns/knot-resolver/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let # un-indented, over the whole file

result = if extraFeatures then wrapped-full else unwrapped;

inherit (stdenv.lib) optional;
inherit (stdenv.lib) optional concatMapStringsSep;

unwrapped = stdenv.mkDerivation rec {
name = "knot-resolver-${version}";
Expand Down Expand Up @@ -76,15 +76,20 @@ unwrapped = stdenv.mkDerivation rec {
};

wrapped-full = runCommand unwrapped.name
{
rec {
nativeBuildInputs = [ makeWrapper ];
buildInputs = with luajitPackages; [
preferLocalBuild = true;
allowSubstitutes = false;

luaDepends = with luajitPackages; [
luasec luasocket # trust anchor bootstrap, prefill module
luafilesystem # prefill module
http # for http module; brings lots of deps; some are useful elsewhere
];
preferLocalBuild = true;
allowSubstitutes = false;

LUA_VERSION = luajitPackages.lua.luaversion;
LUA_PATH = concatMapStringsSep ";" (pkg: "${pkg}/share/lua/${LUA_VERSION}/?.lua") luaDepends;
LUA_CPATH = concatMapStringsSep ";" (pkg: "${pkg}/lib/lua/${LUA_VERSION}/?.so") luaDepends;
}
''
mkdir -p "$out"/{bin,share}
Expand Down