aboutsummaryrefslogtreecommitdiff
path: root/src/nix
AgeCommit message (Collapse)Author
2022-12-07Trivial changes from the lazy-trees branchEelco Dolstra
2022-12-01Really fix 'nix store make-content-addressed --json'Eelco Dolstra
https://hydra.nixos.org/log/mcgypcf9vj4n8vdmw7lj3l05c899v73w-nix-2.12.0pre20221201_16b03f0-x86_64-unknown-linux-musl.drv
2022-11-30nix store make-content-addressed: Fix JSON constructionEelco Dolstra
Fixes error: [json.exception.type_error.301] cannot create object from initializer list in tests/fetchClosure.sh.
2022-11-29Merge pull request #3600 from NixOS/auto-uid-allocationEelco Dolstra
Automatic UID allocation
2022-11-28Merge pull request #7313 from yorickvP/nlohmann-everywhereEelco Dolstra
Replace src/libutil/json.cc with nlohmann
2022-11-23Merge pull request #7337 from Radvendii/why-depends-caThéophane Hufschmitt
Fix why-depends for CA derivations
2022-11-23add explanation and testTaeer Bar-Yam
2022-11-23Fix why-depends for CA derivationsTaeer Bar-Yam
why-depends assumed that we knew the output path of the second argument. For CA derivations, we might not know until it's built. One way to solve this would be to build the second installable to get the output path. In this case we don't need to, though. If the first installable (A) depends on the second (B), then getting the store path of A will necessitate having the store path B. The contrapositive is, if the store path of B is not known (i.e. it's a CA derivation which hasn't been built), then A does not depend on B.
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-21Rename derivedPathsWithHintsToJSON -> builtPathsToJSONEelco Dolstra
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-21Rename derivedPathsWithHintsToJSON -> builtPathsToJSONEelco Dolstra
2022-11-16Replace src/libutil/json.cc with nlohmann json generationYorick van Pelt
2022-11-12build: use pkg-config for lowdownEt7f3
2022-11-06manual: build action -> build taskValentin Gagarin
after discussing this with multiple people, I'm convinced that "build task" is more precise: a derivation is not an action, but inert until it is built. also it's easier to pronounce. proposal: use "build task" for the generic concept "description of how to derive new files from the contents of existing files". then it will be easier to distinguish what we mean by "derivation" (a specific data structure and Nix language value type) and "store derivation" (a serialisation of a derivation into a file in the Nix store).
2022-10-31Merge pull request #7231 from jfroche/fix/savedArgv-accessEelco Dolstra
Move savedArgv into libmain
2022-10-28Move savedArgv into libmainJean-François Roche
`savedArgv` is not accessible by plugins when defined in main binary. Moving it into one of the nix lib fix the problem.
2022-10-27Merge pull request #7217 from NixOS/restore-nix-build-remoteEelco Dolstra
Fix `nix __build-remote`
2022-10-26Fix `nix __build-remote`Théophane Hufschmitt
Because of a wrong index, `nix __build-remote` wasn't working. Fix the index to restore the command (and the build hook).
2022-10-26nix run: fix "'defaultApp.x86_64-linux' should have type 'derivation'"Yorick van Pelt
2022-10-19Merge pull request #7183 from n8henrie/patch-1Eelco Dolstra
Fix typo -- dashes not underscores
2022-10-18Add command 'nix store path-from-hash-part'Eelco Dolstra
This exposes the Store::queryPathFromHashPart() interface in the CLI.
2022-10-17Fix typo -- dashes not underscoresNathan Henrie
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-10-07Print common flags in --helpAna Hobden
2022-09-24Merge pull request #7010 from edolstra/ignore-shellThéophane Hufschmitt
nix develop: Ignore stdenv's $SHELL
2022-09-23Apply suggestions from code reviewJohn Ericson
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io> Co-authored-by: Rune K. Svendsen <runesvend@gmail.com>
2022-09-22Dodge "trusted" vs "trustworthy" by being explicit John Ericson
Hopefully this is best!
2022-09-22"valid signature" -> "trustworthy signature"John Ericson
I just had a colleague get confused by the previous phrase for good reason. "valid" sounds like an *objective* criterion, e.g. and *invalid signature* would be one that would be trusted by no one, e.g. because it misformatted or something. What is actually going is that there might be a signature which is perfectly valid to *someone else*, but not to the user, because they don't trust the corresponding public key. This is a *subjective* criterion, because it depends on the arbitrary and personal choice of which public keys to trust. I therefore think "trustworthy" is a better adjective to use. Whether something is worthy of trust is clearly subjective, and then "trust" within that word nicely evokes `trusted-public-keys` and friends.
2022-09-13Trim option descriptionsEelco Dolstra
This removes unintended blank lines in Markdown when the description is a multiline string literal.
2022-09-09Merge pull request #6825 from rapenne-s/nix_shell_exampleValentin Gagarin
nix shell: document how to invoke multiple commands from the command …
2022-09-06nix develop: Ignore stdenv's $SHELLEelco Dolstra
Stdenv sets this to a bash that doesn't have readline/completion support, so running 'nix (develop|shell)' inside a 'nix develop' gives you a crippled shell. So let's just ignore the derivation's $SHELL. This could break interactive use of build phases that use $SHELL, but they appear to be fairly rare.
2022-09-06Docs: Add nix develop --command entryJonathan Ringer
Add example of nix develop being used to execuate a series of script commands. This is common when doing things like CI/CD, and should be represented in the official documentation. Also useful for people looking for the 'nix develop' equivalent of 'nix-shell --run'. Related: - https://github.com/NixOS/nix/issues/6908 - https://github.com/NixOS/nix/issues/6908#issuecomment-1229266853
2022-08-24Fix progress bar flicker with -LEelco Dolstra
This was caused by -L calling setLogFormat() again, which caused the creation of a new progress bar without destroying the old one. So we had two progress bars clobbering each other. We should change 'logger' to be a smart pointer, but I'll do that in a future PR. Fixes #6931.
2022-08-23Merge pull request #6944 from edolstra/bash-varsEelco Dolstra
nix develop: Ignore some more bash special variables
2022-08-23Merge pull request #6909 from ncfavier/json-pathsEelco Dolstra
JSON: print paths as strings without copying them to the store
2022-08-23nix develop: Ignore some more bash special variablesEelco Dolstra
Fixes #6940.
2022-08-22JSON: add missing newlinesNaïm Favier
after `nix eval --json` and `nix-instantiate --eval --json`.
2022-08-22JSON: print paths as strings without copying them to the storeNaïm Favier
Makes `printValueAsJSON` not copy paths to the store for `nix eval --json`, `nix-instantiate --eval --json` and `nix-env --json`. Fixes https://github.com/NixOS/nix/issues/5612
2022-08-20Fix default profile path for root in nix profile documentationJakub Kuczys
2022-08-17nix flake metadata: Don't show "Inputs" if there are no inputsEelco Dolstra
2022-08-10docfix: bundlersDavid Arnold
2022-08-04docs/flake-update: fix exampleErik Arvstedt
2022-07-21nix shell: example shouldn't use an absolute path for the shellSolène Rapenne
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-07-20nix shell: document how to invoke multiple commands from the command lineSolène Rapenne
2022-07-14nix develop: do not assume that saved vars are setJeremy Fleischman
This fixes https://github.com/NixOS/nix/issues/6809
2022-07-12Merge pull request #6693 from ncfavier/complete-flake-inputsThéophane Hufschmitt
Improve shell completion of flake inputs
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 #6699 from tennox/better-flake-new-error-messageThéophane Hufschmitt
flakes: apply templates partially on conflicts