anchor.diff:      "NoDisplay" = boolOrNullToString noDisplay;
       "Comment" = comment;
       "Icon" = icon;
  -    "OnlyShowIn" = renderList onlyShowIn;
  -    "NotShowIn" = renderList notShowIn;
  +    "OnlyShowIn" = renderList "onlyShowIn" onlyShowIn;
  +    "NotShowIn" = renderList "notShowIn" notShowIn;
       "DBusActivatable" = boolOrNullToString dbusActivatable;
       "TryExec" = tryExec;
       "Exec" = exec;
       "Path" = path;
       "Terminal" = boolOrNullToString terminal;
  -    "Actions" = renderList (builtins.attrNames actions);
  -    "MimeType" = renderList mimeTypes;
  -    "Categories" = renderList categories;
  -    "Implements" = renderList implements;
  -    "Keywords" = renderList keywords;
  +    "Actions" = renderList "actions" (builtins.attrNames actions);
  +    "MimeType" = renderList "mimeTypes" mimeTypes;
  +    "Categories" = renderList "categories" categories;
  +    "Implements" = renderList "implements" implements;
  +    "Keywords" = renderList "keywords" keywords;
       "StartupNotify" = boolOrNullToString startupNotify;
       "StartupWMClass" = startupWMClass;
       "URL" = url;
  
positive.code:   boolOrNullToString = value:
      if value == null then null
      else if builtins.isBool value then lib.boolToString value
      else throw "Value must be a boolean or null!";
  
    # Multiple values are represented as one string, joined by semicolons.
    # Technically, it's possible to escape semicolons in values with \;, but this is currently not implemented.
    renderList = value:
      if !builtins.isList value then throw "Value must be a list!"
      else if builtins.any (item: lib.hasInfix ";" item) value then throw "Values in list must not contain semicolons!"
      else if value == [] then null
      else builtins.concatStringsSep ";" value;
  
  
negative.code: let
    # FIXME: workaround until https://github.com/NixOS/nixpkgs/pull/162246 lands
    cleanName = if lib.hasInfix " " name
                  then throw "makeDesktopItem: name must not contain spaces!"
                  else name;
  
    # There are multiple places in the FDO spec that make "boolean" values actually tristate,
  