1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-24 03:09:35 +01:00
Commit graph

21470 commits

Author SHA1 Message Date
github-actions[bot]
50e9583fb3
Set .version-determinate to 3.5.1 2025-05-09 20:50:21 +00:00
github-actions[bot]
13d712bd75
Prepare release v3.5.1 2025-05-09 20:50:18 +00:00
Graham Christensen
bb8ae358bc
Merge pull request #61 from DeterminateSystems/push-plouvlzynksx
Dispatch release notes with a gh token
2025-05-09 20:10:45 +00:00
Graham Christensen
220fa1e4e4 Split the release notes into another commit 2025-05-09 16:02:22 -04:00
Graham Christensen
619b496317 Fix release notes
* Stop aggressively deleting all the newlines
2025-05-09 15:17:10 -04:00
Graham Christensen
917d617945
Merge pull request #59 from DeterminateSystems/release-v3.5.0/f241ee9e-a92f-4ae3-8f60-23d176b3b2f7
Release v3.5.0
2025-05-09 17:12:00 +00:00
github-actions[bot]
83f92cfd04
Set .version-determinate to 3.5.0 2025-05-09 16:11:48 +00:00
github-actions[bot]
1342041312
Prepare release v3.5.0 2025-05-09 16:11:42 +00:00
Eelco Dolstra
cdbe788c1f
Merge pull request #13155 from Valodim/patch-2
Reduce maxLayers to 70 in docker build
2025-05-09 17:12:38 +02:00
Eelco Dolstra
da953d6d39 Add test 2025-05-09 16:55:13 +02:00
Eelco Dolstra
c686de6505 nix flake prefetch: Remove __final
This is currently an internal attribute, not intended to be shown to
users.

Fixes #13150.
2025-05-09 16:44:48 +02:00
Graham Christensen
290368169e
Merge pull request #58 from DeterminateSystems/improve-build-failure-error
Improve build failure error messages
2025-05-09 14:03:35 +00:00
Eelco Dolstra
d00682beb2 Backward compatibility hack for dealing with dir in URL-style flakerefs 2025-05-09 10:10:42 +02:00
Eelco Dolstra
8014671210 Improve build failure error messages 2025-05-09 00:32:41 +02:00
Eelco Dolstra
7c9d25cf39
Merge pull request #57 from DeterminateSystems/eelcodolstra/fh-800-assess-impact-of-flakelock-url-change-between-nix-versions
Canonicalize flake input URLs before checking flake.lock file staleness, for dealing with `dir` in URL-style flakerefs
2025-05-08 18:18:20 +00:00
Eelco Dolstra
bf1c0072f6 Backward compatibility hack for dealing with dir in URL-style flakerefs 2025-05-08 19:12:43 +02:00
Graham Christensen
7c477772d2
Merge pull request #56 from DeterminateSystems/references-without-context
Improve lazy trees backward compatibility
2025-05-08 16:57:16 +00:00
Graham Christensen
8eee061eb2 Fixup the actions ci yml label check 2025-05-08 12:42:09 -04:00
Eelco Dolstra
508b7a705f
Trigger flake_regressions from a label
Co-authored-by: Graham Christensen <graham@grahamc.com>
2025-05-08 18:12:58 +02:00
Eelco Dolstra
6023688c6c printValueAsJSON(): Don't devirtualize
This is already done by consumers of builtins.toJSON (like
builtins.toFile or builtins.derivation), so we can delay this until
it's actually needed.
2025-05-08 15:33:14 +02:00
Vincent Breitmoser
6d0f174cd9
Reduce maxLayers to 70 in docker build
The nixos/nix docker image is built using `buildLayeredImage`, which spreads the nix store over a configured number of layers. This number was set to create an image with 100 layers. Because there is a limit of (typically) 127 layers in AUFS, this only left 27 layers to build on top. At the same time, nearly half of the created layers were only <100kb in size, many even <10kb, negating the intended advantage in cachability.

This commit moves the tradeoff a bit by reducing the number of layers to 70.

Layer sizes for the 2.28.3 nixos/nix image: https://hub.docker.com/layers/nixos/nix/2.28.3/images/sha256-d078d7153763895fce17c5fbbdeb86fcfcac414ca0ba875d413c1df57be19931
2025-05-08 09:56:14 +02:00
Eelco Dolstra
2bbf755bee Handle FIXMEs 2025-05-07 21:36:13 +02:00
Eelco Dolstra
0f48a152dd Handle derivation 2025-05-07 20:56:41 +02:00
Eelco Dolstra
8739d35529 Fix tests/NixOS/nix/2.18.1 2025-05-07 19:22:14 +02:00
Eelco Dolstra
2a35d8f800 Add a special type of context for the result of toString
When you apply `builtins.toString` to a path value representing a path
in the Nix store (as is the case with flake inputs), historically you
got a string without context (e.g. `/nix/store/...-source`). This is
broken, since it allows you to pass a store path to a
derivation/toFile without a proper store reference. This is especially
a problem with lazy trees, since the store path is a virtual path that
doesn't exist and can be different every time.

For backwards compatibility, and to warn users about this unsafe use
of `toString`, we now keep track of such strings as a special type of
context.
2025-05-07 18:53:39 +02:00
Eelco Dolstra
8c568277fd Run flake-regressions 2025-05-07 18:24:45 +02:00
Eelco Dolstra
df93fa8604
Merge pull request #27 from DeterminateSystems/lazy-trees-v2
Lazy trees v2
2025-05-07 15:03:25 +00:00
Eelco Dolstra
f6ad6291ab nix flake metadata: Show store path if available 2025-05-07 15:56:35 +02:00
Eelco Dolstra
d0a89fa03f Put flake_regressions back in the merge queue 2025-05-07 15:30:13 +02:00
Eelco Dolstra
9bab483196 Improve error message
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2025-05-07 14:07:29 +02:00
Eelco Dolstra
91cde8c79d EvalState::mountInput(): Throw an error if there is a NAR hash mismatch 2025-05-07 14:07:29 +02:00
Eelco Dolstra
630bdff7e9 Re-enable _NIX_TEST_FAIL_ON_LARGE_PATH tests 2025-05-07 12:49:11 +02:00
Sergei Zimmerman
3a1301cd6d
libstore: Use boost::regex for GC root discovery
As it turns out using `std::regex` is actually the bottleneck
for root discovery. Just substituting `std::` -> `boost::`
makes root discovery twice as fast (3x if counting only userspace time).

Some rather ad-hoc measurements to motivate the switch:

(On master)

```
nix build github:nixos/nix/1e822bd4149a8bce1da81ee2ad9404986b07914c#nix-cli --out-link result-1e822bd4149a8bce1da81ee2ad9404986b07914c
taskset -c 2,3 hyperfine "result-1e822bd4149a8bce1da81ee2ad9404986b07914c/bin/nix store gc --dry-run --max 0"
Benchmark 1: result-1e822bd4149a8bce1da81ee2ad9404986b07914c/bin/nix store gc --dry-run --max 0
  Time (mean ± σ):     481.6 ms ±   3.9 ms    [User: 336.2 ms, System: 142.0 ms]
  Range (min … max):   474.6 ms … 487.7 ms    10 runs
```

(After this patch)

```
taskset -c 2,3 hyperfine "result/bin/nix store gc --dry-run --max 0"
Benchmark 1: result/bin/nix store gc --dry-run --max 0
  Time (mean ± σ):     254.7 ms ±   9.7 ms    [User: 111.1 ms, System: 141.3 ms]
  Range (min … max):   246.5 ms … 281.3 ms    10 runs
```

`boost::regex` is a drop-in replacement for `std::regex`, but much faster.
Doing a simple before/after comparison doesn't surface any change in behavior:

```
result/bin/nix store gc --dry-run -vvvvv --max 0 |& grep "got additional" | wc -l
result-1e822bd4149a8bce1da81ee2ad9404986b07914c/bin/nix store gc --dry-run -vvvvv --max 0 |& grep "got additional" | wc -l
```
2025-05-06 21:58:52 +00:00
Graham Christensen
8713cd6b64
Merge pull request #54 from DeterminateSystems/update-flake-lock
Update flake.lock in light of recent change
2025-05-06 20:50:18 +00:00
Graham Christensen
6d2eb418dc
Merge pull request #55 from DeterminateSystems/gustavderdrache/deprecate-upgrade
Deprecate upgrade-nix command
2025-05-06 20:19:29 +00:00
John Ericson
1e822bd414
Merge pull request #13141 from obsidiansystems/fix-windows-warning
Fix windows warning
2025-05-06 15:42:16 -04:00
gustavderdrache
fb01b8c5c9 Nits: formatting 2025-05-06 15:30:33 -04:00
gustavderdrache
d4eb6059c9
Update src/nix/upgrade-nix.cc
Co-authored-by: Graham Christensen <graham@grahamc.com>
2025-05-06 15:11:34 -04:00
gustavderdrache
49da034ecd Deprecate upgrade-nix command 2025-05-06 15:05:34 -04:00
John Ericson
1594d4b879 Fix windows warning 2025-05-06 15:02:10 -04:00
Luc Perkins
5a7555f4aa
Update flake.lock in light of recent change 2025-05-06 15:41:23 -03:00
Eelco Dolstra
6f5cfafe0d Run flake-regressions with --lazy-trees 2025-05-06 19:11:49 +02:00
Eelco Dolstra
577b331464 Merge remote-tracking branch 'detsys/detsys-main' into lazy-trees-v2 2025-05-06 19:09:09 +02:00
Eelco Dolstra
fef193fbc4 Try namespace runner 2025-05-06 18:42:32 +02:00
Eelco Dolstra
5ed4a92e9e
Merge pull request #52 from DeterminateSystems/remove-flake-compat
Remove flake-compat input
2025-05-06 16:30:53 +00:00
Jörg Thalheim
10358c630b
Merge pull request #13139 from NixOS/singleton-pattern
Simplify plugin registrations
2025-05-06 09:31:09 +02:00
Eelco Dolstra
060c34b664 Attempt to fix macOS build 2025-05-06 08:50:14 +02:00
Luc Perkins
32b50f632f
Merge remote-tracking branch 'origin/detsys-main' into remove-flake-compat 2025-05-05 15:03:30 -03:00
Luc Perkins
d9839cc922
Remove flake-compat input 2025-05-05 14:15:20 -03:00
Graham Christensen
ac4db6d96d
Merge pull request #51 from DeterminateSystems/push-rlzmsvkzlzyo
Only run the test step after build completes
2025-05-05 15:30:54 +00:00