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

Standardised main program detection/way to override it #6

Open
ralismark opened this issue Aug 30, 2022 · 1 comment
Open

Standardised main program detection/way to override it #6

ralismark opened this issue Aug 30, 2022 · 1 comment

Comments

@ralismark
Copy link

When bundling a derivation, there's no way to set the main program without modifying the derivation. This is an issue for derivations that have multiple binaries (e.g. nixpkgs#mesa-demos), or just any derivation that hasn't been configured. Plus, the main program detection logic being part of the bundler would likely result it in being inconsistent across bundlers.

I'm the maintainer of https://github.com/ralismark/nix-appimage and I already have gotten two issue related to main program detection, due to having to implement an ad-hoc solution:

I'm not sure if this is the right repo for this issue, so let me know if there's a better place for it.

@iwanb
Copy link

iwanb commented Apr 26, 2023

Maybe a solution could be to have special support for flake.nix "Apps" so it aligns with "nix run"? https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-run.html#apps

EDIT it seems adding outPath can be a workaround (at least for the default bundler):

        yanglint = {
          type = "app";
          program = "${pkgs.libyang}/bin/yanglint";
          outPath = "${pkgs.libyang}";
        };

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