nvfetcher icon indicating copy to clipboard operation
nvfetcher copied to clipboard

Feature request: metadata passthrough / more type support

Open danielphan2003 opened this issue 4 years ago • 1 comments

As my nixpkgs grows bigger, I plan to also generate metadata for each of the packages I defined. Using passthru in sources.toml isn't very helpful because it assume whatever value that it takes is a string, thus preventing greater control of the generated nix expr. I suppose a separate meta attribute would suffice (including more type support).

Maybe Nix could also be used interchangeably with toml? Though I would be fine if I can just evaluate Nix into toml and use that instead.

danielphan2003 avatar Dec 20 '21 14:12 danielphan2003

I also considered about this question. Currently we use string interpolation to generate nix expr, which is not neat and error-prone. If we could create the expression programmatically, i.e. constructing and pretty printing the AST, it won't be hard to transpile toml to according nix expression.

berberman avatar Dec 20 '21 18:12 berberman