tuto:nix
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tuto:nix [2020/03/15 18:32] – [nix] root | tuto:nix [2022/06/21 20:15] (Version actuelle) – [nix-shell] root | ||
|---|---|---|---|
| Ligne 140: | Ligne 140: | ||
| ==== nix-shell ==== | ==== nix-shell ==== | ||
| * https:// | * https:// | ||
| + | |||
| + | <code haskell shell.nix> | ||
| + | { pkgs ? import < | ||
| + | |||
| + | with pkgs; | ||
| + | |||
| + | mkShell { | ||
| + | buildInputs = [ | ||
| + | elixir_1_10 | ||
| + | nodejs-12_x | ||
| + | ]; | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | $ nix-shell | ||
| + | $ nix-shell shell.nix | ||
| + | </ | ||
| + | |||
| < | < | ||
| $ nix-shell --pure -E ' | $ nix-shell --pure -E ' | ||
| Ligne 336: | Ligne 355: | ||
| path is '/ | path is '/ | ||
| 02cgs6b1rmh8hmcwm5wpxxg32p3km9c05606pykv49qq1spd6p38 | 02cgs6b1rmh8hmcwm5wpxxg32p3km9c05606pykv49qq1spd6p38 | ||
| + | </ | ||
| + | |||
| + | ==== nix-instantiate ==== | ||
| + | < | ||
| + | $ nix-instantiate --eval -E ' | ||
| + | " | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | $ nix-instantiate --eval -E ' | ||
| + | " | ||
| </ | </ | ||
| Ligne 438: | Ligne 468: | ||
| Welcome to Nix version 2.3.3. Type :? for help. | Welcome to Nix version 2.3.3. Type :? for help. | ||
| - | $ nix-repl> | + | nix-repl> |
| " | " | ||
| </ | </ | ||
| < | < | ||
| - | $ nix-repl> | + | $ nix repl |
| + | nix-repl> | ||
| nix-repl> | nix-repl> | ||
| nix-repl> | nix-repl> | ||
| this derivation produced the following outputs: out -> / | this derivation produced the following outputs: out -> / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | nix-repl> | ||
| + | " | ||
| + | </ | ||
| + | |||
| + | === nix edit === | ||
| + | Permet d' | ||
| + | < | ||
| + | $ EDITOR=vim nix edit -f "< | ||
| + | </ | ||
| + | |||
| + | On install ensuite le paquet: | ||
| + | < | ||
| + | $ nix-env -i samba | ||
| </ | </ | ||
| Ligne 631: | Ligne 678: | ||
| ==== Override ==== | ==== Override ==== | ||
| < | < | ||
| - | $ nix-repl | + | $ nix repl |
| nix-repl> | nix-repl> | ||
| Added 4360 variables. | Added 4360 variables. | ||
tuto/nix.1584297124.txt.gz · Dernière modification : de root
