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/make-test: don't pick up impure overlays #75170

Closed
wants to merge 2 commits into from

Conversation

bjornfor
Copy link
Contributor

@bjornfor bjornfor commented Dec 7, 2019

Motivation for this change

Specify overlays = [] to prevent nixpkgs from evaluating overlays from
$HOME etc.

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 @tfc @Ekleog @aszlig

Specify overlays = [] to prevent nixpkgs from evaluating overlays from
$HOME etc.
@bjornfor
Copy link
Contributor Author

bjornfor commented Dec 7, 2019

Several nixos tests also imported nixpkgs but left out the overlays argument (impure). Added a 2nd commit to fix those.

@aszlig
Copy link
Member

aszlig commented Dec 8, 2019

Hm, maybe it's a better idea to just import ../../pkgs/top-level instead, because every time there is a new attribute added to impure.nix we need to change the arguments of all those imports again?

@bjornfor
Copy link
Contributor Author

bjornfor commented Dec 8, 2019

Hm, maybe it's a better idea to just import ../../pkgs/top-level instead, because every time there is a new attribute added to impure.nix we need to change the arguments of all those imports again?

That sounds like a good idea, but I'm not sure what to pass to the one and only mandatory ../../pkgs/top-level/default.nix argument named localSystem. On my x86 system it seems the localSystem value passed is {}. Is that a reasonable value to "hardcode" into all nixpkgs imports in the various nixos tests? Ping @Ericson2314.

Many nixos tests import nixpkgs but don't specify the overlays argument.
That means nixpkgs will look for overlays in impure $HOME etc. Fix it by
passing overlays = [].

A few tests even imported <nixpkgs> instead of the current nixpkgs
(relative path). Fix those while at it.
@stale
Copy link

stale bot commented Jun 5, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 5, 2020
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 3, 2020
@stale
Copy link

stale bot commented Jun 6, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 6, 2021
@bjornfor
Copy link
Contributor Author

Hopefully unneeded now that #203028 is merged (and a lot of refactoring since this diff was made).

@bjornfor bjornfor closed this Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants