mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2026-05-14 04:11:12 +08:00
initial commit
This commit is contained in:
parent
7761303cd4
commit
7ff82d6fb6
4 changed files with 50 additions and 0 deletions
24
source/recipes/python-nixpkg/shell/main.adoc0
Normal file
24
source/recipes/python-nixpkg/shell/main.adoc0
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
= In `shell.nix`
|
||||
|
||||
[source,nix,linenums]
|
||||
.shell.nix
|
||||
....
|
||||
include::shell.nix[]
|
||||
....
|
||||
|
||||
Here's a short Python program that uses it.
|
||||
|
||||
[source,python,linenums]
|
||||
.Main.hs
|
||||
....
|
||||
include::Main.py[]
|
||||
....
|
||||
|
||||
Here's a demonstration using the program.
|
||||
|
||||
....
|
||||
$# echo '$ nix-shell'
|
||||
$# nix-shell --run bash <<EOL
|
||||
$ python Main.py
|
||||
$# EOL
|
||||
....
|
||||
Loading…
Add table
Add a link
Reference in a new issue