Skip to content

Commit

Permalink
lib: eachSystem: improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
trueNAHO committed Sep 16, 2024
1 parent e8a5a7b commit 274ed07
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ let
# eachSystem using defaultSystems
eachDefaultSystem = eachSystem defaultSystems;

# Builds a map from <attr>=value to <attr>.<system>=value for each system
#
# Builds a map from <attr>=value to <attr>.<system>=value for each system.
eachSystem =
systems: f:
let
# Merge together the outputs for all systems.
# Merge outputs for each system.
op =
attrs: system:
let
Expand All @@ -50,7 +49,7 @@ let
builtins.foldl' op { } (
systems
++
# add the current system if --impure is used
# Add the current system if the --impure flag is used.
(
if builtins ? currentSystem then
if builtins.elem builtins.currentSystem systems then
Expand Down

0 comments on commit 274ed07

Please sign in to comment.