mirror of
https://github.com/numtide/flake-utils.git
synced 2024-12-15 17:50:53 +00:00
lib: eachSystem: optimize hot path by assuming rare --impure usage
This commit is contained in:
parent
db82e07bd4
commit
58351e4428
1 changed files with 6 additions and 10 deletions
16
lib.nix
16
lib.nix
|
@ -48,17 +48,13 @@ let
|
|||
)
|
||||
{ }
|
||||
(
|
||||
systems
|
||||
++
|
||||
if
|
||||
!builtins ? currentSystem || builtins.elem builtins.currentSystem systems
|
||||
then
|
||||
systems
|
||||
else
|
||||
# Add the current system if the --impure flag is used.
|
||||
(
|
||||
if
|
||||
builtins ? currentSystem && !builtins.elem builtins.currentSystem systems
|
||||
then
|
||||
[ builtins.currentSystem ]
|
||||
else
|
||||
[ ]
|
||||
)
|
||||
systems ++ [ builtins.currentSystem ]
|
||||
);
|
||||
|
||||
# eachSystemMap using defaultSystems
|
||||
|
|
Loading…
Reference in a new issue