mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2026-01-07 22:37:23 +08:00
24 lines
412 B
Text
24 lines
412 B
Text
= In `flake.nix`
|
|
|
|
See the example in <<_introducing_a_dependency>>
|
|
where defined a development shell in <<hello-flake-dependency,flake.nix>>
|
|
with a dependency on `cowsay` ,
|
|
and tested the shell.
|
|
|
|
= In `shell.nix`
|
|
|
|
[source,nix,linenums]
|
|
.shell.nix
|
|
....
|
|
include::shell.nix[]
|
|
....
|
|
|
|
Here's a demonstration using the shell.
|
|
|
|
....
|
|
$# echo '$ nix-shell'
|
|
$# nix-shell --run bash <<EOL
|
|
$ hello
|
|
$ cowsay "moo"
|
|
$# EOL
|
|
....
|