rename attrs.listToAttrsIdentity -> attrs.identityAttrsList
the name was easily confusable with listToAttrs which expects {name =
...; value = ...; } structure
This commit is contained in:
parent
4722d566ff
commit
3d2f657e9d
2 changed files with 9 additions and 9 deletions
|
|
@ -1,12 +1,9 @@
|
|||
{lists}: rec {
|
||||
nameValuePair = name: value: {inherit name value;};
|
||||
|
||||
listToAttrsIdentity = values:
|
||||
builtins.listToAttrs (
|
||||
builtins.map
|
||||
(x: nameValuePair x x)
|
||||
values
|
||||
);
|
||||
identityAttrs = value: {${value} = value;};
|
||||
|
||||
identityAttrsList = values: builtins.map (v: identityAttrs v) values;
|
||||
|
||||
/**
|
||||
Generate an attribute set by mapping a function over a list of
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{lists}: let
|
||||
{
|
||||
attrs,
|
||||
lists,
|
||||
}: let
|
||||
# === Internal Helper Functions ===
|
||||
toSystemName = arch: platform: "${arch}-${platform}";
|
||||
listsToSystemNames = archs: platforms:
|
||||
|
|
@ -9,14 +12,14 @@
|
|||
];
|
||||
in rec {
|
||||
# REF: https://github.com/nix-systems/nix-systems
|
||||
archs = lists.listToAttrsIdentity [
|
||||
archs = attrs.identityAttrsList [
|
||||
"x86_64"
|
||||
"aarch64"
|
||||
"riscv64"
|
||||
];
|
||||
|
||||
# REF: https://github.com/nix-systems/nix-systems
|
||||
platforms = lists.listToAttrsIdentity [
|
||||
platforms = attrs.identityAttrsList [
|
||||
"linux"
|
||||
"darwin"
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue