aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-05-08libstore: also pass unwanted outputs to the post-build-hookYorick van Pelt
2023-05-08tests/post-hook: test to see if all outputs are passedYorick van Pelt
fe5509df caused only wanted outputs to be passed to the post-build-hook, which resulted in paths being built without ever going into the hook. This commit adds a (currently failing) test for this.
2023-05-08Merge pull request #8263 from frederictobiasc/improve-doc-genericclosureRobert Hensing
Documentation: Improve builtins.genericClosure
2023-05-08Merge pull request #8288 from figsoda/regexRobert Hensing
Fix hostRegex to accept hosts with a `-`
2023-05-05Merge pull request #6953 from EzraSingh/patch-1Théophane Hufschmitt
Update install-systemd-multi-user.sh
2023-05-03Fix hostRegex to accept hosts with a `-`figsoda
2023-05-03Merge pull request #8286 from fricklerhandwerk/uninstall-redirectsEelco Dolstra
add redirect to track moved uninstall section
2023-05-03add redirect to track moved uninstall sectionValentin Gagarin
2023-05-03doc rendering: add functions to scope explicitly (#7378)Valentin Gagarin
* doc rendering: add functions to scope explicitly this especially helps beginners with code readability, since the origin of names is always immediately visible.
2023-05-02Merge pull request #8282 from fricklerhandwerk/idea-approvedThéophane Hufschmitt
maintainers: add procedure for 'idea approved' label
2023-05-02Merge pull request #8270 from edolstra/nix-repairEelco Dolstra
nix: Support the --repair flag
2023-05-02use headings instead of list itemsValentin Gagarin
this allows easier linking and a provides a bit more visual clarity
2023-05-02add procedure for 'idea approved' labelValentin Gagarin
2023-04-28nix: Support the --repair flagEelco Dolstra
2023-04-28Merge pull request #8267 from fricklerhandwerk/uninstall-instructionsEelco Dolstra
move uninstall instructions to a separate page
2023-04-28move uninstall instructions to a separate pageValentin Gagarin
placed in a subsection of the binary install, the instructions are hard to find. putting them in a separate page that is shown in the table of contents should make it easier for users to find what they need when they need it.
2023-04-26Doc: Improve builtins.genericClosureFrédéric Christ
2023-04-25Merge pull request #8260 from edolstra/lazy-trees-cherrypicksEelco Dolstra
lazy-trees cherrypicks
2023-04-25FormattingEelco Dolstra
2023-04-25nix build --json: Only show non-zero startTime / stopTimeEelco Dolstra
2023-04-25TarArchive: Remove a duplicate constant and increase the buffer sizeEelco Dolstra
2023-04-24Merge pull request #8172 from edolstra/source-pathEelco Dolstra
Backport `SourcePath` from the lazy-trees branch
2023-04-24Add some more SourcePath docsEelco Dolstra
2023-04-24Document tMiscEelco Dolstra
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-04-24Merge remote-tracking branch 'origin/master' into source-pathEelco Dolstra
2023-04-21Merge pull request #7710 from obsidiansystems/context-not-path-setThéophane Hufschmitt
Use `std::set<StringContextElem>` not `PathSet` for string contexts
2023-04-21Use `std::set<StringContextElem>` not `PathSet` for string contextsJohn Ericson
Motivation `PathSet` is not correct because string contexts have other forms (`Built` and `DrvDeep`) that are not rendered as plain store paths. Instead of wrongly using `PathSet`, or "stringly typed" using `StringSet`, use `std::std<StringContextElem>`. ----- In support of this change, `NixStringContext` is now defined as `std::std<StringContextElem>` not `std:vector<StringContextElem>`. The old definition was just used by a `getContext` method which was only used by the eval cache. It can be deleted altogether since the types are now unified and the preexisting `copyContext` function already suffices. Summarizing the previous paragraph: Old: - `value/context.hh`: `NixStringContext = std::vector<StringContextElem>` - `value.hh`: `NixStringContext Value::getContext(...)` - `value.hh`: `copyContext(...)` New: - `value/context.hh`: `NixStringContext = std::set<StringContextElem>` - `value.hh`: `copyContext(...)` ---- The string representation of string context elements no longer contains the store dir. The diff of `src/libexpr/tests/value/context.cc` should make clear what the new representation is, so we recommend reviewing that file first. This was done for two reasons: Less API churn: `Value::mkString` and friends did not take a `Store` before. But if `NixStringContextElem::{parse, to_string}` *do* take a store (as they did before), then we cannot have the `Value` functions use them (in order to work with the fully-structured `NixStringContext`) without adding that argument. That would have been a lot of churn of threading the store, and this diff is already large enough, so the easier and less invasive thing to do was simply make the element `parse` and `to_string` functions not take the `Store` reference, and the easiest way to do that was to simply drop the store dir. Space usage: Dropping the `/nix/store/` (or similar) from the internal representation will safe space in the heap of the Nix programming being interpreted. If the heap contains many strings with non-trivial contexts, the saving could add up to something significant. ---- The eval cache version is bumped. The eval cache serialization uses `NixStringContextElem::{parse, to_string}`, and since those functions are changed per the above, that means the on-disk representation is also changed. This is simply done by changing the name of the used for the eval cache from `eval-cache-v4` to eval-cache-v5`. ---- To avoid some duplication `EvalCache::mkPathString` is added to abstract over the simple case of turning a store path to a string with just that string in the context. Context This PR picks up where #7543 left off. That one introduced the fully structured `NixStringContextElem` data type, but kept `PathSet context` as an awkward middle ground between internal `char[][]` interpreter heap string contexts and `NixStringContext` fully parsed string contexts. The infelicity of `PathSet context` was specifically called out during Nix team group review, but it was agreeing that fixing it could be left as future work. This is that future work. A possible follow-up step would be to get rid of the `char[][]` evaluator heap representation, too, but it is not yet clear how to do that. To use `NixStringContextElem` there we would need to get the STL containers to GC pointers in the GC build, and I am not sure how to do that. ---- PR #7543 effectively is writing the inverse of a `mkPathString`, `mkOutputString`, and one more such function for the `DrvDeep` case. I would like that PR to have property tests ensuring it is actually the inverse as expected. This PR sets things up nicely so that reworking that PR to be in that more elegant and better tested way is possible. Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2023-04-20Update install-systemd-multi-user.shEzra Singh
2023-04-20Merge pull request #8242 from obsidiansystems/recursive.nixRobert Hensing
Move `test/recursive.sh` nix expr to file
2023-04-19Move `test/recursive.sh` nix expr to fileJohn Ericson
I found it hard to read as a big string literal.
2023-04-19Merge pull request #8233 from wentasah/narinfo-corrupt-reasonThéophane Hufschmitt
Make "NAR info file is corrupt" messages more informative
2023-04-18Merge pull request #8220 from accelbread/whitelist-commit-lockfile-summaryRobert Hensing
Add commit-lockfile-summary to flake nixConfig whitelist
2023-04-18src/nix/flake.md: Itemize safe nixConfigsRobert Hensing
2023-04-18Merge pull request #8231 from obsidiansystems/add-derivation-xp-gatesRobert Hensing
Gate experimental features in `DerivationOutput::fromJSON`
2023-04-18Make "NAR info file is corrupt" messages more informativeMichal Sojka
Recently, I encountered the "NAR info file 'xxxx' is corrupt" error with my binary cache. The message is not helpful in determining, which kind of corruption happened. The file, fetched with curl, looked reasonably. This commit adds more information to the error message, which should allow debugging and hopefully fixing the problem.
2023-04-18Merge pull request #8236 from theutz/masterValentin Gagarin
Update installing-binary.md
2023-04-18Update installing-binary.mdMichael Utz
2023-04-18Merge pull request #8235 from peeley/fix-nix-database-glossary-typoValentin Gagarin
Documentation: fix typo for `Nix database` link in manual
2023-04-17Documentation: fix typo for `Nix database` link in manualNoah Snelson
Fixes broken link for `Nix database` anchor in the Glossary page of the Nix manual.
2023-04-17Gate experimental features in `DerivationOutput::fromJSON`John Ericson
This is an entry point for outside data, so we need to check enabled experimental features here.
2023-04-17Merge pull request #8230 from obsidiansystems/daemon-trust-overrideRobert Hensing
Experimentally allow forcing `nix-daemon` trust; use this to test
2023-04-17Merge pull request #8194 from obsidiansystems/redisplay-feature-gated-settingsRobert Hensing
Fix some issues with experimental config settings
2023-04-17Experimentally allow forcing `nix-daemon` trust; use this to testJohn Ericson
We finally test the status quo of remote build trust in a number of ways. We create a new experimental feature on `nix-daemon` to do so. PR #3921, which improves the situation with trustless remote building, will build upon these changes. This code / tests was pull out of there to make this, so everything is easier to review, and in particular we test before and after so the new behavior in that PR is readily apparent from the testsuite diff alone.
2023-04-17Fix some issues with experimental config settingsJohn Ericson
Issues: 1. Features gated on disabled experimental settings should warn and be ignored, not silently succeed. 2. Experimental settings in the same config "batch" (file or env var) as the enabling of the experimental feature should work. 3. For (2), the order should not matter. These are analogous to the issues @roberth caught with my changes for arg handling, but they are instead for config handling. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-04-17Merge pull request #6312 from obsidiansystems/keyed-build-resultRobert Hensing
Shuffle `BuildResult` data definition, make state machine clearer, introduce `SingleDrvOutputs`
2023-04-17Merge pull request #7514 from fricklerhandwerk/opt-IValentin Gagarin
remove incorrect reference to `NIX_PATH` documentation
2023-04-17Merge pull request #3746 from obsidiansystems/path-infoRobert Hensing
Introduce `StoreReferences` and `ContentAddressWithReferences`
2023-04-17Explain various `.self = false,`John Ericson
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-04-17use @docroot@ linkValentin Gagarin
2023-04-17add link to `nix-conf` settingValentin Gagarin
Co-authored-by: John Ericson <git@JohnEricson.me>