diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2019-11-22 19:43:17 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2019-11-22 19:47:27 -0500 |
commit | a610a38cb5909e40d47e2c54b4f06c6226594158 (patch) | |
tree | 649faeb6448b1bf323fd9ad94b2596d49868b7d9 /pkgs/development/interpreters/lua-5 | |
parent | 39ecc2db19b2687380c8a6ab3aca97eb4c976e17 (diff) | |
download | nixpkgs-a610a38cb5909e40d47e2c54b4f06c6226594158.tar nixpkgs-a610a38cb5909e40d47e2c54b4f06c6226594158.tar.gz nixpkgs-a610a38cb5909e40d47e2c54b4f06c6226594158.tar.bz2 nixpkgs-a610a38cb5909e40d47e2c54b4f06c6226594158.tar.lz nixpkgs-a610a38cb5909e40d47e2c54b4f06c6226594158.tar.xz nixpkgs-a610a38cb5909e40d47e2c54b4f06c6226594158.tar.zst nixpkgs-a610a38cb5909e40d47e2c54b4f06c6226594158.zip |
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]: https://github.com/NixOS/nixpkgs/blob/9d3911f806034197bb7ace586cc3696ffce7f447/pkgs/stdenv/generic/setup.sh#L574-L578 [2]: https://github.com/NixOS/nixpkgs/blob/9d3911f806034197bb7ace586cc3696ffce7f447/pkgs/development/interpreters/lua-5/wrapper.nix#L23-L27 CC @matthewbauer
Diffstat (limited to 'pkgs/development/interpreters/lua-5')
-rw-r--r-- | pkgs/development/interpreters/lua-5/wrapper.nix | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/pkgs/development/interpreters/lua-5/wrapper.nix b/pkgs/development/interpreters/lua-5/wrapper.nix index 816744e61cf..53ec2baeb5e 100644 --- a/pkgs/development/interpreters/lua-5/wrapper.nix +++ b/pkgs/development/interpreters/lua-5/wrapper.nix @@ -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 |