query
On this page

mkTuple

lib.gvariant.mkTuple

Docs pulled from | This Revision | about 2 hours ago


Returns the GVariant tuple from the given Nix list.

Inputs

elems

1. Function argument

Type

mkTuple :: [Any] -> gvariant

Noogle detected

Implementation

The following is the current implementation of this function.

mkTuple =
    elems:
    let
      gvarElems = map mkValue elems;
      tupleType = type.tupleOf (map (e: e.type) gvarElems);
    in
    mkPrimitive tupleType gvarElems
    // {
      __toString = self: "@${self.type} (${concatMapStringsSep "," toString self.value})";
    };