Commit graph

12574 commits

Author SHA1 Message Date
John Ericson
699fc89b39 Merge remote-tracking branch 'upstream/master' into hash-always-has-type 2020-07-27 14:22:45 +00:00
Eelco Dolstra
d7c0f094cb
Merge pull request #3860 from matthewbauer/precompile-headers-cross
Allow PRECOMPILE_HEADERS in cross-compilation
2020-07-26 13:09:36 +02:00
Maximilian Bosch
6ccfdb79c7
libutil/logging: extend internal-json logger to make it more machine-readable
The new error-format is pretty nice from a UX point-of-view, however
it's fairly hard to parse the output e.g. for editor plugins such as
vim-ale[1] that use `nix-instantiate --parse` to determine syntax errors in
Nix expression files.

This patch extends the `internal-json` logger by adding the fields
`line`, `column` and `file` to easily locate an error in a file and the
field `raw_msg` which contains the error-message itself without
code-lines and additional helpers.

An exemplary output may look like this:

```
[nix-shell]$ ./inst/bin/nix-instantiate ~/test.nix --log-format minimal
{"action":"msg","column":1,"file":"/home/ma27/test.nix","level":0,"line":4,"raw_msg":"syntax error, unexpected IF, expecting $end","msg":"<full error-msg with code-lines etc>"}
```

[1] https://github.com/dense-analysis/ale
2020-07-26 02:29:57 +02:00
Matthew Bauer
72f8771094 Allow PRECOMPILE_HEADERS in cross-compilation
In cross, CXX will look like aarch64-unknown-linux-gnu-g++. We could
run some command to check what kind of compiler it is, but for now we
can just check if g++ is anywhere in the string. I couldn’t find any
"ends with" for makefile, so it can be anywhere in CXX.
2020-07-25 18:02:42 -05:00
John Ericson
2c7557481b queryDerivationOutputMap no longer assumes all outputs have a mapping
This assumption is broken by CA derivations. Making a PR now to do the
breaking daemon change as soon as possible (if it is already too late,
we can bump protocol intead).
2020-07-24 21:14:06 +00:00
Eelco Dolstra
1308c8404e
Remove DocBook manual 2020-07-24 15:48:40 +02:00
Eelco Dolstra
05a282295f
Fix internal links 2020-07-24 15:46:16 +02:00
Eelco Dolstra
da3d776cb9
Fix some dangling references 2020-07-24 14:31:33 +02:00
Eelco Dolstra
4a79b3598f
Fix nix-copy-closure manpage 2020-07-24 13:01:00 +02:00
Eelco Dolstra
7a0e6f076a
Move figures 2020-07-24 12:58:31 +02:00
Eelco Dolstra
758c9ee1bb
Clean up the manpages 2020-07-24 12:56:19 +02:00
Eelco Dolstra
8d0b311a1c
Get rid of footnotes
Markdown doesn't support them.
2020-07-24 11:43:44 +02:00
Eelco Dolstra
a71d1cedff
printVersion(): Show system types 2020-07-24 11:34:01 +02:00
Eelco Dolstra
2292814049
createUnixDomainSocket(): Fix off-by-one error in copying the socket path
Reported by Kane York.
2020-07-24 11:19:17 +02:00
John Ericson
58e55c0923 Merge branch 'misc-ca' of github.com:obsidiansystems/nix into derivation-primop-floating-output 2020-07-23 19:17:52 +00:00
John Ericson
a2af25c55a Merge remote-tracking branch 'upstream/master' into misc-ca 2020-07-23 19:14:17 +00:00
John Ericson
e1de1fe0d8 Make Buildable a std::variant
I think this better captures the intent of what's going on: we either
have an opaque store path, or a drv path with some outputs.

Having this structure will also help us support CA derivations: we'll
have to allow the outpath paths to be optional, so the structure we gain
now makes up for the structure we loose then.
2020-07-23 19:02:57 +00:00
Eelco Dolstra
5e3ad1dde0
Add a separate manual job 2020-07-23 18:27:20 +02:00
Eelco Dolstra
69333cb62c
Sigh 2020-07-23 18:27:20 +02:00
Eelco Dolstra
802150f987
<replaceable> -> <emphasis>
Pandoc doesn't know <replaceable> so let's force it to be rendered as
italics.
2020-07-23 18:27:20 +02:00
Eelco Dolstra
ee05108472
<simplesect> -> <section>
Pandoc silently ignores <simplesect>...
2020-07-23 18:27:20 +02:00
Eelco Dolstra
136fd55bb2
Get rid of <figure> 2020-07-23 18:27:20 +02:00
Eelco Dolstra
ca130b73a0
Get rid of <example>
Markdown doesn't have floats so we can't have this.
2020-07-23 18:27:20 +02:00
Eelco Dolstra
13df1faf25
Get rid of callouts since Markdown doesn't support them 2020-07-23 18:27:20 +02:00
Eelco Dolstra
efff6cf163
Install all manpages 2020-07-23 18:27:12 +02:00
Eelco Dolstra
504b7abc45
Convert commands 2020-07-23 18:27:12 +02:00
Eelco Dolstra
efdb89994c
Convert nix.conf manpage 2020-07-23 18:27:11 +02:00
Eelco Dolstra
f390303566
Reconvert 2020-07-23 18:27:11 +02:00
Eelco Dolstra
c20c082383
<envar> -> <literal> 2020-07-23 18:27:11 +02:00
Eelco Dolstra
942cd687f9
Remove libxml2 / libxslt prerequisites 2020-07-23 18:26:48 +02:00
Eelco Dolstra
ef606760ab
Pandoc conversion 2020-07-23 18:26:48 +02:00
Eelco Dolstra
d004715665
Fix link 2020-07-23 18:26:48 +02:00
Eelco Dolstra
315407c16f
Remove subtitles 2020-07-23 18:26:48 +02:00
Eelco Dolstra
ebdc1f6dfb
Typo 2020-07-23 18:26:48 +02:00
Eelco Dolstra
8e41c38867
Remove references to xmllint 2020-07-23 18:26:48 +02:00
Eelco Dolstra
e0ea3c82ca
Use mdbook 2020-07-23 18:26:48 +02:00
Eelco Dolstra
650ae14ced
Markdown test 2020-07-23 18:26:48 +02:00
Eelco Dolstra
26fcab53e0
Remove unused file 2020-07-23 18:25:09 +02:00
John Ericson
c36916eca0 Merge branch 'misc-ca' of github.com:obsidiansystems/nix into derivation-primop-floating-output 2020-07-23 15:06:56 +00:00
John Ericson
6fcd9966bf Merge remote-tracking branch 'upstream/master' into misc-ca 2020-07-23 15:02:29 +00:00
Eelco Dolstra
a7b8f79938
Merge pull request #3855 from obsidiansystems/delete-find-output
Get rid of `basicDerivation::findOutput`
2020-07-23 16:56:58 +02:00
John Ericson
66a2067288 Merge remote-tracking branch 'upstream/master' into better-ca-parse-errors 2020-07-23 14:56:35 +00:00
John Ericson
2274f63453 Get rid of basicDerivation::findOutput
It's a tiny function which is:

 - hardly worth abstrating over, and also only used once.

 - doesn't work once we get CA drvs

I rewrote the one callsite to be forwards compatable with CA
derivations, and also potentially more performant: instead of reading in
the derivation it can ust consult the SQLite DB in the common case.
2020-07-23 14:39:02 +00:00
Eelco Dolstra
4bfba1305e
Merge pull request #3854 from B4dM4n/registry-pin-write
Save changes made by "nix registry pin" to user registry
2020-07-23 16:13:05 +02:00
Fabian Möller
b9ead08ca8
Save changes made by "nix registry pin" to user registry 2020-07-23 14:21:27 +02:00
Eelco Dolstra
d58ab591d4
Merge pull request #3850 from obsidiansystems/references-scan-cleanup
Separate concerns in `scanForReferences` with TeeSink
2020-07-23 12:51:01 +02:00
John Ericson
9423f64ee2 Parse CA derivations using new output variants
We no longer need `ParsedDerivation` because everything libstore needs
to know about is in the `BasicDerivation` proper.
2020-07-22 23:59:25 +00:00
John Ericson
c56356bacc Separate concerns in scanForReferences with TeeSink
This also will make it easier to use a `HashModuloSink` instead for CA
derivations.
2020-07-22 22:13:44 +00:00
Eelco Dolstra
090960b725
Merge pull request #3848 from knedlsepp/patch-1
README: Fix link to hacking guide
2020-07-22 14:31:40 +02:00
Josef Kemetmüller
ae9e9753ce
README: Fix link to hacking guide
The link was previously interpreted as if it were relative to the current file.
2020-07-22 13:45:15 +02:00