Closed bb010g closed 1 year ago
Any thoughts / concerns about this concept and/or implementation?
As long as changing systems
doesn't cause unnecessary reevaluations, then I'm good with dropping the defaultSystems
/ allSystems
divide. Cc/ @nrdxp since I stole this from them.
EDIT: Removing allSystems
does cause problems for flakeUtils.lib.system
, as it validates against allSystems
.
I tried the defaultSystems
→ systems
rename anyways, and it results in a few breaking changes.
Sorry, I meant only expose a single input called systems
, and connect it to defaultSystems.nix
. Ignore or deprecate allSystems
. flake-utils is stable so we shouldn't break back-compat.
What do you want to do about eachDefaultSystem
and eachDefaultSystemMap
? They can't directly rename to eachSystem
and eachSystemMap
because those names are taken by the parameterized variants.
I would keep all the library functions as is. allSystems is not overridable, but that's fine; I don't think people are really using it.
If it's unclear, push the previous version and I will do the changes.
Alright, dropped all of the breaking renames (all but defaultSystems
→ systems
) and kept backwards compatibility.
Alright, reorganized and cleaned up using your ideas from https://github.com/numtide/treefmt/pull/228 and https://github.com/zimbatm/exp-flake-systems.
thanks for your help! #93 introduces what I had in mind, I hope you won't mind me closing this PR
This patch set allows for easy overriding of systems lists downstream via flake inputs, in a library-agnostic way. Ideally, all flakes that consume systems lists will avoid hard-coding them and instead consume them via flake inputs, allowing systems to be robustly introduced to or removed from evaluation. Flake inputs consisting of these pure, plain Nix source files should be the lowest-common denominator for systems list concerns.
Compatibility with existing direct access of
default.nix
is maintained. If that interface is not stable, then the introduction oflib.nix
can be eliminated.The
defaultSystems
input in flake-utils is the same as thesystems
input in https://github.com/divnix/nosys.