1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2026-01-11 16:58:03 +01:00
Commit graph

22410 commits

Author SHA1 Message Date
Sergei Zimmerman
0ab9a2bc85
ci: Fix docker-push location for dockerhub
Pre-release stuff was supposed to get pushed to nixos/nix but ended up
in nixosautomation/nix duh...

This makes us wonder just how useful having them even pushed is remotely
useful to anybody, but let's keep it for now. Maybe this should be a
nightly/weekly thing?

Broken in 7e6a7c9258.
2025-12-30 00:39:37 +03:00
tomberek
b5e039b7c1
Merge pull request #14879 from ConnorBaker/fix/eval-cache-parsing-of-contexts
eval-cache: fix parsing of contexts
2025-12-29 20:35:49 +00:00
tomberek
e8080379ee
Merge pull request #14887 from steelman/xdg-state-home-manual
docs: fix typos
2025-12-29 20:29:48 +00:00
tomberek
56ab28c1ad
Merge pull request #14890 from Mic92/clang-tidy
clang-tidy cleanups
2025-12-29 20:29:08 +00:00
Jörg Thalheim
b066db6011 libutil: break circular include between signals.hh and signals-impl.hh
Remove include of signals.hh from signals-impl.hh to fix
misc-header-include-cycle warning. The impl header is only included
from signals.hh which already provides the necessary declarations.
2025-12-29 15:25:52 +00:00
Jörg Thalheim
8aa02c19b6 libutil: add missing pos field initializer in BaseError constructors
When using designated initializers, clang-tidy warns about skipped
fields. Explicitly initialize pos to {} to silence the
clang-diagnostic-missing-designated-field-initializers warning.
2025-12-29 15:25:46 +00:00
Łukasz Stelmach
b2fdacd36c docs: fix typos 2025-12-29 01:07:47 +01:00
Connor Baker
edebabe9bf eval-cache: fix parsing of contexts
The members of the context were serialized with a space as the delimiter, not a semicolon.

Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
2025-12-28 15:38:31 +00:00
Sergei Zimmerman
b17034ba59
Merge pull request #14874 from xokdvium/flake-regression-reuse-nix-closure
ci: Run flake-regressions also with the newly built daemon
2025-12-28 14:46:15 +00:00
Sergei Zimmerman
5aa2af1354
Merge pull request #14872 from xokdvium/docker-push-image-separate-workflow
ci: Move docker_push_image into a separate workflow
2025-12-28 13:07:59 +00:00
Sergei Zimmerman
c54af23b41
ci: Pin download-artifact actions sha 2025-12-28 05:36:20 +03:00
Sergei Zimmerman
6eebfe6274
ci: Run flake-regressions also with the newly built daemon
Runs the tests against the new daemon as well as the cli.

This more reliably shares the artifact (not relying directly on github
actions cache). We've seen github evict our caches super fast, so it would
be nice to move away from it entirely if possible.
2025-12-28 05:18:43 +03:00
Sergei Zimmerman
c867ed6726
ci: Make docker-push workflow more configurable
This should allow reusing this workflow (with more tweaks)
in the releng workflow.
2025-12-28 03:35:40 +03:00
Sergei Zimmerman
fb05f6de0d
ci: Pin actions in docker-push reusable workflow 2025-12-28 03:35:39 +03:00
Sergei Zimmerman
745983dfc0
ci: Move docker_push_image into a separate workflow
Best reviewed with -w --color-moved. This just moves the code
into a separate workflow. This will allow us to reuse it in
the release job for github releng of releases.
2025-12-28 03:35:36 +03:00
Sergei Zimmerman
8093df5255
Merge pull request #14845 from Zaczero/zaczero/BufferedSource--readLine
Add buffered line reads to BufferedSource
2025-12-27 20:55:43 +00:00
Kamil Monicz
b813ed2602
Add buffered line reads to BufferedSource
Provide BufferedSource::readLine for opt-in buffered line reading. Migrate applicable call sites.
2025-12-27 23:10:10 +03:00
Jörg Thalheim
f6ca5dc5cb
Merge pull request #14865 from Mic92/daemon-deadlock
daemon: fix deadlock when SSH client disconnects during remote builds
2025-12-26 14:31:31 +00:00
Jörg Thalheim
cfe5fc6a4a
Merge pull request #14855 from NoRePercussions/norepercussions/push-ymokollxlmvw
fix: make --rebuild failures actionable
2025-12-26 12:11:51 +00:00
Jörg Thalheim
0b5773d1d0
Merge pull request #14838 from NixOS/double-callback-filetransfer
libstore/filetransfer: Fix double callback on enqueueFileTransfer that is shutting down
2025-12-26 11:32:29 +00:00
Jörg Thalheim
212bf2b702 daemon: fix deadlock when SSH client disconnects during remote builds
When a remote SSH client disconnects during a long-running operation
like addToStore(), the nix-daemon can deadlock in a circular wait:

  - Process A (SSH daemon): blocked reading from downstream store socket,
    waiting for response from local daemon
  - Process B (local daemon): blocked reading from upstream socket,
    waiting for more NAR data from SSH daemon

The existing interrupt mechanism (ReceiveInterrupts + MonitorFdHup)
correctly detects the SSH disconnect and sets _isInterrupted, but the
daemon remains blocked in read() on the downstream store connection.
Even though SIGUSR1 causes read() to return EINTR, the circular
dependency prevents forward progress.

Fix this by adding shutdownConnections() to RemoteStore that calls
shutdown(fd, SHUT_RDWR) on all tracked connection file descriptors.
Register an interrupt callback in processConnection() that invokes
this method when the store is a RemoteStore. This causes any blocking
read() to return 0 (EOF), breaking the circular wait and allowing
both processes to exit cleanly.

The fix tracks connection FDs in a synchronized set, populated when
connections are created by the Pool factory. On interrupt, all FDs
are shut down regardless of whether they're idle or in-use.
2025-12-25 06:28:41 +00:00
Sergei Zimmerman
a3bcd2543e
Merge pull request #14862 from NixOS/more-precise-exceptions-memory-source-accessor
libutil: Make MemorySourceAccessor throw more precise errors
2025-12-24 20:13:18 +00:00
Sergei Zimmerman
76c6f3cfd0
libutil: Make MemorySourceAccessor throw more precise errors
Makes the error messages render paths correctly, also introduces
a new hierarchy of error classes for SourceAccessor related errors
that we might want to handle differently (e.g. like when doing a readFile
on a directory and such). This should make it easier to implement better
UnionSourceAccessor and AllowListSourceAccessor by catching these errors
consistently.
2025-12-24 01:49:29 +03:00
Jörg Thalheim
3c3e5cbcdb
Merge pull request #14792 from Enzime/push-roqmwvnknzqw
Fix `curl` with `c-ares` failing to resolve DNS inside sandbox on macOS
2025-12-23 09:07:29 +00:00
Sergei Zimmerman
130a656330
Merge pull request #14846 from roberth/issue-14816
Fix empty input path segfault (#14816)
2025-12-22 21:27:26 +00:00
Tucker Shea
396358dc08
fix: make --rebuild failures actionable
See #8188. Resolves issues about the error not
being actionable, but I am not marking it closing
yet because of further discussion about the naming
of these flags in the thread.

`nix build --rebuild` (and others)
will fail if the derivation has not been built
before, because it runs a check build and
confirms that the build was deterministic.

It may be unclear to users that --rebuild will fail
if the derivation has never been built before,
because the flag makes no indication that a
determinism check occurs.

The error message does
not help clear this up, or provide any actionable
steps, and at first glance seems to indicate that
the derivation being built is invalid, rather than
just not present in the store:

```
error: some outputs of '...' are not valid, so checking is not possible
```

We can suggest to the user the following (correct)
rewrites. This list of commands that may result in
the error is comprehensive.

- `nix build --rebuild` to `nix build` or `nix build --repair`
- `nix-build --check` to `nix-build` or `nix-build --repair`
- `nix-store --realise --check` to `nix-store --realise` or `nix-store --realise --repair`

Wording is based on that in the documentation:

```
(nix build)
--repair During evaluation, rewrite missing or
         corrupted files in the Nix store. During
         building, rebuild missing or corrupted
         store paths.

(nix-build)
--repair Fix corrupted or missing store paths by
         redownloading or rebuilding them. Note
         that this is slow because it requires
         computing a cryptographic hash of the
         contents of every path in the closure
         of the build. Also note the warning
         under nix-store --repair-path.

(nix-store --realise)
--repair Fix corrupted or missing store paths by
         redownloading or rebuilding them. (etc)
```
2025-12-22 11:23:08 -05:00
Jörg Thalheim
d85e5dfa60
Merge pull request #14843 from mdaniels5757/document-old-let-expression-syntax
docs: document older let expression syntax
2025-12-21 18:16:01 +00:00
Sergei Zimmerman
96204ea6bd
Merge pull request #14785 from YawKar/master
libstore: include path in the world-writable error
2025-12-21 17:49:24 +00:00
Michael Daniels
c6ac52da70 docs: document older let expression syntax
I learned of this from reading Eelco Dolstra's PhD thesis (pp. 69, 73-74).

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2025-12-21 17:28:16 +00:00
John Ericson
b168ec2277
Merge pull request #14842 from mdaniels5757/docs-add-let-semicolon
docs: add missing semicolon to let-in grammar
2025-12-21 15:43:52 +00:00
Robert Hensing
cc88e1aa82 libflake-c: improve input override error message clarity
Make the C API error message more explicit about what went wrong and
why it's invalid. The new message explains that a zero-length path was
passed and clarifies that it would refer to the flake itself.

Updates the unit test to match the new error message.
2025-12-21 13:08:29 +01:00
John Ericson
f457245a9a
Merge pull request #14844 from corngood/cygwin-cross
packaging: disable LTO on cygwin
2025-12-21 05:30:54 +00:00
David McFarland
ce16d6fdd3 packaging: disable LTO on cygwin
This was already done for windows, and it fails in the same way.
2025-12-20 22:52:44 -04:00
Sergei Zimmerman
b6dd17d6f2
Merge pull request #14841 from mdaniels5757/syntax-doc-fix-link
docs: fix string interpolation links on syntax page
2025-12-20 22:04:14 +00:00
Robert Hensing
b1a230de75 libcmd: improve --override-input error message clarity
Make the error message more explicit about what went wrong and why
it's invalid. The new message explains that a zero-length path was
passed and clarifies that it would refer to the flake itself.
2025-12-20 04:26:20 +01:00
Robert Hensing
bec436c0b1 libflake: reject empty paths in inputUpdates
An empty path refers to the flake itself, not an input. Apply the same
type safety to inputUpdates as inputOverrides.

The deprecated --update-input flag (deprecated since Nix 2.4) and the
modern 'nix flake update' command now properly reject empty paths.

Includes functional tests for both commands.
2025-12-20 04:26:20 +01:00
Robert Hensing
f7fc24c973 libflake: introduce NonEmptyInputAttrPath type
Wraps InputAttrPath with compile-time guarantee of non-emptiness.
Replaces obscure .back() calls with domain-specific inputName() method.

An empty path refers to the flake itself, making it nonsensical for
input override operations. The type system now prevents this.
2025-12-20 04:23:45 +01:00
Robert Hensing
63cfefd6cb libflake-c: reject empty input override paths
An empty attribute path refers to the flake itself, contradicting
the purpose of input overrides, which are for overriding inputs.

Related: #14816
2025-12-20 00:37:11 +01:00
Robert Hensing
fefcc4c7cc libcmd: reject empty --override-input paths
An empty attribute path refers to the flake itself, contradicting
the purpose of --override-input, which is for overriding inputs.

Fixes: #14816
2025-12-20 00:36:42 +01:00
Michael Daniels
a720cb0656
docs: add missing semicolon to let-in grammar 2025-12-19 17:57:48 -05:00
Michael Daniels
32a79fcbbf
docs: fix string interpolation links on syntax page 2025-12-19 17:25:04 -05:00
Sergei Zimmerman
132a93625b
Merge pull request #14827 from Zaczero/zaczero/libexpr
libexpr: add nix-expr-benchmarks, add regex optimizations
2025-12-19 21:24:05 +00:00
John Ericson
5cf1c0ebca
Merge pull request #14837 from NixOS/fix-query-substitutable
libstore/store-api: Do not query all substituters for substitutable p…
2025-12-19 14:00:35 +00:00
Eelco Dolstra
6b52fa8360
Merge pull request #12087 from DeterminateSystems/multithreaded-git-sink
Make GitFileSystemObjectSink multi-threaded
2025-12-19 12:20:22 +00:00
Eelco Dolstra
19a2493132 Fix random missing re-throw 2025-12-19 12:14:29 +01:00
Eelco Dolstra
6bea8e0e08 GitFileSystemObjectSink: Fix crash during interrupt 2025-12-19 12:06:55 +01:00
Sergei Zimmerman
8104858643
libstore/filetransfer: Fix double callback on enqueueFileTransfer that is shutting down 2025-12-19 07:25:18 +03:00
Sergei Zimmerman
a6c1d5637a
libstore/filetransfer: Remove unused using namespace 2025-12-19 05:20:45 +03:00
Sergei Zimmerman
f1f99b6598
Merge pull request #14835 from Zaczero/zaczero/reserve-perf
Fix reserve pitfall in printString
2025-12-19 02:06:07 +00:00
Sergei Zimmerman
2308f200c8
libstore/store-api: Do not query all substituters for substitutable path infos
This was broken in 11d7c80370.
2025-12-19 04:52:53 +03:00