flake-utils
flake-utils copied to clipboard
Use `meta.mainProgram` by default in `mkApp`
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
there are many packages specify the mainProgram in meta section, the mkApp should follow that conversion and use bin/$drv.meta.mainProgram by default.
Describe alternatives you've considered
Additional context
Indeed. mkApp was added before that heuristic was added to nix. TBH I think mkApp should mostly get deprecated.
Agree on making mkApp itself deprecated. It adds little value and is a confusing abstraction.
I would still recommend adding a warning or note with this that explains that passthru.exePath is no longer used and meta.mainProgram should be used instead. As this would be vastly helpful for anyone who may have set this option in their derivations in the past for mkApp support.
Sounds good, do you want to do a PR for it?
Opened! :smile: