-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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-option: rewrite as a nix script, 2nd try #369151
base: master
Are you sure you want to change the base?
Conversation
CC @Mic92 @lf- @Aleksanaa @FireyFly @azuwis . |
@NixOS/nixpkgs-vet Can someone help me with the issue? |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Simply remove the default value for |
I also backported #363967 to make sure that we are not breaking installer tests. |
ff1f59d
to
06d8011
Compare
Interesting, getting the following errors in the
nixpkgs/nixos/tests/installer.nix Lines 738 to 740 in faf9ccd
Would appreciate some help. |
Moving this PR to draft until I find some way to fix the NixOS tests, help would be appreciate. |
@thiagokokada I believe these installers have some build dependencies injected into the build closure so they can install nixos offline. You might have pushed some new dependencies that you now also have to add to make the test work. |
Yes, that much I know. What is not clear to me is where I need to add the new dependencies, and why e.g.: |
No |
Hm, the installer test is attempting to build a different |
Okay that actually sounds very much like the filesets thing then. But it doesn’t use filesets and doesn’t look like it depends on anything that does so I’m a bit confused. I’m a little worried it’s |
Yea, it's the
This is sort of a variant of the chroot bug that afflicts filesets, because I used flakes and |
I think |
Yea, tested. |
This ports the functionality of the C++ nixos-option to a nix script (with a tiny shellscript for argument processing and invoking the nix script). Benefits compared to the native binary include no longer being tied to a specific nix version, generally improved maintainability and improved stability. The main tradeoff is that the C++ version would have better access to introspecting and reporting errors nicely, but that doesn't seem to have been the case in practice anyway. The other tradeoff is that we generate all the output at the end instead of streaming it as we traverse the option tree. Co-authored-by: Zhong Jianxin <[email protected]> Co-authored-by: aleksana <[email protected]> Co-authored-by: eclairevoyant <[email protected]>
06d8011
to
f2d7d55
Compare
Done. Edit: run the tests locally, seems to be working now. Thanks @emilazy @ElvishJerricco. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/5036 |
Replaces: #313497.
The only changes compared to the PR above:
pkgs/by-name
nixosTests.installer.simpleUefiSystemdBoot
aspassthru.tests
sincenixos-option
failure is a channel blocker: nixos-option: link to nixos test #363967Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.