You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ported nix-freeze-tree to flake-parts. It exports a function for freezing a derivation as a tree of fixed-output derivations and uses a native program to do this. Because I can't assign to lib in perSystem, I am forced to declare these functions in flake and use flake-utils' eachSystem to generate this function. Is there a better way to either:
Emit per-system functions by setting them in perSystem, or
Call an equivalent to eachSystem without having to go through flake-utils?
Call an equivalent to eachSystem without having to go through flake-utils?
You could define lib using perSystem, similar to how flake-parts does it for other attributes. The formatter.nix is a reasonable template for this, if you omit perInput, because the format of lib isn't standardized for arbitrary flakes.
I'm not a big fan of doing it this way, because system attributes are bothersome.
(3?)
You could expose a flake-parts module that adds your library as a module argument. That way it can use the user pkgs, which can be something fancy, like a cross compiled package set.
I ported
nix-freeze-tree
toflake-parts
. It exports a function for freezing a derivation as a tree of fixed-output derivations and uses a native program to do this. Because I can't assign tolib
inperSystem
, I am forced to declare these functions inflake
and useflake-utils
'eachSystem
to generate this function. Is there a better way to either:perSystem
, oreachSystem
without having to go throughflake-utils
?https://git.sr.ht/~jack/nix-freeze-tree/tree/343fd80a67db6f55cacc1961f60bbac91d96bbb6/item/flake.nix#L27-52 is what I am currently doing.
The text was updated successfully, but these errors were encountered: