1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-03 23:51:00 +01:00
Commit graph

20833 commits

Author SHA1 Message Date
Robert Hensing
f3cf58e469 maint: Remove mdbook-linkcheck and support mdbook 0.5.x
Fixes #14628

- Remove mdbook-linkcheck dependency and configuration (was blocking
  upgrades to mdbook 0.5.0+, configured with warning-policy = "ignore"
  due to false positives, and redundant with lychee-based link checking)
- Update substitute.py and anchors.jq to handle 'items' (mdbook 0.5.x)
  in addition to 'sections' (mdbook 0.4.x), as per mdbook 0.5.0
  changelog: "Book::sections was renamed to Book::items"
  https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#05-migration-guide

(cherry picked from commit 2636f50dd4)
2025-12-02 14:06:21 +00:00
internal-nix-ci[bot]
315010c447
Merge pull request #14679 from NixOS/backport-14676-to-2.31-maintenance
[Backport 2.31-maintenance] libstore: Use makeTempPath in optimizePath_, assorted fs fixes
2025-12-01 03:23:00 +00:00
Sergei Zimmerman
f67bdae6a6 libutil: Make AutoDelete non-copyable and non-movable
This is a good precaution, since we don't want to delete
directories twice accidentally.

(cherry picked from commit 40e3f5c0a4)
2025-12-01 02:48:04 +00:00
Sergei Zimmerman
3c01ff3148 libutil: Propagate error code in createSymlink
(cherry picked from commit bf7c53f2d3)
2025-12-01 02:48:03 +00:00
Sergei Zimmerman
f5473c9624 libstore: Actually correctly call remove in case rename fails
(cherry picked from commit 1cc337bb5f)
2025-12-01 02:48:03 +00:00
Sergei Zimmerman
22c69f47b8 libstore: Use makeTempPath in optimizePath_
This was intended to be cherry-picked in 6aed9d877c,
but was left hanging. This is actually important for fixing [^]. emilazy let me know
of this bad cherry-pick and its significance.

[^]: https://github.com/NixOS/nix/issues/7273

Originally fixed by Lily Ballard <lily@ballards.net> in https://gerrit.lix.systems/c/lix/+/2100.

(cherry picked from commit d888846b68)
2025-12-01 02:48:03 +00:00
internal-nix-ci[bot]
eee5c6ee72
Merge pull request #14533 from NixOS/backport-14531-to-2.31-maintenance
[Backport 2.31-maintenance] Restore isAllowed check in ChrootLinuxDerivationBuilder
2025-11-10 20:44:23 +00:00
Sergei Zimmerman
b3e3be1e64 Restore isAllowed check in ChrootLinuxDerivationBuilder
This early return was lost in d4ef822add.

By doing some
https://en.wikipedia.org/wiki/Non-virtual_interface_pattern, we can
ensure that we don't make this mistake again --- implementations are no
longer responsible for implementing the caching/memoization mechanism.

(cherry picked from commit 496e43ec72)
2025-11-10 20:15:46 +00:00
John Ericson
5d14e91245
Merge pull request #14519 from NixOS/backport-14137-to-2.31-maintenance
[Backport 2.31-maintenance] fix(libstore/build/derivation-goal): don't assert on partially valid outputs
2025-11-09 14:29:14 -05:00
internal-nix-ci[bot]
1e92560665
Merge pull request #14523 from NixOS/backport-14515-to-2.31-maintenance
[Backport 2.31-maintenance] libexpr: Don't use nix::dirOf in prim_dirOf (fix 2.23 regression)
2025-11-09 18:07:05 +00:00
Sergei Zimmerman
3032fdbbe5 libexpr: Don't use nix::dirOf in prim_dirOf
This gets us back to pre-2.23 behavior of this primop.
Done by inlining the code of `nix::dirOf` from 2.2-maintenance.

(cherry picked from commit a33fccf55a)
2025-11-09 17:43:01 +00:00
Sergei Zimmerman
f6702e94fa tests/functional: Add tests for builtins.dirOf
These will change in the next commit to fix the silent regression from 2.23
in the handling of multiple subsequent path separators.

(cherry picked from commit 86f090837b)
2025-11-09 17:43:01 +00:00
Bernardo Meurer Costa
795d7bb591 fix(libstore/build/derivation-goal): don't assert on partially valid outputs
Fixes: #14130
(cherry picked from commit 9eecee3d4e)
2025-11-09 12:24:50 -05:00
Eelco Dolstra
7358e50193 Revert "Merge pull request #14381 from NixOS/backport-14364-to-2.31-maintenance"
This reverts commit 264cc2e2b2, reversing
changes made to 3cca112d79.
2025-11-06 22:12:13 +01:00
internal-nix-ci[bot]
d32b580243
Merge pull request #14497 from NixOS/backport-14491-to-2.31-maintenance
[Backport 2.31-maintenance] Don't crash on flakerefs containing newlines
2025-11-06 19:43:07 +00:00
Eelco Dolstra
fe711b2f4c Don't crash on flakerefs containing newlines
Fixes #14311.

(cherry picked from commit c1317017e9)
2025-11-06 19:18:12 +00:00
internal-nix-ci[bot]
bb375a0bcc
Merge pull request #14460 from NixOS/backport-14450-to-2.31-maintenance
[Backport 2.31-maintenance] flake: Update, nixos-25.05-small -> nixos-25.05
2025-11-03 17:42:15 +00:00
Robert Hensing
c3e5510622 Apply updated nixfmt
(cherry picked from commit 81a2809a52)
2025-11-03 17:08:27 +00:00
Robert Hensing
72a4832b66 flake: Update, nixos-25.05-small -> nixos-25.05
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/d98ce345cdab58477ca61855540999c86577d19d?narHash=sha256-O2CIn7HjZwEGqBrwu9EU76zlmA5dbmna7jL1XUmAId8%3D' (2025-08-26)
  → 'github:NixOS/nixpkgs/daf6dc47aa4b44791372d6139ab7b25269184d55?narHash=sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8%2BON/0Yy8%2Ba5vsDU%3D' (2025-10-27)

(cherry picked from commit 233bd250d1)
2025-11-03 17:08:27 +00:00
internal-nix-ci[bot]
ce97fa9f05
Merge pull request #14437 from NixOS/backport-14434-to-2.31-maintenance
[Backport 2.31-maintenance] libstore: Improve store-reference back-compat with IPv6 ZoneId literals
2025-11-01 00:17:48 +00:00
Sergei Zimmerman
43f7704edc libstore: Improve store-reference back-compat with IPv6 ZoneId literals
This restores the pre-2.31 handling of ZoneID identifiers in store references.
It's the only place we reasonably care about this back-compat.

(cherry picked from commit 8dbc2475f7)
2025-10-31 23:50:19 +00:00
Sergei Zimmerman
60e906a535
Merge pull request #14433 from jonhermansen/backport-14134-to-2.31-maintenance 2025-11-01 00:57:54 +03:00
Jami Kettunen
9259a07e23 libstore: Include missing header to fix compile with libc++ 20
https://en.cppreference.com/w/cpp/thread.html

src/libstore/gc.cc:121:39: error: no member named 'sleep_for' in namespace 'std::this_thread'
  121 |                     std::this_thread::sleep_for(std::chrono::milliseconds(100));
      |                     ~~~~~~~~~~~~~~~~~~^

(cherry picked from commit 140b08ae3e)
2025-10-31 17:20:52 -04:00
internal-nix-ci[bot]
264cc2e2b2
Merge pull request #14381 from NixOS/backport-14364-to-2.31-maintenance
[Backport 2.31-maintenance] diff-closures: print sizes with dynamic unit
2025-10-27 20:37:15 +00:00
Marcel
6275de367f treewide: replace manual MiB calculations with renderSize
(cherry picked from commit 584a8e8a00)
2025-10-27 19:43:37 +00:00
Marcel
0c6585707a refactor(libutil): remove showBytes() in favor of renderSize()
The `showBytes()` function was redundant with `renderSize()` as the
latter automatically selects the appropriate unit (KiB, MiB, GiB, etc.)
based on the value, whereas `showBytes()` always formatted as MiB
regardless of size.

Co-authored-by: Bernardo Meurer Costa <beme@anthropic.com>
(cherry picked from commit f234633e27)
2025-10-27 19:43:37 +00:00
Marcel
1a22674806 diff-closures: print sizes with dynamic unit
(cherry picked from commit 9d4d10954a)
2025-10-27 19:43:37 +00:00
internal-nix-ci[bot]
3cca112d79
Merge pull request #14353 from NixOS/backport-14343-to-2.31-maintenance
[Backport 2.31-maintenance] Revert "libmain: Catch logger exceptions in `handleExceptions`"
2025-10-24 23:59:16 +00:00
Sergei Zimmerman
993a58e2f6 Revert "libmain: Catch logger exceptions in handleExceptions"
This reverts commit 90d1ff4805.

The initial issue with EPIPE was solved in 9f680874c5.
Now this patch does move bad than good by eating up boost::io::format_error that are
bugs.

(cherry picked from commit 4f5af471fb)
2025-10-24 23:28:48 +00:00
internal-nix-ci[bot]
61f09a36f8
Merge pull request #14258 from NixOS/backport-14253-to-2.31-maintenance
[Backport 2.31-maintenance] libfetchers/git-utils: Be more correct about validating refnames
2025-10-15 20:33:35 +00:00
Sergei Zimmerman
1e5a389a2f libfetchers/git-utils: Be more correct about validating refnames
Turns out there's a much better API for this that doesn't have the
footguns of the previous method.

isLegalRefName is somewhat of a misnomer, since it's mainly used to
validate user inputs that can be either references, branch names,
psedorefs or tags.

(cherry picked from commit 5d1178b817)
2025-10-15 20:08:39 +00:00
internal-nix-ci[bot]
71fe367e8c
Merge pull request #14248 from NixOS/backport-13976-to-2.31-maintenance
[Backport 2.31-maintenance] packaging: Drop legacy apple sdk pattern
2025-10-14 21:35:37 +00:00
Sergei Zimmerman
421f650bb1 packaging: Drop legacy apple sdk pattern
This has been dropped on unstable an nix no longer
compiled with overridden nixpkgs input. On 25.05 these
overrides already do nothing.

Tested with:

nix build .#packages.x86_64-darwin.nix-cli -L --override-input nixpkgs https://releases.nixos.org/nixos/unstable/nixos-25.11pre859555.ab0f3607a6c7/nixexprs.tar.xz

Default deployment target on 25.05 is 11.3, so 10.13
sdk override doesn't have to be updated at all as evident
from the fact that we didn't observe any issues with it.

(cherry picked from commit 20b532eab0)
2025-10-14 21:15:28 +00:00
John Ericson
dc87ed5eab
Merge pull request #14240 from NixOS/2.31-maintenance-backport-13975
Fix hash error message
2025-10-13 18:07:16 -04:00
John Ericson
56751b1cd2
Fix hash error message
Wrong number of arguments was causing a format assertion.

(cherry picked from commit c6d06ce486)
2025-10-14 00:30:26 +03:00
internal-nix-ci[bot]
a042b379fa
Merge pull request #14211 from NixOS/backport-14210-to-2.31-maintenance
[Backport 2.31-maintenance] libstore: Fix double-quoting of paths in logs
2025-10-10 23:27:12 +00:00
Sergei Zimmerman
ba38e59304 libstore: Fix double-quoting of paths in logs
std::filesystem::path is already quoted by boost::format with double quotes (").
(cherry picked from commit f30cb8667b)
2025-10-10 22:54:18 +00:00
internal-nix-ci[bot]
f9f2f49252
Merge pull request #14195 from NixOS/backport-14189-to-2.31-maintenance
[Backport 2.31-maintenance] exportReferencesGraph: Handle heterogeneous arrays
2025-10-08 23:43:23 +00:00
Eelco Dolstra
2bfc564297 exportReferencesGraph: Handle heterogeneous arrays
This barfed with

   error: [json.exception.type_error.302] type must be string, but is array

on `nix build github:malt3/bazel-env#bazel-env` because it has a `exportReferencesGraph` with a value like `["string",...["string"]]`.

(cherry picked from commit 94f410b628)
2025-10-08 23:13:05 +00:00
internal-nix-ci[bot]
3019db2c87
Merge pull request #14192 from NixOS/backport-13861-to-2.31-maintenance
[Backport 2.31-maintenance] libutil: Try to call std::terminate for panic, use C++20 std::source_location
2025-10-08 20:46:42 +00:00
Sergei Zimmerman
c750f0f630 libutil: Use std::source_location for unreachable
Make unreachable a function instead of a macro, since
C++20 provides a convenience class as a replacement for
older __FILE__, __LINE__ macros.

(cherry picked from commit d59b959c87)
2025-10-08 20:05:50 +00:00
Sergei Zimmerman
a732f0354d libutil: Try to call std::terminate for panic
We now have a terminate handler that prints a
stack trace, which is useful to have when encountering
an unreachable.

(cherry picked from commit 1f607b5def)
2025-10-08 20:05:50 +00:00
internal-nix-ci[bot]
885499ace5
Merge pull request #14183 from NixOS/backport-14156-to-2.31-maintenance
[Backport 2.31-maintenance] treewide: Squash some user-after-free bugs
2025-10-08 00:28:23 +00:00
internal-nix-ci[bot]
e4e41a17e6
Merge pull request #14185 from NixOS/backport-14086-to-2.31-maintenance
[Backport 2.31-maintenance] nix-cli: use pure/restricted eval for help pages
2025-10-08 00:20:41 +00:00
Seth Flynn
451f483ef0 nix-cli: use pure/restricted eval for help pages
This avoids any complications that can arise from the environment
affecting evaluation of the help pages (which don't need to be calling
out to anything external anyways)

A recent example of one of these problems is
https://github.com/NixOS/nix/issues/14085, which would break help pages
by causing them to make invalid calls to the dummy store they're
evaluated with

Fixes: https://github.com/NixOS/nix/issues/14062
Co-authored-by: Sergei Zimmerman <sergei@zimmerman.foo>
(cherry picked from commit ff82de86da)
2025-10-08 00:06:03 +00:00
Sergei Zimmerman
fa8230167d libexpr: Use use-after-move in SampleStack::saveProfile()
(cherry picked from commit be1ade7373)
2025-10-08 00:03:50 +00:00
Sergei Zimmerman
d1cec3d3ed libstore: Fix use-after-move in DerivationGoal::repairClosure
(cherry picked from commit 452ec09fe0)
2025-10-08 00:03:50 +00:00
internal-nix-ci[bot]
66f6ad1292
Merge pull request #14179 from NixOS/backport-14154-to-2.31-maintenance
[Backport 2.31-maintenance] treewide: Remove toView() because it leads to segfaults when compiled…
2025-10-07 22:15:04 +00:00
internal-nix-ci[bot]
e8574843f1
Merge pull request #14178 from NixOS/backport-14150-to-2.31-maintenance
[Backport 2.31-maintenance] libstore: fixup fakeSSH check
2025-10-07 22:12:56 +00:00
internal-nix-ci[bot]
404bc1d93c
Merge pull request #14177 from NixOS/backport-14168-to-2.31-maintenance
[Backport 2.31-maintenance] libutil: Throw if `str("contents")` not found
2025-10-07 22:09:54 +00:00