mirror of
https://github.com/numtide/flake-utils.git
synced 2025-03-16 13:28:22 +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.
|
# Add the current system if the --impure flag is used.
|
||||||
(
|
systems ++ [ builtins.currentSystem ]
|
||||||
if
|
|
||||||
builtins ? currentSystem && !builtins.elem builtins.currentSystem systems
|
|
||||||
then
|
|
||||||
[ builtins.currentSystem ]
|
|
||||||
else
|
|
||||||
[ ]
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
# eachSystemMap using defaultSystems
|
# eachSystemMap using defaultSystems
|
||||||
|
|
Loading…
Add table
Reference in a new issue