Closed shivaraj-bh closed 2 weeks ago
I'm supportive of the idea, but the Nix manual states
The only supported attributes are:
type
[...]program
[...]
I guess this is somewhat open to interpretation, but allowing any attribute whatsoever does not seem to be the intent.
nix flake check
is silent about it, but most likely that's just an oversight.
Could you open a PR to nix that documents the description
attribute? That way it can become a standard, and everyone benefits from better metadata and discoverability.
As for this PR, I'd be happy to accept a description
option when the Nix PR is accepted, but preferably not a freeformType
, because that would let typos in these attribute names to go uncaught, and iirc a freeformType
can also cause worse errors when "recursive" definitions are involved (e.g. desrcription = "something ${baseNameOf config.command}"
would be an infinite recursion because of the typo+freeformType).
Could you open a PR to nix that documents the description attribute? That way it can become a standard, and everyone benefits from better metadata and discoverability.
Good idea! Here’s the PR: https://github.com/NixOS/nix/pull/11297
@roberth I have made changes based on what was standardised upstream
@roberth Does it look good now?
@roberth Is there anything to be done here before merging? This would be useful to implement: https://github.com/juspay/omnix/issues/163
This allows specifying metadata info about the flake app. This has been standardised in Nix at https://github.com/NixOS/nix/pull/11297
Here’s an example of its usage: