mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 03:12:51 +00:00
lua wrapper: Fix bash error
Recently, we made it harder for external code to use some stdenv-only bash variables by unsetting them in [1] But Lua's `withPackages` was sourcing some setup hooks in [2], which required those bash variables. I say great! We caught something bad: Lua should use normal dependencies, even though that is harder with `buildEnv`. Now it works that way, and everything is fine. [1]:9d3911f806/pkgs/stdenv/generic/setup.sh (L574-L578)
[2]:9d3911f806/pkgs/development/interpreters/lua-5/wrapper.nix (L23-L27)
CC @matthewbauer
This commit is contained in:
parent
39ecc2db19
commit
a610a38cb5
@ -11,7 +11,7 @@
|
||||
let
|
||||
env = let
|
||||
paths = requiredLuaModules (extraLibs ++ [ lua ] );
|
||||
in buildEnv {
|
||||
in (buildEnv {
|
||||
name = "${lua.name}-env";
|
||||
|
||||
inherit paths;
|
||||
@ -20,12 +20,6 @@ let
|
||||
|
||||
# we create wrapper for the binaries in the different packages
|
||||
postBuild = ''
|
||||
|
||||
. "${makeWrapper}/nix-support/setup-hook"
|
||||
|
||||
# get access to lua functions
|
||||
. ${lua}/nix-support/setup-hook
|
||||
|
||||
if [ -L "$out/bin" ]; then
|
||||
unlink "$out/bin"
|
||||
fi
|
||||
@ -68,5 +62,8 @@ let
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}).overrideAttrs (_: {
|
||||
# Add extra deps needed for postBuild hook.
|
||||
nativeBuildInputs = [ makeWrapper lua ];
|
||||
});
|
||||
in env
|
||||
|
Loading…
Reference in New Issue
Block a user