Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't set mainProgram when it matches pname #595

Open
SuperSandro2000 opened this issue Feb 7, 2023 · 1 comment
Open

Don't set mainProgram when it matches pname #595

SuperSandro2000 opened this issue Feb 7, 2023 · 1 comment

Comments

@SuperSandro2000
Copy link
Member

stdenv.mkDerivation falls back to pname when meta.mainProgram is not set. cabal2nix should follow that and only set mainProgram when it differes from pname.

@sternenseemann
Copy link
Member

stdenv.mkDerivation falls back to pname

Nix does, not stdenv.mkDerivation. If meta.mainProgram is not set, it is not set.

There is a difference between not knowing the main program where with nix run its reasonable to make an assumption, and other cases where it may not be reasonable to do so.

cabal2nix may even not emit a mainProgram binding if an executable of the same name exists, indicating that it was not able to determine for sure that that executable is the main one.

Consequently, I don't see a reason to change this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants