aboutsummaryrefslogtreecommitdiff
path: root/src/nix
AgeCommit message (Collapse)Author
2022-03-11Factor out a `LogStore` interfaceJohn Ericson
Continue progress on #5729. Just as I hoped, this uncovered an issue: the daemon protocol is missing a way to query build logs. This doesn't effect `unix://`, but does effect `ssh://`. A FIXME is left for this, so we come back to it later.
2022-03-11Rename `requireGcStore` to `GcStore::require`John Ericson
I should have done this to begin with. This will be nicer once more Store sub-interfaces exist too, to illustrate the pattern.
2022-03-07StyleEelco Dolstra
2022-03-07Explicit error in flake init/new when not in storeGuillaume Desforges
2022-03-03Factor out a `GcStore` interfaceJohn Ericson
Starts progress on #5729. The idea is that we should not have these default methods throwing "unimplemented". This is a small step in that direction. I kept `addTempRoot` because it is a no-op, rather than failure. Also, as a practical matter, it is called all over the place, while doing other tasks, so the downcasting would be annoying. Maybe in the future I could move the "real" `addTempRoot` to `GcStore`, and the existing usecases use a `tryAddTempRoot` wrapper to downcast or do nothing, but I wasn't sure whether that was a good idea so with a bias to less churn I didn't do it yet.
2022-03-03printValue(): Don't show repeated valuesEelco Dolstra
Fixes #6157.
2022-03-02Add EvalState::coerceToStorePath() helperEelco Dolstra
This is useful whenever we want to evaluate something to a store path (e.g. in get-drvs.cc). Extracted from the lazy-trees branch (where we can require that a store path must come from a store source tree accessor).
2022-03-02nix profile: Support CA derivationsEelco Dolstra
2022-03-02Move installables-related operationsEelco Dolstra
2022-03-02StyleEelco Dolstra
2022-02-28Merge pull request #6072 from Ma27/fix-nix-why-depends-non-preciseThéophane Hufschmitt
nix/why-depends: fix output when not using `--precise`
2022-02-25Remove std::string alias (for real this time)Eelco Dolstra
Also use std::string_view in a few more places.
2022-02-24Merge pull request #6089 from edolstra/dot-defaultEelco Dolstra
Replace defaultBla.$system with bla.$system.default
2022-02-24libfetchers: Rename immutable -> lockedEelco Dolstra
This is more consistent with flake terminology.
2022-02-24Merge pull request #5342 from Misterio77/add-sourcehutThéophane Hufschmitt
Add support for sourcehut input scheme
2022-02-22Update docsEelco Dolstra
2022-02-22nix flake check: Warn about deprecated flake outputsEelco Dolstra
2022-02-22Replace defaultBla.$system with bla.$system.defaultEelco Dolstra
This also simplifies some InstallableFlake logic and fixes 'nix bundle' parsing its installable twice. Fixes #5532.
2022-02-21Merge pull request #6136 from matthewbauer/profile-upgrade-verbosityEelco Dolstra
Add verbosity to nix profile upgrade
2022-02-21Apply suggestions from code reviewMatthew Bauer
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-02-21Remove std::set aliasEelco Dolstra
2022-02-20Add verbosity to nix profile upgradeMatthew Bauer
Followup of https://github.com/NixOS/nix/pull/6086. This time adding a warning if no packages are upgraded.
2022-02-19path-info: use full store paths when we have themLinus Heckemann
Fixes #5645
2022-02-17Merge pull request #6103 from Radvendii/welcomeTextEelco Dolstra
add descriptive output when creating templates
2022-02-17make flake template welcomeText markdownTaeer Bar-Yam
2022-02-15add descriptive output when creating templatesTaeer Bar-Yam
this includes a `welcomeText` attribute which can be set in the template, as well as outputing which files were created.
2022-02-14add sourcehut input schemeGabriel Fontes
2022-02-14InstallableFlake: Default attr paths cleanupEelco Dolstra
This removes some duplicated logic, and fixes "nix bundle" parsing its installable twice.
2022-02-11profile: add verbosityTom Bereknyei
warn if there are no matches and give notice of removing packages as they are found
2022-02-10nix/why-depends: fix output when not using `--precise`Maximilian Bosch
On Nix 2.6 the output of `nix why-depends --all` seems to be somewhat off: $ nix why-depends /nix/store/kn47hayxab8gc01jhr98dwyywbx561aq-nixos-system-roflmayr-21.11.20220207.6c202a9.drv /nix/store/srn5jbs1q30jpybdmxqrwskyny659qgc-nix-2.6.drv --derivation --extra-experimental-features nix-command --all /nix/store/kn47hayxab8gc01jhr98dwyywbx561aq-nixos-system-roflmayr-21.11.20220207.6c202a9.drv └───/nix/store/g8bpgfjhh5vxrdq0w6r6s64f9kkm9z6c-etc.drv │ └───/nix/store/hm0jmhp8shbf3cl846a685nv4f5cp3fy-nspawn-inst.drv | [...] └───/nix/store/2d6q3ygiim9ijl5d4h0qqx6vnjgxywyr-system-units.drv └───/nix/store/dil014y1b8qyjhhhf5fpaah5fzdf0bzs-unit-systemd-nspawn-hydra.service.drv └───/nix/store/a9r72wwx8qrxyp7hjydyg0gsrwnn26zb-activate.drv └───/nix/store/99hlc7i4gl77wq087lbhag4hkf3kvssj-nixos-system-hydra-21.11pre-git.drv Please note that `[...]-system-units.drv` is supposed to be a direct child of `[...]-etc.drv`. The reason for that is that each new level printed by `printNode` is four spaces off in comparison to `nix why-depends --precise` because the recursive `printNode()` only prints the path and not the `tree*`-chars in the case of `--precise` and in this format the path is four spaces further indented, i.e. on a newline, but on the same level as the path's children, i.e. /nix/store/kn47hayxab8gc01jhr98dwyywbx561aq-nixos-system-roflmayr-21.11.20220207.6c202a9.drv └───/: …1-p8.drv",["out"]),("/nix/store/g8bpgfjhh5vxrdq0w6r6s64f9kkm9z6c-etc.drv",["out"]),("/nix/store/… → /nix/store/g8bpgfjhh5vxrdq0w6r6s64f9kkm9z6c-etc.drv As you can see `[...]-etc.drv` is a direct child of the root, but four spaces indented. This logic was directly applied to the code-path with `precise=false` which resulted in `tree*` being printed four spaces too deep. In case of no `--precise`, `hits[hash]` is empty and the path itself should be printed rather than hits using the same logic as for `hits[hash]`. With this fix, the output looks correct now: /nix/store/kn47hayxab8gc01jhr98dwyywbx561aq-nixos-system-roflmayr-21.11.20220207.6c202a9.drv └───/nix/store/g8bpgfjhh5vxrdq0w6r6s64f9kkm9z6c-etc.drv ├───/nix/store/hm0jmhp8shbf3cl846a685nv4f5cp3fy-nspawn-inst.drv | [...] └───/nix/store/2d6q3ygiim9ijl5d4h0qqx6vnjgxywyr-system-units.drv └───/nix/store/dil014y1b8qyjhhhf5fpaah5fzdf0bzs-unit-systemd-nspawn-hydra.service.drv └───/nix/store/a9r72wwx8qrxyp7hjydyg0gsrwnn26zb-activate.drv └───/nix/store/99hlc7i4gl77wq087lbhag4hkf3kvssj-nixos-system-hydra-21.11pre-git.drv
2022-02-07fix markuplincoln auster
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-02-06repl/load-flake: throw error if path isn't specifiedlincoln auster [they/them]
2022-02-04Make most calls to determinePos() lazyEelco Dolstra
2022-02-04Merge branch 'issue-3505' of https://github.com/kamadorueda/nixEelco Dolstra
2022-02-03Merge branch 'master' into bundler_drvtomberek
2022-02-02Merge branch 'parser-improvements' of https://github.com/pennae/nixEelco Dolstra
2022-02-02Merge branch 'more-stringviews' of https://github.com/pennae/nixEelco Dolstra
2022-01-31Merge pull request #5990 from lincolnauster/flakes-nixconfig-docsEelco Dolstra
flakes: document nixConfig option
2022-01-30fix spelling mistakes reported by Debian's lintian toolThomas Koch
2022-01-28bundler: suggested doc fixesTom Bereknyei
2022-01-28Merge branch 'master' into bundler_drvtomberek
2022-01-28bundler: revert default behavior to use defaultAppTom Bereknyei
Bundlers are now responsible for correctly handling their inputs which are no longer constrained to be (Drv->Drv)->Drv->Drv, but can be of type (attrset->Drv)->attrset->Drv.
2022-01-27optionally return string_view from coerceToStringpennae
we'll retain the old coerceToString interface that returns a string, but callers that don't need the returned value to outlive the Value it came from can save copies by using the new interface instead. for values that weren't stringy we'll pass a new buffer argument that'll be used for storage and shouldn't be inspected.
2022-01-27return string_views from forceString*pennae
once a string has been forced we already have dynamic storage allocated for it, so we can easily reuse that storage instead of copying.
2022-01-27convert a for more utilities to string_viewpennae
2022-01-25fix typolincoln auster
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2022-01-25nix store ping: Report Nix daemon versionEelco Dolstra
Fixes #5952.
2022-01-25flakes: document nixConfig optionlincoln auster [they/them]
Fixes #5988.
2022-01-25bundler: notes and doc update to include bundlers repoTom Bereknyei
2022-01-25bundler: add tests and change defaults to use a derivationTom Bereknyei