aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-04-07Disable GC inside coroutines on mac OSYorick van Pelt
2023-04-07Create `nix derivation add` commandJohn Ericson
Also refine `nix derivation show`'s docs very slightly.
2023-04-07Rename files to reflect new `nix derivation show` nameJohn Ericson
This will match the files we added for `nix add derivation` in the rest of this PR.
2023-04-07`nix show-derivation` -> `nix derivation show`John Ericson
2023-04-07Liberate `checkDerivationOutputs` from `LocalStore`John Ericson
Make it instead a method on `Derivation` that can work with any store. We will need this for a CLI command to create a derivation.
2023-04-07Include the name in the JSON for derivationsJohn Ericson
This is non-breaking change in the to-JSON direction. This *is* a breaking change in the from-JSON direction, but we don't care, as that is brand new in this PR. `nix show-derivation --help` currently has the sole public documentation of this format, it is updated accordingly.
2023-04-07Create `Derivation::fromJSON`John Ericson
And test, of course
2023-04-07TypoEelco Dolstra
2023-04-07Rename and protect `BufferedSink::write`Théophane Hufschmitt
The `write` name is ambiguous and could lead to some funny bugs like https://github.com/NixOS/nix/pull/8173#issuecomment-1500009480. So rename it to the more explicit `writeUnbuffered`. Besides, this method shouldn't be (and isn't) used outside of the class implementation, so mark it `protected`. This makes it more symetrical to `BufferedSource` which uses a `protected readUnbuffered` method.
2023-04-06Add `Store::isTrustedClient()`matthewcroughan
This function returns true or false depending on whether the Nix client is trusted or not. Mostly relevant when speaking to a remote store with a daemon. We include this information in `nix ping store` and `nix doctor` Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
2023-04-06Describe active experimental features in the contributing guideJohn Ericson
They are put in the manual separate pages under the new overarching description of experimental features. The settings page just lists the valid experimental feature names (so people know what a valid setting entry looks like), with links to those pages. It doesn't attempt to describe each experimental feature as that is too much information for the configuration settings section.
2023-04-06Link the new general documentation on xp features on the settingJohn Ericson
2023-04-06Fix typo in `no-url-literals` experimental feature docsNoah Snelson
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-04-06Expand documentation for `experimental-features`Noah Snelson
Adds examples and additional information to the `impure-derivations`, `recursive-nix`, and `no-url-literals` experimental feature documentation.
2023-04-05Explicitely define `LockFile::operator!=`Théophane Hufschmitt
It should be syntethised in terms of `operator==`, but the GCC version used on aarch64-linux doesn't implement that (see https://hydra.nixos.org/build/214848896=. So explicitely define it. Fix https://github.com/NixOS/nix/issues/8159
2023-04-04Assemble experimental feature docs outside of Nix itselfJohn Ericson
Instead of constructing a markdown list in C++ (which involved all sorts of nasty string literals), export some JSON and assemble it with the manual build system. Besides following the precedent set with other dumped data, this is a better separate of content and presentation; if we decide for example we want to display this information in a different way, or in a different section of the manual, it will become much easier to do so.
2023-04-04Merge remote-tracking branch 'upstream/master' into list-experimental-featuresJohn Ericson
2023-04-04Apply suggestions from code reviewJohn Ericson
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-04-04Merge pull request #7944 from yorickvP/fix-curReplThéophane Hufschmitt
NixRepl::mainLoop: restore old curRepl on function exit
2023-04-03Merge pull request #8157 from hercules-ci/switch-bugsThéophane Hufschmitt
Fix current and future `switch` bugs
2023-04-03Merge pull request #8042 from lheckemann/alt-lockfilesEelco Dolstra
Allow specifying alternative paths for reading/writing flake locks
2023-04-03nix-store.cc: Refactor, remove qDefaultRobert Hensing
2023-04-03Enable -Werror=switch-enumRobert Hensing
switch statements must now match all enum values or disable the warning. Explicit is good. This has helped us find two bugs, after solving another one by debugging. From now on, adding to an enum will raise errors where they are not explicitly handled, which is good for productivity, and helps us decide the correct behavior in all usages. Notably still excluded from this though are the cases where the warning is disabled by local pragmas. fromTOML.cc did not build despite a top-level pragma, so I've had to resort to a makefile solution for that.
2023-04-03Allow open switch-enum in 5 placesRobert Hensing
2023-04-03Add explicit case statements where -Wswitch-enum would report themRobert Hensing
2023-04-03Fix systemd logging for lvlNotice: eqv to lvlInfo, not lvlVomitRobert Hensing
2023-04-03Fix BuildResult.toString() for NoSubstitutersRobert Hensing
2023-04-03Stuctured command stabilityJohn Ericson
Prior to this, there was an ad-hoc whitelist in `main.cc`. Now, every command states its stability. In a future PR, we will adjust the manual to take advantage of this new information in the JSON. (It will be easier to do that once we have some experimental feature docs to link too; see #5930 and #7798.)
2023-04-03Merge pull request #8148 from ↵Robert Hensing
hercules-ci/fix-issue-8119-printValue-tBlackhole-abort eval: Fix crash on missing printValue tBlackhole case
2023-04-03Merge pull request #8152 from obsidiansystems/move-querySubstitutablePathInfosEelco Dolstra
Move `querySubstitutablePathInfos` from `LocalStore` to `Store`
2023-04-03eval: Fix crash on missing printValue tBlackhole caseRobert Hensing
Fixes #8119
2023-04-03Merge pull request #7610 from obsidiansystems/gate-default-settingsThéophane Hufschmitt
Punt on improper global flags for now
2023-04-02Move `querySubstitutablePathInfos` from `LocalStore` to `Store`John Ericson
The code is not local-store-specific, so we should share it with all stores. More uniform behavior is better, and a less store-specific functionality is more maintainable. This fixes a FIXME added in f73d911628 by @edolstra himself.
2023-04-02Add more API docs to `experimental-features.hh`John Ericson
2023-04-02Rework a few things with the experimental features listJohn Ericson
- Use struct not `std::pair`, designated initializers - Use `constexpr` array that we can index by enum tag - It no longer segfaults; not sure why.
2023-04-02Merge remote-tracking branch 'upstream/master' into list-experimental-featuresJohn Ericson
2023-04-01Add comparison methods for content addressesJohn Ericson
2023-04-01Merge pull request #8122 from ↵John Ericson
bjornfor/use-nix-store-l-unless-experimental-enabled Don't recommend 'nix log' unless experimental feature is enabled
2023-03-31Ensure all headers have `#pragma once` and are in API docsJohn Ericson
`///@file` makes them show up in the internal API dos. A tiny few were missing `#pragma once`.
2023-03-31Extend internal API docs, part 2John Ericson
Picking up from #8111. Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2023-03-31Replace unnecessary Sync<uint64_t> with std::atomic<uint64_t>Patrick Jackson
2023-03-31IndentationEelco Dolstra
2023-03-31Add CanonPath::makeRelative()Eelco Dolstra
2023-03-31Merge pull request #7406 from amesgen/gitlab-fetcherThéophane Hufschmitt
Document `gitlab` input scheme
2023-03-31Merge pull request #8018 from tweag/ssh-password-promptThéophane Hufschmitt
SSH: don't erase password prompt if it is displayed
2023-03-30Only lock oncePatrick Jackson
2023-03-30Fix data race in copyPathsPatrick Jackson
2023-03-30Use "raw pattern" for content address typesJohn Ericson
We weren't because this ancient PR predated it! This is actually a new version of the pattern which addresses some issues identified in #7479.
2023-03-30Fix warningJohn Ericson
2023-03-30Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
Also improve content-address.hh API docs.