knot-resolver: hotfix for a recent $LUA_PATH regression

I hope I got all the transitive dependencies.
The 'http' module load again, at least.
Close https://github.com/NixOS/nixpkgs/pull/64174
This commit is contained in:
Vladimír Čunát 2019-07-05 10:42:08 +02:00
parent e3c11d3168
commit f0d2da43a7
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -75,22 +75,30 @@ unwrapped = stdenv.mkDerivation rec {
};
};
wrapped-full = runCommand unwrapped.name
{
nativeBuildInputs = [ makeWrapper ];
buildInputs = with luajitPackages; [
# FIXME: revert this back after resolving
# https://github.com/NixOS/nixpkgs/pull/63108#issuecomment-508670438
wrapped-full =
with stdenv.lib;
with luajitPackages;
let
luaPkgs = [
luasec luasocket # trust anchor bootstrap, prefill module
luafilesystem # prefill module
http # for http module; brings lots of deps; some are useful elsewhere
cqueues fifo lpeg lpeg_patterns luaossl compat53 basexx binaryheap
];
in runCommand unwrapped.name
{
nativeBuildInputs = [ makeWrapper ];
preferLocalBuild = true;
allowSubstitutes = false;
}
''
mkdir -p "$out"/{bin,share}
makeWrapper '${unwrapped}/bin/kresd' "$out"/bin/kresd \
--set LUA_PATH "$LUA_PATH" \
--set LUA_CPATH "$LUA_CPATH"
--set LUA_PATH '${concatStringsSep ";" (map getLuaPath luaPkgs)}' \
--set LUA_CPATH '${concatStringsSep ";" (map getLuaCPath luaPkgs)}'
ln -sr '${unwrapped}/share/man' "$out"/share/
ln -sr "$out"/{bin,sbin}
'';