mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2026-01-10 15:52:36 +08:00
20 lines
349 B
Text
20 lines
349 B
Text
= An (old-style) Nix shell with access to a flake
|
|
|
|
If you are maintaining legacy code,
|
|
you may need to provide access to a flake in a `nix-shell`.
|
|
Here's how.
|
|
|
|
[source,nix,linenums]
|
|
.shell.nix
|
|
....
|
|
include::shell.nix[]
|
|
....
|
|
|
|
Here's a demonstration using the shell.
|
|
|
|
....
|
|
$# echo '$ nix-shell'
|
|
$# nix-shell --run bash <<EOL
|
|
$ hello-flake
|
|
$# EOL
|
|
....
|