aboutsummaryrefslogtreecommitdiff
path: root/tests/repl.sh
AgeCommit message (Collapse)Author
2022-06-24tests: enable ca-derivations for simple.nix in repl testsTom Bereknyei
2022-06-15Merge branch 'master' into nix-repl-flakesTom Bereknyei
2022-05-31repl: `--option pure-eval true` actually enables pure eval modeMaximilian Bosch
To quote Eelco in #5867: > Unfortunately we can't do > > evalSettings.pureEval.setDefault(false); > > because then we have to do the same in main.cc (where > pureEval is set to true), and that would allow pure-eval > to be disabled globally from nix.conf. Instead, a command should specify that it should be impure by default. Then, `evalSettings.pureEval` will be set to `false;` unless it's overridden by e.g. a CLI flag. In that case it's IMHO OK to be (theoretically) able to override `pure-eval` via `nix.conf` because it doesn't have an effect on commands where `forceImpureByDefault` returns `false` (i.e. everything where pure eval actually matters). Closes #5867
2022-05-20Apply suggestions from code reviewtomberek
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2022-05-20repl: add repl-flake experimental feature for gatingTom Bereknyei
2022-05-20repl: fix tests to run on any testing storeTom Bereknyei
2022-05-20Add some tests for the new REPL cliThéophane Hufschmitt
- Test that without the XP feature things work as before - Test that with or without the XP feature `--file file` works - Test that with XP feature passing a flakeref works - Test `:reload` with a flake
2022-04-20nix repl: make symlinks with the :bl commandckie
Requested by ppepino on the Matrix: https://matrix.to/#/!KqkRjyTEzAGRiZFBYT:nixos.org/$Tb32BS3rVE2BSULAX4sPm0h6CDewX2hClOTGzTC7gwM?via=nixos.org&via=matrix.org&via=nixos.dev This adds a new command, :bl, which works like :b but also creates a GC root symlink to the various derivation outputs. ckie@cookiemonster ~/git/nix -> ./outputs/out/bin/nix repl Welcome to Nix 2.6.0. Type :? for help. nix-repl> :l <nixpkgs> Added 16118 variables. nix-repl> :b runCommand "hello" {} "echo hi > $out" This derivation produced the following outputs: ./repl-result-out -> /nix/store/kidqq2acdpi05c4a9mlbg2baikmzik44-hello [1 built, 0.0 MiB DL] ckie@cookiemonster ~/git/nix -> cat ./repl-result-out hi
2022-02-04fix nix repl not overriding existing bindings in :apennae
previously :a would override old bindings of a name with new values if the added set contained names that were already bound. in nix 2.6 this doesn't happen any more, which is potentially confusing. fixes #6041
2021-12-28Add a test that nix repl --show-trace actually shows the traceAlexander Bantyev
2021-12-09Properly take the last assignment in the REPLregnat
When a variable is assigned in the REPL, make sure to remove any possible reference to the old one so that we correctly pick the new one afterwards Fix #5706
2021-12-06nix repl: add :logAlexander Bantyev
Add a :log command that shows logs for a derivation. Closes https://github.com/NixOS/nix/issues/3504 Co-authored-by: Taeer Bar-Yam <taeer@bar-yam.me>
2021-11-05Fix `nix repl`’s building of CA derivationsregnat
When running a `:b` command in the repl, after building the derivations query the store for its outputs rather than just assuming that they are known in the derivation itself (which isn’t true for CA derivations) Fix #5328
2021-07-16Forward the whole Nix config to the repl subprocessesregnat
Fill `NIX_CONFIG` with the value of the current Nix configuration before calling the nix subprocesses in the repl That way the whole configuration (including the possible `experimental-features`, a possibly `--store` option or whatever) will be made available. This is required for example to make `nix repl` work with a custom `--store`