Nix 2.29.1
Nix, the purely functional package manager; unstable internal interfaces
|
R""(
Start a shell with the build environment of the default package of the flake in the current directory:
Typical commands to run inside this shell are:
Alternatively, you can run whatever build tools your project uses directly, e.g. for a typical Unix project:
Run a particular build phase directly:
Start a shell with the build environment of GNU Hello:
Record a build environment in a profile:
Use a build environment previously recorded in a profile:
Replace all occurrences of the store path corresponding to glibc.dev with a writable directory:
Note that this is useful if you're running a nix develop shell for nixpkgs#glibc in ~/my-glibc and want to compile another package against it.
Run a series of script commands:
nix develop starts a bash shell that provides an interactive build environment nearly identical to what Nix would use to build installable. Inside this shell, environment variables and shell functions are set up so that you can interactively and incrementally build your package.
Nix determines the build environment by building a modified version of the derivation installable that just records the environment initialised by stdenv and exits. This build environment can be recorded into a profile using --profile.
The prompt used by the bash shell can be customised by setting the bash-prompt, bash-prompt-prefix, and bash-prompt-suffix settings in nix.conf or in the flake's nixConfig attribute.
If no flake output attribute is given, nix develop tries the following flake output attributes:
If a flake output name is given, nix develop tries the following flake output attributes:
)""