- Jan 28, 2014
-
-
Eelco Dolstra authored
-
- Sep 09, 2013
-
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
‘x = <expr>’ is short for ‘:a { x = <expr>; }’. Note that the right-hand side refers to the original scope, so you get: nix-repl> x = 1 nix-repl> x = x + 1 nix-repl> x 2 rather than an infinite recursion.
-
Eelco Dolstra authored
-
Eelco Dolstra authored
Example: $ nix-repl '<nixos>' > config.services.xserver.desktop<TAB> comletes to > config.services.xserver.desktopManager You also get suggestions if there are multiple matches: > config.services.xserver.desktopManager.kde4 config.services.xserver.desktopManager.kde4.enable config.services.xserver.desktopManager.kde4.phononBackends
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
- Sep 06, 2013
-
-
Eelco Dolstra authored
By default, we don't recurse into attribute sets or lists when printing a value. However, the new :p command does recurse.
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
For example: $ nix-repl '<nixpkgs>' '<nixos>' Welcome to Nix version 1.6pre3215_2c1ecf8. Type :? for help. Loading ‘<nixpkgs>’... Added 3337 variables. Loading ‘<nixos>’... Added 7 variables. nix-repl>
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
However, this may leave thunks in black-holed state, so it's not really safe.
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
- Sep 02, 2013
-
-
Eelco Dolstra authored
Example: nix-repl> :l <nixpkgs> nix-repl> lib.range 0 10 [ 0 1 2 3 4 5 6 7 8 9 10 ] nix-repl> :l <nixos> nix-repl> config.boot.kernelModules [ "vboxdrv" "vboxnetadp" ... ]
-
Eelco Dolstra authored
-
Eelco Dolstra authored
The command ":a <expr>" evaluates <expr> and adds the attributes in the resulting attribute set to the interpreter scope. For instance: nix-repl> :a import <nixpkgs> {} nix-repl> lib.range 0 10 [ 0 1 2 3 4 5 6 7 8 9 10 ]
-
Eelco Dolstra authored
This program interactively reads a Nix expression from the user, evaluates it, and prints the result.
-