nix-community / dconf2nix

:feet: Convert dconf files (e.g. GNOME Shell) to Nix, as expected by Home Manager [maintainer=@jtojnar]
Apache License 2.0
227 stars 6 forks source link

Problem parsing array properties #112

Open akaihola opened 1 month ago

akaihola commented 1 month ago

Type of bug

Parsing error

Version

0.1.1

Did you test against master?

Error message (if not timeout)

$ dconf2nix </tmp/dconf.dump
dconf2nix: "<stdin>" (line 2, column 16):
unexpected "s"
expecting white space, "@", "{", "[", "'", "false", "true", "-", digit, "uint32 ", "int64 ", "\"", "(" or "<("
CallStack (from HasCallStack):
  error, called at src/DConf2Nix.hs:35:16 in dconf2nix-0.1.1-AY0n40I6HuiBfBhx2w9LA5:DConf2Nix

DConf input

[org/gnome/desktop/input-sources]
mru-sources=@a(ss) []

Additional context

Removing the @a(ss) type in my input file leads to a successful run.

As mentioned by @michael-catanzaro in this RedHat Bugzilla comment,

@a(ss) is the type of the value (array of tuples, each tuple containing two strings)
jtojnar commented 1 month ago

Thanks for reporting, this should have been fixed by https://github.com/nix-community/dconf2nix/commit/49fcec8bf00378e2f6b118be0e8193386ae02d3d.

There are still some things I need to finish before releasing a new version but not sure when I will be able to get to it.