aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-05-15Split `mkOutputString` in twoJohn Ericson
This well help us with some unit testing
2023-05-15Remove unneeded argument for `mkOutputString`John Ericson
2023-05-15Merge pull request #8141 from tweag/user-files-docJohn Ericson
Document user files of nix
2023-05-14`max-substitution-jobs` release note entryMatej Urbas
2023-05-12Merge pull request #8299 from urbas/max-substitution-jobsEelco Dolstra
`max-substitution-jobs` setting
2023-05-10Fix `nix print-dev-env` & `nix develop` with drv pathsJohn Ericson
Fixes #8309 This regression was because both `CmdDevelop` and `CmdPrintDevEnv` were switched to be `InstallableValueCommand` subclasses, but actually neither should have been. The `nixpkgsFlakeRef` method should indeed not be on the base installable class, because "flake refs" and "nixpkgs" are not installable-wide notions, but that doesn't mean these commands should only accept installable values.
2023-05-10Merge pull request #3959 from obsidiansystems/ca-drv-exoticJohn Ericson
Derivations can output "text-hashed" data
2023-05-10Merge pull request #7721 from yorickvP/post-build-hookThéophane Hufschmitt
Also pass unwanted outputs to post-build-hook
2023-05-09Improve error message for self reference with text hashingJohn Ericson
The `ContentAddressWithReferences` method is made total, with error handling now squarely the caller's job. This is better.
2023-05-09Add name to some error messagesJohn Ericson
2023-05-09Cleanups to content address typesJohn Ericson
2023-05-09Apply suggestions from code review John Ericson
Thanks! Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-05-09Fix bug, `newInfo` -> `newInfo0`John Ericson
It appears we were checking a variable in the process of definining it.
2023-05-09Fix spurious changeJohn Ericson
Didn't mean to use the private name that shouldn't be exposed.
2023-05-09prevent double quotationAlex Ameen
2023-05-09libexpr: quote reserved keys when printingAlex Ameen
This fixes a bug in commands like `nix eval' which would emit invalid attribute sets if they contained reserved keywords such as "assert", "let", etc. These keywords will not be quoted when printed, making them valid expressions. All keywords recognized by the lexer are quoted except "or", which does not require quotation.
2023-05-08introduces `Goal::jobCategory`Matej Urbas
2023-05-08removes MaxSubstitutionJobsSettingMatej Urbas
2023-05-08Merge pull request #3921 from obsidiansystems/trustless-remote-builder-simpleJohn Ericson
Trustless remote building for input-addressed drvs
2023-05-08Split comment, match with each variableJohn Ericson
2023-05-08Apply suggestions from code reviewJohn Ericson
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-05-08Rename a few things in new testsJohn Ericson
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-05-08CA: rewrite hashes for all outputs, not just the wanted onesYorick van Pelt
2023-05-08libstore: also pass unwanted outputs to the post-build-hookYorick van Pelt
2023-05-08Merge pull request #8263 from frederictobiasc/improve-doc-genericclosureRobert Hensing
Documentation: Improve builtins.genericClosure
2023-05-07`max-substitution-jobs` settingMatej Urbas
2023-05-03Fix hostRegex to accept hosts with a `-`figsoda
2023-04-28nix: Support the --repair flagEelco Dolstra
2023-04-28display documentation on manifest files separatelyValentin Gagarin
it's probably better not to show the manifest file documentation in the command-specific pages, because these are implementation details that are not really practically useful. this means no additional hassle for building the manual, but clutters the table of contents a bit.
2023-04-26move compatibility info to `nix profile` docsValentin Gagarin
2023-04-26Include user-profiles.md into nix profile --helpAlexander Bantyev
2023-04-26Document user files of nixAlexander Bantyev
2023-04-26Doc: Improve builtins.genericClosureFrédéric Christ
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-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-21Add more docs to `TextIngestionMethod` John Ericson
Thanks so much! Co-authored-by: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com>
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-19Remove references from fixed output derivation ab syntaxJohn Ericson
In other words, use a plain `ContentAddress` not `ContentAddressWithReferences` for `DerivationOutput::CAFixed`. Supporting fixed output derivations with (fixed) references would be a cool feature, but it is out of scope at this moment.
2023-04-19Add a few more content addressing methodsJohn Ericson
Good to round out the library interface.
2023-04-19Gate `dynamic-derivations` with drv `fromJSON` tooJohn Ericson
Don't want `nix derivation add` to be a way to sneak by experimental feature checks!
2023-04-19Merge remote-tracking branch 'upstream/master' into ca-drv-exoticJohn Ericson
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-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-17`TextHashMethod` -> `TextIngestionMethod`, gate with XP featureJohn Ericson
I suppose we can use `dynamic-derivations` for the few things we neeed.