Commit graph

14425 commits

Author SHA1 Message Date
Robert Hensing
879e45247c
Merge pull request #8288 from figsoda/regex
Fix hostRegex to accept hosts with a `-`
2023-05-08 12:14:59 +02:00
Matej Urbas
613bc699bb max-substitution-jobs setting 2023-05-07 20:22:18 +01:00
Valentin Gagarin
7c03285719
Update CONTRIBUTING.md
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2023-05-06 14:24:49 +02:00
Valentin Gagarin
0fad8f71c4 highlight 'idea approved' issues in contributing guide 2023-05-05 14:15:29 +02:00
Théophane Hufschmitt
81778c8d55
Merge pull request #6953 from EzraSingh/patch-1
Update install-systemd-multi-user.sh
2023-05-05 13:20:22 +02:00
figsoda
0662fd8599 Fix hostRegex to accept hosts with a - 2023-05-03 18:59:44 -04:00
Eelco Dolstra
b17c4290cf
Merge pull request #8286 from fricklerhandwerk/uninstall-redirects
add redirect to track moved uninstall section
2023-05-03 14:09:33 +02:00
Valentin Gagarin
dc8191ae14 add redirect to track moved uninstall section 2023-05-03 11:39:29 +02:00
Valentin Gagarin
5d78dc4176
doc rendering: add functions to scope explicitly (#7378)
* 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-03 07:16:29 +00:00
Théophane Hufschmitt
1540ab7628
Merge pull request #8282 from fricklerhandwerk/idea-approved
maintainers: add procedure for 'idea approved' label
2023-05-02 16:34:01 +02:00
Eelco Dolstra
ba180d7d89
Merge pull request #8270 from edolstra/nix-repair
nix: Support the --repair flag
2023-05-02 12:54:08 +02:00
Valentin Gagarin
feb2200ba6 use headings instead of list items
this allows easier linking and a provides a bit more visual clarity
2023-05-02 11:30:27 +02:00
Valentin Gagarin
521cca1840 add procedure for 'idea approved' label 2023-05-02 11:28:03 +02:00
Eelco Dolstra
17e6b85d05 nix: Support the --repair flag 2023-04-28 17:03:04 +02:00
Eelco Dolstra
89d3cc5a47
Merge pull request #8267 from fricklerhandwerk/uninstall-instructions
move uninstall instructions to a separate page
2023-04-28 12:41:09 +02:00
Valentin Gagarin
f8620758aa display documentation on manifest files separately
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-28 12:10:36 +02:00
Valentin Gagarin
9b2a4a4729 move uninstall instructions to a separate page
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-28 11:53:38 +02:00
Valentin Gagarin
da0dbf36cb move manifest information to the bottom of the page 2023-04-26 15:39:35 +02:00
Valentin Gagarin
be7c236565 move compatibility info to nix profile docs 2023-04-26 15:39:35 +02:00
Valentin Gagarin
219aaf5a0b increase heading level
otherwise the headings won't match at the point where they are included.
this is a bit hacky and brittle, but works for now.
2023-04-26 15:39:35 +02:00
Valentin Gagarin
bb8e3b5d86 update description on how profiles work
adapt to the example listing
2023-04-26 15:39:35 +02:00
Valentin Gagarin
7770d82240 fix typos and wording 2023-04-26 15:39:24 +02:00
Valentin Gagarin
9d386fe2ee add colons to connect listings with descriptions 2023-04-26 15:39:16 +02:00
Valentin Gagarin
a1c996dc7e list information regular users first
this is to make it consistent everywhere
2023-04-26 15:39:02 +02:00
Alexander Bantyev
aee5e82b42 Include user-profiles.md into nix profile --help 2023-04-26 15:38:19 +02:00
Alexander Bantyev
8a93b5a551 Document user files of nix 2023-04-26 15:38:19 +02:00
Frédéric Christ
f0d2b7eef3 Doc: Improve builtins.genericClosure 2023-04-26 09:37:32 +02:00
Eelco Dolstra
946fd29422
Merge pull request #8260 from edolstra/lazy-trees-cherrypicks
lazy-trees cherrypicks
2023-04-25 17:36:53 +02:00
Eelco Dolstra
87f676b3a0 Formatting 2023-04-25 16:52:02 +02:00
Eelco Dolstra
a74d397549 nix build --json: Only show non-zero startTime / stopTime 2023-04-25 16:43:47 +02:00
Eelco Dolstra
880e7b8ed6 TarArchive: Remove a duplicate constant and increase the buffer size 2023-04-25 16:43:10 +02:00
Eelco Dolstra
249ce28332
Merge pull request #8172 from edolstra/source-path
Backport `SourcePath` from the lazy-trees branch
2023-04-24 14:05:51 +02:00
Eelco Dolstra
5d3f6dbf59 Add some more SourcePath docs 2023-04-24 13:37:51 +02:00
Eelco Dolstra
ad57cff9bc
Document tMisc
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-04-24 13:34:46 +02:00
Eelco Dolstra
01232358ff Merge remote-tracking branch 'origin/master' into source-path 2023-04-24 13:20:36 +02:00
Théophane Hufschmitt
7474a90db6
Merge pull request #7710 from obsidiansystems/context-not-path-set
Use `std::set<StringContextElem>` not `PathSet` for string contexts
2023-04-21 08:14:58 +02:00
John Ericson
8eeaf591db
Add more docs to TextIngestionMethod
Thanks so much!

Co-authored-by: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com>
2023-04-21 01:30:55 -04:00
John Ericson
85f0cdc370 Use std::set<StringContextElem> not PathSet for string contexts
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-21 01:05:49 -04:00
Ezra Singh
24005270cc
Update install-systemd-multi-user.sh 2023-04-20 18:36:01 -04:00
Robert Hensing
ef432b2b15
Merge pull request #8242 from obsidiansystems/recursive.nix
Move `test/recursive.sh` nix expr to file
2023-04-20 13:22:35 +02:00
John Ericson
969def696a Fix typo in tests 2023-04-19 20:47:23 -04:00
John Ericson
e26662709e Add a more interesting test
In this one, we don't just output an existing derivation as is, but
modify it first.
2023-04-19 20:36:33 -04:00
John Ericson
3eb343754e Move test/recursive.sh nix expr to file
I found it hard to read as a big string literal.
2023-04-19 19:36:05 -04:00
John Ericson
f3a31b14db Make tests/dyn-drv test dir 2023-04-19 18:49:50 -04:00
John Ericson
61d3e64fd0 Require daemon version for text hashing test 2023-04-19 17:24:55 -04:00
John Ericson
7103c6da70 Remove references from fixed output derivation ab syntax
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-19 15:00:04 -04:00
John Ericson
aba8a8a83a Add a few more content addressing methods
Good to round out the library interface.
2023-04-19 14:13:30 -04:00
John Ericson
20decfd302 Gate dynamic-derivations with drv fromJSON too
Don't want `nix derivation add` to be a way to sneak by experimental
feature checks!
2023-04-19 12:44:38 -04:00
John Ericson
76baaeb341 Merge remote-tracking branch 'upstream/master' into ca-drv-exotic 2023-04-19 11:32:14 -04:00
Théophane Hufschmitt
d3e2394e91
Merge pull request #8233 from wentasah/narinfo-corrupt-reason
Make "NAR info file is corrupt" messages more informative
2023-04-19 06:57:08 +02:00