aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd
AgeCommit message (Collapse)Author
2023-01-02Merge remote-tracking branch 'origin/master' into coerce-stringEelco Dolstra
2023-01-02Fix why-depends for CA derivations (again)Théophane Hufschmitt
This has the same goal as b13fd4c58e81b2b2b0d72caa5ce80de861622610,but achieves it in a different way in order to not break `nix why-depends --derivation`.
2022-12-21link "store derivation" to glossary definitionValentin Gagarin
2022-12-20InstallableFlake::toDerivedPaths(): Support paths and store pathsEelco Dolstra
This makes 'nix build' work on paths (which will be copied to the store) and store paths (returned as is). E.g. the following flake output attributes can be built using 'nix build .#foo': foo = ./src; foo = self.outPath; foo = builtins.fetchTarball { ... }; foo = (builtins.fetchTree { .. }).outPath; foo = builtins.fetchTree { .. } + "/README.md"; foo = builtins.storePath /nix/store/...; Note that this is potentially risky, e.g. foo = /.; will cause Nix to try to copy the entire file system to the store. What doesn't work yet: foo = self; foo = builtins.fetchTree { .. }; because we don't handle attrsets with an outPath attribute in it yet, and foo = builtins.storePath /nix/store/.../README.md; since result symlinks have to point to a store path currently (rather than a file inside a store path). Fixes #7417.
2022-12-20Merge toDerivations() into toDerivedPaths()Eelco Dolstra
toDerivedPaths() now returns DerivedPathWithInfo, which is DerivedPath with some attributes needed by 'nix profile' etc. Preparation for #7417.
2022-12-20Merge pull request #7451 from edolstra/abstract-posEelco Dolstra
Introduce AbstractPos
2022-12-13Merge pull request #7455 from rapenne-s/documentation_fixEelco Dolstra
Add anchors and links to definition
2022-12-13Improve cast safetyEelco Dolstra
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2022-12-13documentation: link flake URL term to definitionSolène Rapenne
2022-12-13documentation: fix link to definitionSolène Rapenne
2022-12-13Introduce AbstractPosEelco Dolstra
This makes the position object used in exceptions abstract, with a method getSource() to get the source code of the file in which the error originated. This is needed for lazy trees because source files don't necessarily exist in the filesystem, and we don't want to make libutil depend on the InputAccessor type in libfetcher.
2022-12-12Merge remote-tracking branch 'upstream/master' into indexed-store-path-outputsJohn Ericson
2022-12-12Merge remote-tracking branch 'upstream/master' into indexed-store-path-outputsJohn Ericson
2022-12-12Add docs from the lazy-trees branchEelco Dolstra
2022-12-12Support flake references in the old CLIEelco Dolstra
Fixes #7026.
2022-12-12Move isUri() and resolveUri() out of filetransfer.ccEelco Dolstra
These are purely related to NIX_PATH / -I command line parsing, so put them in libexpr.
2022-12-12Merge branch 'master' into indexed-store-path-outputsJohn Ericson
2022-12-12-I description: Use -I examplesEelco Dolstra
2022-12-12Manual improvementsEelco Dolstra
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-12-07Trivial changes from the lazy-trees branchEelco Dolstra
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-25Merge branch 'master' into indexed-store-path-outputsJohn Ericson
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-28Merge branch 'master' into indexed-store-path-outputsJohn Ericson
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-22Build with C++20Graham Bennett
2022-10-16Merge remote-tracking branch 'origin/master' into coerce-stringGuillaume Maudoux
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-09-07WIP: broken merge but need a git checkpointGuillaume Maudoux
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-15Remove `computed-derivations` experimental featureJohn Ericson
We don't need it yet.
2022-07-14Combine `InstallableStorePath` with `InstallableIndexedStorePath`John Ericson
No behavior should be changed, the `isDerivation` logic is moved from the methods to the constructor.
2022-07-14Merge remote-tracking branch 'upstream/master' into indexed-store-path-outputsJohn Ericson
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