Skip to content

Commit

Permalink
introduce nix-shell as shebang interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
fricklerhandwerk authored and Solène Rapenne committed Feb 6, 2023
1 parent 9982017 commit 995f498
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/tutorials/nix-shell-in-shebang.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ We will use the shebang line `#! /usr/bin/env nix-shell`.
`/usr/bin/env` is a program available on most modern Unix-like operating systems.
It takes a command name as argument and will run the first executable by that name it finds in the directories listed in the environment variable `$PATH`.

The command `nix-shell` takes the following parameters relevant for our use case:
We use [`nix-shell` as a shebang interpreter].
It takes the following parameters relevant for our use case:

[`nix-shell` as a shebang interpreter]: https://nixos.org/manual/nix/stable/command-ref/nix-shell.html#use-as-a--interpreter
- `-i` tells which program to use for interpreting the rest of the file
- `-p` lists packages that should be present in the interpreter's environment
- `-I` explicitly sets the search path for packages
Expand Down

0 comments on commit 995f498

Please sign in to comment.