nix run .#package-name
should work, no?
Ah, different executables. Try nix --accept-flake-config run github:juspay/omnix show <your-flake>
. You should see the executables in the apps section.
Do you have to add any reference of the other executables in the flake file?
I will try that out shortly!
If you try it out in the haskell-flake example, you can expect the two executables to show up:
That command indeed shows up the correct list of executables for the project
But I'm not too sure nix build .#exec-2
works as intended.
You have to nix run
it:
❯ nix run .#ex2
warning: Git tree '/Users/srid/code/haskell-flake' is dirty
Hello, Haskell!
nix build
is used for packages not apps
As you can see from the output of om show
in that screenshot above. See the table header.
I see my mistake. Does that mean that the flake does not need to reference any executable?
haskell-flake auto-generates them for you
apps.ex2 just wraps packages.example
I see, I see
If you are curious of implementation.
${lib.getBin package}/bin/${exe}
I think we can put this to solved. My original problem seems to have been addressed and now I just can't run the executables because of different reasons (one of the packages is not passing checkPhase)
Thank you very much, both for haskell-flake and helping me with these questions!
Last updated: Apr 26 2025 at 14:15 UTC