Allow overriding configuration from outside #14
No reviewers
Labels
No labels
Compat
Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: auxolotl/foundation#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "aleksi/foundation:receive-config"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Use case: downstream users may want to override the GNU mirror URL,
as the main ftp.gnu.org repository has caused slow downloads. Now it is possible to
perform e.g.
Use case: downstream users may want to override the GNU mirror URL, as the main FTP has caused slow downloads. Now it is possible to perform e.g. (import ./default.nix) { config.aux.mirrors.gnu = "https://www.nic.funet.fi/pub/gnu/ftp.gnu.org/pub/gnu/"; }Allow overriding configuration from outsideto WIP: Allow overriding configuration from outsidee2be002d7ctoc728bc74f0c728bc74f0to8cdaee81c8WIP: Allow overriding configuration from outsideto Allow overriding configuration from outsideIncorporates #13. Otherwise
builtins.mapAttrsinsrc/exports/default.nixwill cause eager evaluation of packages (including fetching) with the default mirror regardlessI think it would be best to just include your commit and avoid mixing PRs. We'll just have to wait until #13 for mirror overrides to work properly, making foundation extensible still has value in tiself in my opinion.
I cherry-picked it locally and it looks good to me, so I'd approve id if it was just your changes :)
8cdaee81c8to24507466feYes, that's a good idea. I've rebased the branch
I wonder if it's worth wrapping the extend function we expose to call extend and then return the resolved package set, so that consumers using extend don't need to access
config.export.resolved.packageson the result. It seems like that's the only thing we export publicly here, so I don't see too much reason not to.24507466feto25d6d22fe2That seems better indeed. This new revision accesses the export automatically.
Nice, looks good to me!
@ -13,2 +13,4 @@inresult.config.exports.resolved.packages// {extend = overrides: (result.extend overrides).config.exports.resolved.packages;Because
extendnow returns the resolved packages, the extended foundation loses itsextendattribute. I think this should beto allow doing
((import <foundation> {}). extend { /*...*/ }). extend { /*...*/ }as many times as we want. A bit more complex but I didn't see an obviously better way :)Edit: corrected my suggestion, it was wrong (now it's good :3)
25d6d22fe2to3bf00f6552Completely missed that one! I've made another revision for this 👍
Looks good, thanks :D
3bf00f6552to0ec06286d70ec06286d7toe646661c32I've replicated the change into flake.nix as well.