query
On this page

renameCrossIndexTo

lib.customisation.renameCrossIndexTo

Docs pulled from | This Revision | about 1 hour 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

Aliases

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;
  };