aboutsummaryrefslogtreecommitdiff
path: root/src/nix/repl.cc
AgeCommit message (Collapse)Author
2020-08-24nix repl ':doc': Render using lowdownEelco Dolstra
2020-08-24Allow primops to have Markdown documentationEelco Dolstra
2020-08-20Rename drv output querying functions, like masterJohn Ericson
- `queryDerivationOutputMapAssumeTotal` -> `queryPartialDerivationOutputMap` - `queryDerivationOutputMapAssumeTotal` -> `queryDerivationOutputMap
2020-08-20Allow 'nix' subcommands to provide docs in Markdown formatEelco Dolstra
2020-08-18Merge remote-tracking branch 'upstream/master' into ↵John Ericson
derivation-header-include-order
2020-08-14Merge pull request #3875 from obsidiansystems/new-interface-for-path-pathOptEelco Dolstra
Offer a safer interface for path and pathOpt
2020-08-07Squashed get CA derivations buildingJohn Ericson
2020-08-06repl.cc: Check for HAVE_BOEHMGCEelco Dolstra
Fixes #3906.
2020-08-01Merge remote-tracking branch 'upstream/master' into ↵John Ericson
derivation-header-include-order
2020-07-28Use the new interfaceCarlo Nucera
2020-07-16Merge branch 'master' of github.com:NixOS/nix into ↵Carlo Nucera
optional-derivation-output-storepath
2020-07-12String .drv suffix to create derivation nameJohn Ericson
2020-07-08Only store hash of fixed derivation outputMatthew Bauer
we don’t need a full storepath for a fixedoutput derivation. So just putting the ingestion method + the hash is sufficient.
2020-07-08Add name to BasicDerivationMatthew Bauer
We always have a name for BasicDerivation, since we have a derivation store path that has a name.
2020-07-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-07-05Merge remote-tracking branch 'upstream/master' into ↵John Ericson
derivation-header-include-order
2020-06-26Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-24repl indentingBen Burdette
2020-06-24repl indentingBen Burdette
2020-06-21Merge remote-tracking branch 'upstream/master' into ↵John Ericson
derivation-header-include-order
2020-06-19addErrorTraceBen Burdette
2020-06-17Use `ansicolor.hh` in `nix repl` rather than duplicatesJohn Ericson
2020-06-17Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-17Move some Store functions from derivations.cc to store-api.ccJohn Ericson
This further continues with the dependency inverstion. Also I just went ahead and exposed `parseDerivation`: it seems like the more proper building block, and not a bad thing to expose if we are trying to be less wedded to drv files on disk anywas.
2020-05-11Merge branch 'master' into errors-phase-2Ben Burdette
2020-05-11CleanupEelco Dolstra
2020-05-10Add completion for pathsEelco Dolstra
2020-05-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-05-01Improve help-message for nix-replMaximilian Bosch
* Remove obsolete `printHelp` function * Add an example to demonstrate how to list all available commands within the REPL
2020-04-21remove 'format' from Error constructor callsBen Burdette
2020-03-20Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-03-19nix repl: Put EvalState on the heapEelco Dolstra
See 0629601da1d163a059fa19004256961f8ecdeb78.
2020-03-19nix repl: Scan NixRepl for GC rootsEelco Dolstra
Fixes #3175.
2019-12-11Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-12-10Make the Store API more type-safeEelco Dolstra
Most functions now take a StorePath argument rather than a Path (which is just an alias for std::string). The StorePath constructor ensures that the path is syntactically correct (i.e. it looks like <store-dir>/<base32-hash>-<name>). Similarly, functions like buildPaths() now take a StorePathWithOutputs, rather than abusing Path by adding a '!<outputs>' suffix. Note that the StorePath type is implemented in Rust. This involves some hackery to allow Rust values to be used directly in C++, via a helper type whose destructor calls the Rust type's drop() function. The main issue is the dynamic nature of C++ move semantics: after we have moved a Rust value, we should not call the drop function on the original value. So when we move a value, we set the original value to bitwise zero, and the destructor only calls drop() if the value is not bitwise zero. This should be sufficient for most types. Also lots of minor cleanups to the C++ API to make it more modern (e.g. using std::optional and std::string_view in some places).
2019-12-05Make subcommand construction in MultiCommand lazyEelco Dolstra
(cherry picked from commit a0de58f471c9087d8e6cc60a6078f9940a125b15)
2019-11-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-10-28nix repl: also handle lambda editzimbatm
2019-10-28editorFor: take a pos object insteadzimbatm
2019-10-28libexpr: findDerivationFilename return Pos instead of tuplezimbatm
2019-10-23libexpr: add findDerivationFilenamezimbatm
extract the derivation to filename:lineno heuristic
2019-10-23libutil: add editorFor heuristiczimbatm
2019-10-23nix repl: add :edit commandzimbatm
This allows to have a repl-centric workflow to working on nixpkgs. Usage: :edit <package> - heuristic that find the package file path :edit <path> - just open the editor on the file path Once invoked, `nix repl` will open $EDITOR on that file path. Once the editor exits, `nix repl` will automatically reload itself.
2019-09-02nix repl: Run in impure modeEelco Dolstra
2019-07-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-07-03Fix C++ compatibility with older editline versions.Niklas Hambüchen
For example, Ubuntu 16.04 and many similar long-term-support distros have older versions.
2019-06-18Make subcommand construction in MultiCommand lazyEelco Dolstra
2019-03-24repl: Restore CTRL-C behaviourxbreak
Install signal handler during `readline` to handle SIGINT to abort partially typed expressions.
2019-02-05Revert "Restore parent mount namespace before executing a child process"Eelco Dolstra
This reverts commit a0ef21262f4d5652bfb65cfacaec01d89c475a93. This doesn't work in 'nix run' and nix-shell because setns() fails in multithreaded programs, and Boehm GC mark threads are uncancellable. Fixes #2646.
2018-12-25remove some dead code in nix/repl.ccDmitry Kalinkin
Fixes a static analyzer warning: Expression 'isDrv' is always false. Fixes: 3beb6f6e7 ('Show derivations more concisely')