Is there a way to use `pkgs.formats` with `libconfuse`?

libconfuse is a C library for reading config files. It defines its own config DSL, documented here: libConfuse tutorial.

I haven’t been able to find any discussion about pkgs.formats support for libconfuse. Is it actually already supported? Or am I the first person to want to apply RFC 42 to a service that uses libconfuse?

1 Like

As it’s a relatively obscure format, you’re likely the first one.
You may consider sending a PR for it if you believe multiple programs would benefit from it.

2 Likes

doesn’t exist yet, but libconfuse based software has at least one simplified instance in nixos: nixpkgs/nixos/modules/services/monitoring/watchdogd.nix at 26d499fc9f1d567283d5d56fcf367edd815dba1d · NixOS/nixpkgs · GitHub

please ping us back if you end up doing anything - at least i would be interested in hearing about it

2 Likes

Thanks for the pointer, @aanderse! I’ve done some additional research and written up my learnings about libconfig in a new issue on nixpkgs: Add `libconfuse` support to `pkgs.formats` · Issue #401565 · NixOS/nixpkgs · GitHub.