-
-
Notifications
You must be signed in to change notification settings - Fork 360
modules/nixpkgs: complete the MVP #2738
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
Conversation
acb3694 to
b607b1d
Compare
5935e30 to
a5044b0
Compare
e32c022 to
737ff93
Compare
737ff93 to
1e2b758
Compare
d36578e to
7fefe3f
Compare
7fefe3f to
95a7977
Compare
This comment has been minimized.
This comment has been minimized.
95a7977 to
9592b51
Compare
7de125b to
9c238c7
Compare
|
Thanks for the help @khaneliman I've reduced flakyness by testing with a mock nixpkgs source rather than downloading a real instance. I've also narrowed the scope of the tests to focus on only the nixpkgs module and its dependencies. That way we aren't accidentally using the pkgs instance elsewhere in unrelated modules. The |
6d4afd5 to
79d66da
Compare
ce7de69 to
2b93420
Compare
2b93420 to
9191ac7
Compare
GaetanLepage
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I'm able to understand those changes (~70%), this looks good !
I trust you and @traxys on the details ;)
331f94a to
0104e26
Compare
0104e26 to
5147429
Compare
|
@mergify queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 5147429 |
|
This pull request, with head sha This pull request will be automatically closed by GitHub.As soon as GitHub detects that the sha It is possible for this pull request to remain open if this detection does not happen, this usually happens when a force-push is done on this branch |
This PR finally gets the
nixpkgsmodule to a fully functional state. Ifnixpkgs.pkgsis not defined, then an instance of nixpkgs is constructed fromnixpkgs.source.Constructing nixpkgs also requires knowing which system to target, so the
hostPlatformandbuildPlatformoptions are included.I also included the
nixpkgs.configoption. This could just beattrsOf anything, but I've used the upstream option-type because it handles some special cases while merging definitions.I've also added the non-standalone option
nixpkgs.useGlobalPackages, which automatically setsnixpkgs.pkgsto the "host" or "global" packages; i.e. thepkgsarg in use by the outer module eval.Most implementation is directly based on https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/misc/nixpkgs.nix
Follow up to:
inputs.nixpkgsintoevalNixvim#2670overlaysoption #2430pkgsoption; dropdefaultPkgsspecialArg #2301Closes #2022
Closes #2437
Fixes #1784
Future work
systemagnostic Nixvim factorynixvimConfig) #2210Constructing
pkgswithin the module system allows us to have a system-agnostic replacement formakeNixvimWithModuleand somewhat simplify the standalone templateNote:
lib.nixvim.modules.evalNixvimis already system-agnostic. We simply need to provide documentation and/or new wrapper-functions for use by end-users.Migrating
useGlobalPackagesdefaultI'm not 100% sure I know a good way to warn about that planned transition though. Maybe we'll just have to have an obnoxious but temporary warning shown to all users? Could still be missed by users who don't update very often.