Commit graph

11559 commits

Author SHA1 Message Date
Max
ee2038b628 Merge branch 'pr/Ma27/6029' 2022-02-22 19:04:36 +01:00
Max
b792e369b9 Merge branch 'pr/ncfavier/6128' 2022-02-22 19:00:48 +01:00
Max
37edecb169 custom README 2022-02-22 18:25:14 +01:00
Max
d8995c2f68 NIXINATE 2022-02-22 18:25:14 +01:00
Max
9e592b8085 patch: cli overrides beta, nix-dram edition 2022-02-22 18:25:14 +01:00
Max
78384699de patch: cli: apply-to-installable, nix-dram edition 2022-02-22 18:25:14 +01:00
Max
a72dd4916f Merge branch 'pr/mopleen/5584' 2022-02-22 18:25:13 +01:00
Max
0dc764c309 Merge branch 'pr/Mewp/5577' 2022-02-22 18:24:40 +01:00
Max
47f5d658a5 patch: nix-dram 2022-02-22 18:24:08 +01:00
Max
244636e599 patch: enable all experimental features (@DavHau) 2022-02-22 18:24:08 +01:00
Max
3fd4fd0d23 patch: nix shell: more environment variables 2022-02-22 18:24:08 +01:00
Max
8f9a499e4d patch: flake: always evaluate thunks in inputs 2022-02-22 18:24:08 +01:00
Max
2ea1d02e50 patch: nix profile list better UI 2022-02-22 18:24:08 +01:00
Max
1d04ea2941 patch: no unknown flake outputs 2022-02-22 18:24:08 +01:00
Max
1c49d1f82d patch: nix-super primop 2022-02-22 18:24:08 +01:00
Max
4c28820dc0 patch: nix-super branding 2022-02-22 18:24:08 +01:00
Max
351e70ea68 Merge branch 'pr/mopleen/5625' 2022-02-22 18:24:08 +01:00
Max
1d6c4bdd3e init super 2022-02-21 20:36:39 +01:00
Eelco Dolstra
3848a8edb8
Merge pull request #6139 from edolstra/no-std-aliases
Remove std aliases
2022-02-21 18:18:42 +01:00
Eelco Dolstra
8ffb09a08a Fix macOS build 2022-02-21 17:14:22 +01:00
Eelco Dolstra
b98ce19544
Merge pull request #6138 from nmattia/nm-clarify-manpath
Document usage of MANPATH in nix-profile.sh
2022-02-21 16:54:01 +01:00
Eelco Dolstra
36c7b12f33 Remove std::string alias 2022-02-21 16:37:25 +01:00
Eelco Dolstra
1ac2664472 Remove std::vector alias 2022-02-21 16:32:34 +01:00
Eelco Dolstra
fe9afb65bb Remove std::set alias 2022-02-21 16:28:23 +01:00
Eelco Dolstra
afcdc7606c Remove std::list alias 2022-02-21 16:25:12 +01:00
Eelco Dolstra
e2422c4582
Merge pull request #6052 from hercules-ci/issue-3294-fix-interruptCallback-deadlock
Fix deadlocked nix-daemon zombies on darwin #3294
2022-02-21 16:21:45 +01:00
Robert Hensing
ddb6740e7d triggerInterrupt: Refactor to use break 2022-02-21 15:43:43 +01:00
Nicolas Mattia
44b7d104b4 Document usage of MANPATH in nix-profile.sh
While trying to figure out how `nix-env`/`nix profile` work I had a hard
time understand how man pages were being installed.

Took me quite some time to figure this out, thought it might be useful
to others too!
2022-02-21 13:35:55 +01:00
Eelco Dolstra
f22b9e72f5
Merge pull request #6120 from mayflower/print-full-names
path-info: use full store paths when we have them
2022-02-21 11:03:20 +01:00
Maximilian Bosch
fd170774c6
libstore/build: add a few explanatory comments; simplify 2022-02-20 16:02:44 +01:00
Maximilian Bosch
a539093919
tests: implement test for nix log with ssh-ng:// builds
A few notes:

* The `echo hi` is needed to make sure that a file that can be read by
  `nix log` is properly created (i.e. some output is needed). This is
  known and to be fixed in #6051.
* We explicitly ignore the floating-CA case here: the `$out` of `input3`
  depends on `$out` of `input2`. This means that there are actually two
  derivations - I assume that this is because at eval time (i.e.
  `nix-instantiate -A`) the hash of `input2` isn't known yet and the
  other .drv is created as soon as `input2` was built. This is another
  issue on its own, so we ignore the case here explicitly.
2022-02-20 15:56:22 +01:00
Maximilian Bosch
8a83e34c1e
libstore/derivation-goal: avoid double-parsing of JSON messages
To avoid that JSON messages are parsed twice in case of
remote builds with `ssh-ng://`, I split up the original
`handleJSONLogMessage` into three parts:

* `parseJSONMessage(const std::string&)` checks if it's a message in the
  form of `@nix {...}` and tries to parse it (and prints an error if the
  parsing fails).
* `handleJSONLogMessage(nlohmann::json&, ...)` reads the fields from the
  message and passes them to the logger.
* `handleJSONLogMessage(const std::string&, ...)` behaves as before, but
  uses the two functions mentioned above as implementation.

In case of `ssh-ng://`-logs the first two methods are invoked manually.
2022-02-19 22:48:01 +01:00
Maximilian Bosch
3d525e96c0
ssh-ng: also store build logs to make them accessible by nix log
Right now when building a derivation remotely via

    $ nix build -j0 -f . hello -L --builders 'ssh://builder'

it's possible later to read through the entire build-log by running
`nix log -f . hello`. This isn't possible however when using `ssh-ng`
rather than `ssh`.

The reason for that is that there are two different ways to transfer
logs in Nix through e.g. an SSH tunnel (that are used by `ssh`/`ssh-ng`
respectively):

* `ssh://` receives its logs from the fd pointing to `builderOut`. This
  is directly passed to the "log-sink" (and to the logger on each `\n`),
  hence `nix log` works here.
* `ssh-ng://` however expects JSON-like messages (i.e. `@nix {log data
  in here}`) and passes it directly to the logger without doing anything
  with the `logSink`. However it's certainly possible to extract
  log-lines from this format as these have their own message-type in the
  JSON payload (i.e. `resBuildLogLine`).

  This is basically what I changed in this patch: if the code-path for
  `builderOut` is not reached and a `logSink` is initialized, the
  message was successfully processed by the JSON logger (i.e. it's in
  the expected format) and the line is of the expected type (i.e.
  `resBuildLogLine`), the line will be written to the log-sink as well.

Closes #5079
2022-02-19 21:35:34 +01:00
Naïm Favier
f62f61331c
Add shell completion for --override-flake
Requires moving the MixEvalArgs class from libexpr to libcmd because
that's where completeFlakeRef is.
2022-02-19 18:57:09 +01:00
Naïm Favier
d69a1117a4
Perform tilde expansion when completing flake fragments
Allows completing `nix build ~/flake#<Tab>`.
We can implement expansion for `~user` later if needed.
Not using wordexp(3) since that expands way too much.
2022-02-19 18:57:09 +01:00
Naïm Favier
6576f0db06
Make completeDir follow symlinks
Allows completing `nix why-depends /run/cur<Tab>` to /run/current-system
2022-02-19 18:57:09 +01:00
Naïm Favier
dbdd3f6f8e
Ensure the completion marker is not processed beyond completion
I was surprised to see an error mentioning ___COMPLETE___ when trying to
complete a flag argument that had no completer implemented
2022-02-19 18:53:15 +01:00
Naïm Favier
9f2a2251b6
Fix completion of nested attributes in completeInstallable
Without this, completing `nix eval -f file.nix foo.<Tab>` suggests `bar`
instead of `foo.bar`, which messes up the command
2022-02-19 18:51:18 +01:00
Naïm Favier
989195752e
Add shell completion for --override-input 2022-02-19 18:36:02 +01:00
Linus Heckemann
dbdc63bc41 path-info: use full store paths when we have them
Fixes #5645
2022-02-19 00:32:05 +01:00
Eelco Dolstra
9bc03adbba
Integrate push-docker.sh into the release script
This also makes sure that we get the Docker images from the same Hydra
eval, rather than the latest build from job/nix/.../dockerImage, which
may not be the same.
2022-02-18 13:58:01 +01:00
Naïm Favier
505bf2cb7d
Accept and discard fragments in getFlakeRefForCompletion
Otherwise trying to complete `nix build foo#bar --update-input <Tab>`
fails with "unexpected fragment"
2022-02-18 13:19:57 +01:00
Eelco Dolstra
50e3840f14
Merge remote-tracking branch 'origin/script-to-make-docker-release' 2022-02-18 10:55:07 +01:00
Eelco Dolstra
26e99c817c
Merge pull request #6114 from Radvendii/welcomeText
add release notes for welcomeText
2022-02-18 10:52:03 +01:00
Rok Garbas
f0de5fb8e7
remove the manifest before creating them 2022-02-18 00:32:38 +01:00
Rok Garbas
bf435664d7
Merge remote-tracking branch 'origin/master' into script-to-make-docker-release 2022-02-18 00:15:23 +01:00
Taeer Bar-Yam
219fa2e43d add release notes for welcomeText 2022-02-17 15:17:20 -05:00
Eelco Dolstra
a768e85e2f
Merge pull request #6103 from Radvendii/welcomeText
add descriptive output when creating templates
2022-02-17 21:06:10 +01:00
Taeer Bar-Yam
f56dd3a36b make flake template welcomeText markdown 2022-02-17 13:59:32 -05:00
Eelco Dolstra
b24d541c34
Merge pull request #6110 from layus/patch-2
Create daemon-socket folder during install
2022-02-17 13:00:20 +01:00