renameCrossIndexFrom
lib.customisation.renameCrossIndexFrom
Docs pulled from | This Revision | 9 minutes ago
Removes a prefix from 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 remove from cross index attribute names
crossIndex- A cross index with prefixed names
Type
renameCrossIndexFrom :: String -> AttrSet -> AttrSet
Examples
lib.customisation.renameCrossIndexFrom usage example
renameCrossIndexFrom "pkgs" { pkgsBuildBuild = ...; pkgsBuildHost = ...; ... }
=> { buildBuild = ...; buildHost = ...; ... }
Noogle detected
Implementation
The following is the current implementation of this function.
renameCrossIndexFrom = prefix: x: {
buildBuild = x."${prefix}BuildBuild";
buildHost = x."${prefix}BuildHost";
buildTarget = x."${prefix}BuildTarget";
hostHost = x."${prefix}HostHost";
hostTarget = x."${prefix}HostTarget";
targetTarget = x."${prefix}TargetTarget";
};