flake-utils icon indicating copy to clipboard operation
flake-utils copied to clipboard

Use `meta.mainProgram` by default in `mkApp`

Open yihuang opened this issue 3 years ago • 4 comments

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

yihuang avatar May 16 '22 02:05 yihuang

Indeed. mkApp was added before that heuristic was added to nix. TBH I think mkApp should mostly get deprecated.

zimbatm avatar May 17 '22 08:05 zimbatm

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.

soupglasses avatar Aug 19 '23 00:08 soupglasses

Sounds good, do you want to do a PR for it?

zimbatm avatar Aug 19 '23 23:08 zimbatm

Opened! :smile:

soupglasses avatar Aug 20 '23 01:08 soupglasses