Use nix-shell
with the -p
( --packages
) option to specify that we need the cowsay
and lolcat
packages.
The first invocation of nix-shell
may take a while to download all dependencies.
$ nix-shell -p cowsay lolcat these 3 derivations will be built: /nix/store/zx1j8gchgwzfjn7sr4r8yxb7a0afkjdg-builder.pl.drv /nix/store/h9sbaa2k8ivnihw2czhl5b58k0f7fsfh-lolcat-100.0.1.drv ... [nix-shell:~]$
Copy to clipboard
Within the Nix shell, you can use the programs provided by these packages:
[nix-shell:~]$ cowsay Hello, Nix! | lolcat
Copy to clipboard
Type exit
or press CTRL-D
to exit the shell, and the programs won’t be available anymore.
[nix-shell:~]$ exit exit $ cowsay no more The program ‘cowsay’ is currently not installed. $ echo all gone | lolcat The program ‘lolcat’ is currently not installed.
If you want to change selection, open document below and click on "Move attachment"
Ad hoc shell environments — nix.dev documentation have installed on your machine: $ cowsay no can do The program ‘cowsay’ is currently not installed. $ echo no chance | lolcat The program ‘lolcat’ is currently not installed. Copy to clipboard <span>Use nix-shell with the -p (--packages) option to specify that we need the cowsay and lolcat packages. The first invocation of nix-shell may take a while to download all dependencies. $ nix-shell -p cowsay lolcat these 3 derivations will be built: /nix/store/zx1j8gchgwzfjn7sr4r8yxb7a0afkjdg-builder.pl.drv /nix/store/h9sbaa2k8ivnihw2czhl5b58k0f7fsfh-lolcat-100.0.1.drv ... [nix-shell:~]$ Copy to clipboard Within the Nix shell, you can use the programs provided by these packages: [nix-shell:~]$ cowsay Hello, Nix! | lolcat Copy to clipboard Type exit or press CTRL-D to exit the shell, and the programs won’t be available anymore. [nix-shell:~]$ exit exit $ cowsay no more The program ‘cowsay’ is currently not installed. $ echo all gone | lolcat The program ‘lolcat’ is currently not installed. Copy to clipboard Search for packages# What can you put in a shell environment? If you can think of it, there’s probably a Nix package of it. Enter the program name you want to run in s Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details