nix-community / manix

A fast CLI documentation searcher for Nix [maintainers=@IogaMaster, @akarui-hikarii]
Apache License 2.0
59 stars 4 forks source link

fix NixOS options description type #19

Closed jonboh closed 2 months ago

jonboh commented 4 months ago

It seems that the json representation of NixOS options has changed from being a string to an object with

{
  "_type": "", 
  "text": "the description"
}

That made the deserialization of the resulting json fail for NixOS options.

I wasn't able to pinpoint when this change happened or if it applies to all versions, so comments are welcomed to fix this the best way possible :)

I think this would close https://github.com/nix-community/manix/issues/17

bayou-brogrammer commented 2 months ago

High level this looks okay to me and will solve thew issue. Unfortunate that they changed the schema.

Has this been tested locally? @jonboh

jonboh commented 2 months ago

Coming back after some time I'm suprised to find that the schema seems to be back to the original, so this change does no longer apply:

nix run 'github:nix-community/manix' zone

displays NixOS options just fine.

Would it make sense to pin the evaluation of the documentation to avoid that a manix version will fail or not depending on the state of the machine/nixpkgs?

IogaMaster commented 2 months ago

Yeah, I will look into that. I wanted to thank you for your work!