renameCrossIndexTo
lib.renameCrossIndexTo
Docs pulled from | This Revision | 9 minutes ago
Adds a prefix to the attribute names of a cross index.
A cross index (short for "Cross Platform Pair Index") is a 6-field structure organizing values by cross-compilation platform relationships.
Inputs
prefix- The prefix to add to cross index attribute names
crossIndex- A cross index to be prefixed
Type
renameCrossIndexTo :: String -> AttrSet -> AttrSet
Examples
lib.customisation.renameCrossIndexTo usage example
renameCrossIndexTo "self" { buildBuild = ...; buildHost = ...; ... }
=> { selfBuildBuild = ...; selfBuildHost = ...; ... }
Noogle detected
Implementation
The following is the current implementation of this function.
renameCrossIndexTo = prefix: x: {
"${prefix}BuildBuild" = x.buildBuild;
"${prefix}BuildHost" = x.buildHost;
"${prefix}BuildTarget" = x.buildTarget;
"${prefix}HostHost" = x.hostHost;
"${prefix}HostTarget" = x.hostTarget;
"${prefix}TargetTarget" = x.targetTarget;
};