Skip to content

flake/nixosSystem: pass the final lib to eval-config.nix#160459

Closed
ncfavier wants to merge 2 commits intoNixOS:masterfrom
ncfavier:nixosSystem-lib
Closed

flake/nixosSystem: pass the final lib to eval-config.nix#160459
ncfavier wants to merge 2 commits intoNixOS:masterfrom
ncfavier:nixosSystem-lib

Conversation

@ncfavier
Copy link
Member

Extracted from #157056. The makeExtensible fix isn't strictly necessary for this but seems reasonable regardless.

@ncfavier ncfavier requested a review from roberth February 17, 2022 12:00
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Feb 17, 2022
Comment on lines 110 to 112
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(see also #157056 (comment) for why this is necessary)

ncfavier added 2 commits March 1, 2022 16:48
Makes lib extensions available in modules by default
This is necessary for `lib` to still be extensible in the modules
evaluated by `evalModules`.
Also inline the call to `fix'` for performance.
@ncfavier
Copy link
Member Author

ncfavier commented Mar 1, 2022

Updated as per discussion in #157056 (comment)

@ncfavier
Copy link
Member Author

Even if #157056 is too much, I think this should go through. Should we have a vote?

@roberth
Copy link
Member

roberth commented Dec 1, 2022

This looks innocent, but it is a significant shift in what lib means.

Currently:

nixpkgsFlake.lib: all the functions (and more) that the flake needs to expose, merged in with the Nixpkgs function library
lib module argument: the Nixpkgs function library

After this:

nixpkgsFlake.lib: the better of the two libs that includes NixOS functions and possibly more
lib module argument: who knows

So this doesn't look like an unambiguous improvement.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 18, 2023
@ncfavier ncfavier closed this Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants