query
On this page

renameCrossIndexFrom

lib.renameCrossIndexFrom

Docs pulled from | This Revision | about 1 hour 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 = ...; ... }
(lib.customisation.renameCrossIndexFrom)

Noogle detected

Aliases

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