aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd
AgeCommit message (Collapse)Author
2022-11-29Merge pull request #3600 from NixOS/auto-uid-allocationEelco Dolstra
Automatic UID allocation
2022-11-28use logger->cout Naïm Favier
in order to avoid potential problems with the progress bar Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-11-28repl: print a newline on ctrl-DNaïm Favier
2022-11-21nix build --json: Include build statisticsEelco Dolstra
Example: # nix build -L --extra-experimental-features cgroups --impure --expr 'with import <nixpkgs> {}; runCommand "foo" {} "dd if=/dev/urandom bs=1M count=1024 | md5sum; mkdir $out"' --json [ { "cpuSystem": 1.911431, "cpuUser": 1.214249, "drvPath": "/nix/store/xzdqz67xba18hljhycp0hwfigzrs2z69-foo.drv", "outputs": { "out": "/nix/store/rh9mc9l2gkpq8kn2sgzndr6ll7ffjh6l-foo" }, "startTime": 1669024076, "stopTime": 1669024079 } ]
2022-11-21Merge remote-tracking branch 'origin/master' into auto-uid-allocationEelco Dolstra
2022-11-21nix build --json: Include build statisticsEelco Dolstra
Example: # nix build -L --extra-experimental-features cgroups --impure --expr 'with import <nixpkgs> {}; runCommand "foo" {} "dd if=/dev/urandom bs=1M count=1024 | md5sum; mkdir $out"' --json [ { "cpuSystem": 1.911431, "cpuUser": 1.214249, "drvPath": "/nix/store/xzdqz67xba18hljhycp0hwfigzrs2z69-foo.drv", "outputs": { "out": "/nix/store/rh9mc9l2gkpq8kn2sgzndr6ll7ffjh6l-foo" }, "startTime": 1669024076, "stopTime": 1669024079 } ]
2022-11-18IndentationEelco Dolstra
2022-11-16Merge pull request #7134 from yorickvP/disable-dbg-on-completeThéophane Hufschmitt
Temporarily disable the debugger during completion evaluation
2022-11-16Swallow the error in a more idiomatic wayThéophane Hufschmitt
2022-11-12build: use pkg-config for lowdownEt7f3
2022-11-03SourceExprCommand: swallow EvalError, add tests for thisYorick van Pelt
Completing things that would error would print an ugly error in the middle of your command line. Avoid printing this error.
2022-11-02Temporarily disable the debugger during completion evaluationYorick van Pelt
readline is not re-entrant, so entering the debugger from the completioncallback results in an eventual segfault. The workaround is to temporarily disable the debugger when searching for possible completions.
2022-10-24Improve --profile descriptionMichal Sojka
The description of the --profile option talks about the "update" operation. This is probably meant for operations such as "nix profile install", but the same option is reused in other subcommands, which do not update the profile, such as "nix profile {list,history,diff-closures}". We update the description to make sense in both contexts.
2022-10-13Fix clang warningsEelco Dolstra
2022-10-12Move some options into a misc categoryEelco Dolstra
This unclutters the per-command options a bit by moving out some global options.
2022-09-20nix repl: warn if creating dir for history failsAlyssa Ross
The history is not critical to the functionality of nix repl, so it's enough to warn here, rather than refuse to start if the directory Nix thinks the history should live in can't be created.
2022-08-29Merge pull request #6968 from fricklerhandwerk/man-no-weblinksEelco Dolstra
do not render relative links in help pages
2022-08-26do not render relative links in help pagesValentin Gagarin
this simplifies the setup a lot, and avoids weird looking `./file.md` links showing up. it also does not show regular URLs any more. currently the command reference only has few of them, and not showing them in the offline documentation is hopefully not a big deal. instead of building more special-case solutions, clumsily preprocessing the input, or issuing verbal rules on dealing with URLs, should better be solved sustainably by not rendering relative links in `lowdown`: https://github.com/kristapsdz/lowdown/issues/105
2022-08-22nix repl: Stop the progress barEelco Dolstra
The repl was broken since c3769c68465bae971ab6bb48cfcdea85b61ea83a. In general, the progress bar is incompatible with the repl.
2022-08-17Show when we're evaluating a flakeEelco Dolstra
2022-07-12Merge pull request #6693 from ncfavier/complete-flake-inputsThéophane Hufschmitt
Improve shell completion of flake inputs
2022-07-11Merge branch 'master' into ignore-tryBen Burdette
2022-07-11move ignore-try to EvalSettingsBen Burdette
2022-07-11Fix flake input completion for `InstallablesCommand`sNaïm Favier
Defers completion of flake inputs until the whole command line is parsed so that we know what flakes we need to complete the inputs of. Previously, `nix build flake --update-input <Tab>` always behaved like `nix build . --update-input <Tab>`.
2022-06-29Merge pull request #6233 from flox/nix-repl-flakesThéophane Hufschmitt
Nix repl flakes
2022-06-29Merge pull request #6674 from ↵Théophane Hufschmitt
virusdave/dnicponski/scratch/dont_capture_stdout_in_nix_repl_master Don't capture `stdout` when launching subshells in `nix repl`
2022-06-23Don't capture stdout when launching subshells in `nix repl`Dave Nicponski
2022-06-20Complete flake inputs for all given flakesNaïm Favier
Allow `nix build flake1 flake2 --update-input <Tab>` to complete the inputs of both flakes. Also do tilde expansion so that `nix build ~/flake --update-input <Tab>` works.
2022-06-16Merge pull request #6620 from maralorn/fix-print-missingThéophane Hufschmitt
respect print-missing variable in new-style build command
2022-06-15Merge branch 'master' into nix-repl-flakesTom Bereknyei
2022-06-13Merge pull request #6027 from Ma27/pure-replEelco Dolstra
repl: `--option pure-eval true` actually enables pure eval mode
2022-06-10Mention that -f implies --impure for eval in docsYuriy Taraday
Right now this is not mentioned anywhere and it is unexpected.
2022-06-06respect print-missing variable in new-style build commandMalte Brandy
Currently nix-build prints the "printMissing" information by default, nix build doesn’t. People generally don‘t notice this because the standard log-format of nix build would not display the printMissing output long enough to perceive the information. This addresses https://github.com/NixOS/nix/issues/6561
2022-06-02Merge branch 'master' into nix-repl-flakesTom Bereknyei
2022-06-02ignore-try flagBen Burdette
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-30Respect the outputSpecified attributeEelco Dolstra
E.g. 'nix build nixpkgs#libxml2.dev' will build the 'dev' output.
2022-05-25remove parens from repl helpBen Burdette
2022-05-25Merge branch 'master' into debug-exploratory-PRBen Burdette
2022-05-25back to ref<EvalState> in NixReplBen Burdette
2022-05-25Style tweaksEelco Dolstra
2022-05-23commentBen Burdette
2022-05-22remove redundant 'debugMode' flagBen Burdette
2022-05-22commentsBen Burdette
2022-05-22change state derefsBen Burdette
2022-05-22changning repl to use EvalState& instead of refBen Burdette
2022-05-20debugRepl ftn pointerBen Burdette
2022-05-20Apply suggestions from code reviewtomberek
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-05-19'debugMode'Ben Burdette
2022-05-19de-const evalState exceptionsBen Burdette