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

nixos/hydra: wrap systemPackages with hydra envvars #84977

Closed
wants to merge 1 commit into from

Conversation

ehmry
Copy link
Contributor

@ehmry ehmry commented Apr 11, 2020

Leave environment.variables untouched and wrap the utilities that are
added to environment.systemPackages. This avoids problems where shells
fail to source environment.variables.

Motivation for this change

I had a very frustrating situation where the fish shell failed to source HYDRA_DBI set by environment.systemPackages and the hydra-create-user utility fell back to a stale Sqlite codepath.

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 nixpkgs-review --run "nixpkgs-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.

@ehmry
Copy link
Contributor Author

ehmry commented Apr 11, 2020

This patch removes HYDRA_DBI, HYDRA_CONFIG, and HYDRA_DATA from the global environmental variables, which I can't be sure wont cause problems for all deployments.

@ehmry ehmry requested a review from Ma27 April 11, 2020 06:22
Leave environment.variables untouched and wrap the utilities that are
added to environment.systemPackages. This avoids problems where shells
fail to source environment.variables.
@Ma27
Copy link
Member

Ma27 commented Apr 11, 2020

@ehmry thanks for your PR! Unfortunately I had to close it since this is a duplicate of #82507 which is also a bit nicer since it uses buildEnv rather than fixing duplications with meta.priority.

I'm very sorry I forgot about this PR and you fixed the issue yourself!

@ehmry ehmry deleted the hydraEnv branch April 12, 2020 09:18
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.

None yet

2 participants