5 examples = lib.mkOption { type = lib.types.attrs; };
6 assertion = lib.mkOption { type = lib.types.bool; };
10 examples = with lib.gvariant; {
13 int32 = mkInt32 (- 42);
15 int16 = mkInt16 (-42);
17 int64 = mkInt64 (-42);
20 array2 = mkArray [ (mkInt32 1) ];
21 array3 = mkArray [ (mkUint32 2) ];
22 emptyArray = mkEmptyArray type.uint32;
27 tuple = mkTuple [ (mkInt32 1) [ "foo" ] ];
28 maybe1 = mkNothing type.string;
29 maybe2 = mkJust (mkUint32 4);
30 variant = mkVariant "foo";
31 dictionaryEntry = mkDictionaryEntry (mkInt32 1) [ "foo" ];
36 mkLine = n: v: "${n} = ${toString (lib.gvariant.mkValue v)}";
37 result = lib.concatStringsSep "\n" (lib.mapAttrsToList mkLine config.examples);
44 dictionaryEntry = @{ias} {1,@as ['foo']}
46 escapedString = '\'\\\n'
54 tuple = @(ias) (1,@as ['foo'])