Hi all,
I’m packaging an app which needs to be run reproducably. I’m currently using a flake with a devShell to define the environment, but still have to remember which command to execute in that devShell. I’d like to package this into my flake somehow, ideally so that a novice user can run nix run github:me/example_flake
to easily launch the app.
The problem is that the flake doesn’t compile a binary, it just uses binaries from other packages. So what I want to do is e.g.
- Set flakes A, B, and C as inputs so that they are available on $PATH
- Call a binary from flake A, with specific command-line options
The documentation for nix run
seems only to specify a particular binary in the nix store, but doesn’t seem to have a way of defining the environment in which that binary runs.
Am I missing something, or is this just not how nix run
is intended to be used? If not, how would you suggest going about what I’m aiming for (i.e. having an easy way for a non-nix-experienced user to launch a defined app in a defined nix environment).