flox run
command¶
NAME¶
flox-run - run app from current project
SYNOPSIS¶
flox [ <general-options>
] run [ <run-options>
] [
<installable>
] [ – [ <nix command args>
] – [ <command args>
… ] ]
DESCRIPTION¶
Run a flake application from the requested installable. See the nix(1) manual’s section on installables for more information.
EXAMPLES¶
Running applications in the current working directory¶
If flox run
is called without any arguments, and a controlling tty is
available, it will offer the user a selection of installable from the
current flake. Note, in this example, it’s assumed there’s a flake.nix
in the current directory path.
$ flox run
? Select a packageapp for flox run
> flox
flox-bash
nix-editor
[↑ to move, enter to select, type to filter]
If flox run
is called with an argument, it will try to run that
installable instead, without asking for user input. Note, in this
example, it’s assumed there’s a flake.nix
in the current directory.
$ flox run flox -- -- --version
Running applications from nixpkgs¶
It is possible to use flox run
, to run packages from nixpkgs as
follows.
Passing flags¶
Flags can be passed to the called installable as follows.
OPTIONS¶
RUN OPTIONS¶
[ – [ <nix command args>
] – [ <command args>
… ] ]
Arguments passed to the application
General Options¶
Many flox commands wrap Nix commands of the same name, and will
correspondingly pass on options and arguments directly to the underlying
nix
invocation. For more information on the options supported by
specific Nix commands please invoke flox nix <command> help
.
The following options are used specifically by flox
and must be
specified before the <command>
argument.
-v, --verbose
Verbose mode. Invoke multiple times for increasing detail.
--debug
Debug mode. Invoke multiple times for increasing detail.
-V, --version
Print flox
version.
--prefix
Print flox
installation prefix / Nix store path. (flox internal use
only.)
--bash-passthru
Force execution in flox-bash
(flox internal use only.)
Development Options¶
The following options are supported by all Development Commands:
[(-A|--attr) <package>]
Selects package (aka “attrPath”) to be used. If not provided flox
will
prompt for you to select from the list of known packages.
[--stability <stability>]
Selects the set of nixpkgs to be used as a basis