Nix (command): Difference between revisions

imported>Mic92
imported>Mic92
add nix develop
Line 51: Line 51:
===  <code>nix develop</code> ===
===  <code>nix develop</code> ===


run a bash shell that provides the build environment of a derivation
==== Usage ====


<syntaxHighlight lang=console>
$ nix develop FLAGS... INSTALLABLE?
</syntaxHighlight>
==== Description =====
run a bash shell that provides the build environment of a derivation.
==== Examples ====
To get the build environment of GNU hello:
<syntaxHighlight lang=console>
$ nix develop nixpkgs#hello
</syntaxHighlight>
To get the build environment of the default package of flake in the current directory:
<syntaxHighlight lang=console>
$ nix develop
<syntaxHighlight lang=console>
To store the build environment in a profile:
<syntaxHighlight lang=console>
$ nix develop --profile /tmp/my-shell nixpkgs#hello
<syntaxHighlight lang=console>
To use a build environment previously recorded in a profile:
<syntaxHighlight lang=console>
$ nix develop /tmp/my-shell
<syntaxHighlight lang=console>


=== <code>nix flake</code> ===
=== <code>nix flake</code> ===