nix-book/source/recipes/nixpkgs-pkg/shell/main.adoc0
Amy de Buitléir 90b9c96dc5 expanded
2025-09-02 16:56:18 +01:00

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
....