query
On this page

mkMuslSystem

lib.systems.parse.mkMuslSystem

Docs pulled from | This Revision | 18 minutes ago


Nixpkgs manual

to parsed platforms.

Noogle detected

Implementation

The following is the current implementation of this function.

mkMuslSystem =
    parsed:
    # The following line guarantees that the output of this function
    # is a well-formed platform with no missing fields.
    (
      x:
      lib.trivial.pipe x [
        (x: removeAttrs x [ "_type" ])
        mkSystem
      ]
    )
      (
        parsed
        // {
          abi =
            {
              gnu = abis.musl;
              gnueabi = abis.musleabi;
              gnueabihf = abis.musleabihf;
              gnuabin32 = abis.muslabin32;
              gnuabi64 = abis.muslabi64;
              gnuabielfv2 = abis.musl;
              gnuabielfv1 = abis.musl;
              # The following entries ensure that this function is idempotent.
              musleabi = abis.musleabi;
              musleabihf = abis.musleabihf;
              muslabin32 = abis.muslabin32;
              muslabi64 = abis.muslabi64;
            }
            .${parsed.abi.name} or abis.musl;
        }
      );