mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2026-02-22 21:05:23 +08:00
21 lines
438 B
Text
21 lines
438 B
Text
= Ad hoc environments
|
|
|
|
== Access a top level package from the Nixpkgs/NixOS repo
|
|
|
|
....
|
|
$# start-shell nix shell nixpkgs#cowsay <<EOL
|
|
$ cowsay "moo"
|
|
$# EOL
|
|
....
|
|
|
|
== Access a flake
|
|
|
|
In this example, we will use a flake defined in a remote git repo.
|
|
However, you can use any of the flake reference styles defined in <<#flakeref>>.
|
|
|
|
....
|
|
$# start-shell nix shell git+https://codeberg.org/mhwombat/hello-flake <<EOL
|
|
$ hello-flake
|
|
$# EOL
|
|
....
|
|
|