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

lua wrapper: Fix bash error #73946

Merged
merged 1 commit into from Nov 23, 2019
Merged

Conversation

Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Nov 23, 2019

Motivation for this change

Recently, we made it harder for external code to use some stdenv-only bash
variables by unsetting them in

# Unset setup-specific declared variables
unset allPlatOffsets
unset pkgBuildAccumVars pkgHostAccumVars pkgTargetAccumVars pkgAccumVarVars
unset pkgBuildHookVars pkgHostHookVars pkgTargetHookVars pkgHookVarVars
unset propagatedDepFilesVars
But Lua's withPackages was sourcing some
setup hooks in
. "${makeWrapper}/nix-support/setup-hook"
# get access to lua functions
. ${lua}/nix-support/setup-hook
, 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.

CC @matthewbauer

Fixes #73887

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

neovim broken by recent (stdenv?) refactoring in master
2 participants