diff options
author | Vladimír Čunát <v@cunat.cz> | 2020-01-27 15:14:42 +0100 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2020-01-31 15:06:20 +0100 |
commit | 93ad21dedd01ff8bfc0f11ef069acc433069bbab (patch) | |
tree | 59a623cdd28e833e8f2debc5eac33e10f4bd949d /pkgs/servers/dns/knot-resolver | |
parent | e980e7a3abd9eb3800fced85ee136c7a8ec8ce21 (diff) |
knot-resolver: remove older lua path workarounds
Part of this is approximate revert of commit f0d2da43a7a449b5888.
Diffstat (limited to 'pkgs/servers/dns/knot-resolver')
-rw-r--r-- | pkgs/servers/dns/knot-resolver/default.nix | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/pkgs/servers/dns/knot-resolver/default.nix b/pkgs/servers/dns/knot-resolver/default.nix index 150d2b7a9f13..2dfb178b7ba1 100644 --- a/pkgs/servers/dns/knot-resolver/default.nix +++ b/pkgs/servers/dns/knot-resolver/default.nix @@ -11,16 +11,9 @@ let # un-indented, over the whole file result = if extraFeatures then wrapped-full else unwrapped; -inherit (stdenv.lib) optional optionals concatStringsSep; +inherit (stdenv.lib) optional optionals; lua = luajitPackages; -# FIXME: remove these usages once resolving -# https://github.com/NixOS/nixpkgs/pull/63108#issuecomment-508670438 -exportLuaPathsFor = luaPkgs: '' - export LUA_PATH='${ concatStringsSep ";" (map lua.getLuaPath luaPkgs)}' - export LUA_CPATH='${concatStringsSep ";" (map lua.getLuaCPath luaPkgs)}' -''; - unwrapped = stdenv.mkDerivation rec { pname = "knot-resolver"; version = "4.3.0"; @@ -34,8 +27,7 @@ unwrapped = stdenv.mkDerivation rec { preConfigure = '' patchShebangs scripts/ - '' - + stdenv.lib.optionalString doInstallCheck (exportLuaPathsFor [ lua.cqueues lua.basexx ]); + ''; nativeBuildInputs = [ pkgconfig meson ninja ]; @@ -61,7 +53,7 @@ unwrapped = stdenv.mkDerivation rec { ''; doInstallCheck = with stdenv; hostPlatform == buildPlatform; - installCheckInputs = [ cmocka which cacert ]; + installCheckInputs = [ cmocka which cacert lua.cqueues lua.basexx ]; installCheckPhase = '' meson test --print-errorlogs ''; @@ -75,26 +67,18 @@ unwrapped = stdenv.mkDerivation rec { }; }; -# FIXME: revert this back after resolving -# https://github.com/NixOS/nixpkgs/pull/63108#issuecomment-508670438 -wrapped-full = - with stdenv.lib; - with luajitPackages; - let - luaPkgs = [ +wrapped-full = runCommand unwrapped.name + { + nativeBuildInputs = [ makeWrapper ]; + buildInputs = with luajitPackages; [ 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; } - (exportLuaPathsFor luaPkgs - + '' + '' mkdir -p "$out"/{bin,share} makeWrapper '${unwrapped}/bin/kresd' "$out"/bin/kresd \ --set LUA_PATH "$LUA_PATH" \ @@ -106,6 +90,6 @@ wrapped-full = echo "Checking that 'http' module loads, i.e. lua search paths work:" echo "modules.load('http')" > test-http.lua echo -e 'quit()' | env -i "$out"/bin/kresd -a 127.0.0.1#53535 -c test-http.lua - ''); + ''; in result |