1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-10 20:46:01 +01:00
Commit graph

21542 commits

Author SHA1 Message Date
Sergei Zimmerman
eb3c004972
Merge pull request #13453 from NixOS/mergify/bp/2.30-maintenance/pr-13450 2025-07-11 22:16:10 +03:00
Sergei Zimmerman
382e25405a libexpr: Fix invalid handling of errors for imported functions
c39cc00404 has added assertions for
all Value accesses and the following case has started failing with
an `unreachable`:

(/tmp/fun.nix):

```nix
{a}: a
```

```
$ nix eval --impure --expr 'import /tmp/fun.nix {a="a";b="b";}'
```

This would crash:

```
terminating due to unexpected unrecoverable internal error: Unexpected condition in getStorage at ../include/nix/expr/value.hh:844
```

This is not a regression, but rather surfaces an existing problem, which previously
was left undiagnosed. In the case of an import `fun` is the `import` primOp, so that read is invalid
and previously this resulted in an access into an inactive union member, which is UB.
The correct thing to use is `vCur`. Identical problem also affected the case of a missing argument.

Add previously failing test cases to the functional/lang test suite.

Fixes #13448.

(cherry picked from commit 6e78cc90d3)
2025-07-11 18:26:57 +00:00
Cole Helbling
d1f57c5dae external-derivation-builder: write the json doc into builder's stdin 2025-07-11 10:37:58 -07:00
Eelco Dolstra
c8cab890fa
Merge pull request #13446 from NixOS/mergify/bp/2.30-maintenance/pr-13441
fetchClosure: Fix gcc warning (backport #13441)
2025-07-10 21:11:33 +02:00
Eelco Dolstra
7119d594fc fetchClosure: Fix gcc warning
Fixes:

[261/394] Linking target src/libexpr/libnixexpr.so
In function ‘copy’,
    inlined from ‘__ct ’ at /nix/store/24sdvjs6rfqs69d21gdn437mb3vc0svh-gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/basic_string.h:688:23,
    inlined from ‘operator+’ at /nix/store/24sdvjs6rfqs69d21gdn437mb3vc0svh-gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/basic_string.h:3735:43,
    inlined from ‘operator()’ at ../src/libexpr/primops/fetchClosure.cc:127:58,
    inlined from ‘prim_fetchClosure’ at ../src/libexpr/primops/fetchClosure.cc:132:88:
/nix/store/24sdvjs6rfqs69d21gdn437mb3vc0svh-gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/char_traits.h:427:56: warning: ‘__builtin_memcpy’ writing 74 bytes into a region of size 16 overflows the destination [-Wstringop-overflow=]
  427 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
      |                                                        ^
../src/libexpr/primops/fetchClosure.cc: In function ‘prim_fetchClosure’:
../src/libexpr/primops/fetchClosure.cc:132:88: note: at offset 16 into destination object ‘<anonymous>’ of size 32
  132 |             fromPath = state.coerceToStorePath(attr.pos, *attr.value, context, attrHint());
      |                                                                                        ^

(cherry picked from commit aa18dc54dc)
2025-07-10 18:33:39 +00:00
Graham Christensen
2374da56fc
Merge pull request #140 from DeterminateSystems/release-v3.8.0/5087c9ef-5c71-4e74-ab80-c4344c05847c
Release v3.8.0
2025-07-10 15:48:35 +00:00
Eelco Dolstra
804729b4ec Merge remote-tracking branch 'detsys/detsys-main' into refactor-derivation-builder 2025-07-10 17:31:01 +02:00
Graham Christensen
8f31e84247 Update release notes 2025-07-10 11:27:54 -04:00
github-actions[bot]
c0dfe87d1d
Generate release notes for 3.8.0 2025-07-10 15:11:40 +00:00
github-actions[bot]
a78a2fdea1
Set .version-determinate to 3.8.0 2025-07-10 15:11:35 +00:00
github-actions[bot]
165afeec56
Prepare release v3.8.0 2025-07-10 15:11:32 +00:00
tomberek
f880135ff8
Merge pull request #13439 from NixOS/mergify/bp/2.30-maintenance/pr-13437
lockFlake(): When updating a lock, respect the input's lock file (backport #13437)
2025-07-10 01:03:55 -04:00
Eelco Dolstra
37487eec8e lockFlake(): When updating a lock, respect the input's lock file
(cherry picked from commit 95437b90fc)
2025-07-10 04:29:39 +00:00
Eelco Dolstra
930aabb7f3
Merge pull request #139 from DeterminateSystems/remove-dead
Remove some dead code to minimize the upstream diff
2025-07-09 20:25:49 +00:00
Eelco Dolstra
47081aa94c Remove some dead code to minimize the upstream diff 2025-07-09 22:12:05 +02:00
Cole Helbling
e1d45bb040
Merge pull request #138 from DeterminateSystems/hide-double-copy-warning
Hide double copy warning
2025-07-09 20:06:56 +00:00
Cole Helbling
facfff45d3
Merge pull request #137 from DeterminateSystems/eelcodolstra/cf-65-determinate-nix-implicit-flake-lock-update-dont-update
lockFlake(): When updating a lock, respect the input's lock file
2025-07-09 20:00:02 +00:00
Eelco Dolstra
700ceb2ce1 Hide double copy warning 2025-07-09 21:52:47 +02:00
Eelco Dolstra
668088b876
Merge pull request #134 from DeterminateSystems/nix-flake-check-dont-build
nix flake check: Skip substitutable derivations
2025-07-09 19:07:52 +00:00
Eelco Dolstra
2ecc5156f4 lockFlake(): When updating a lock, respect the input's lock file 2025-07-09 19:04:29 +02:00
Cole Helbling
063837069c
Merge pull request #135 from DeterminateSystems/sync-2.30.0
Sync with upstream 2.30.0
2025-07-09 16:44:44 +00:00
mergify[bot]
ed8f7df56d
Merge pull request #13436 from NixOS/mergify/bp/2.30-maintenance/pr-13435
docker: fix nixConf (backport #13435)
2025-07-09 09:50:14 +00:00
h0nIg
8b0cfaed9b docker: fix nixConf - fmt
(cherry picked from commit 9857c0bb52)
2025-07-09 09:18:28 +00:00
h0nIg
dcc4b7c6fd docker: fix nixConf
(cherry picked from commit 8a1f471b66)
2025-07-09 09:18:27 +00:00
Eelco Dolstra
65b9e019dd
Merge pull request #13430 from NixOS/mergify/bp/2.30-maintenance/pr-13427
installers, tests: remove --preserve=mode from cp invocations (backport #13427)
2025-07-08 18:02:58 +02:00
John Soo
48c7e5e14f installers, tests: remove --preserve=mode from cp invocations
-p preserves xattrs and acls which can be incompatible between
filesystems

Unfortunately keep -p on darwin because the bsd coreutils do not
support --preserve.

Fixes #13426

(cherry picked from commit 87299e466d)
2025-07-08 15:10:41 +00:00
Eelco Dolstra
f7c95fde88 Bump version 2025-07-08 16:14:06 +02:00
Eelco Dolstra
175406c313 Merge remote-tracking branch 'origin/2.30-maintenance' into sync-2.30.0 2025-07-07 19:23:15 +02:00
Eelco Dolstra
812e069302 Mark official release 2025-07-07 17:36:13 +02:00
Eelco Dolstra
ab5fc30d67
Merge pull request #13424 from NixOS/release-notes
Release notes for Nix 2.30.0
2025-07-07 17:22:57 +02:00
Eelco Dolstra
b9b791dd51
Merge pull request #13425 from NixOS/tomberek.update_setuid_test
fix: make setuid tests use new build-dir location /nix/var/nix/builds
2025-07-07 16:50:57 +02:00
Robert Hensing
9f8df6878f doc: Add more links
Mostly in the 2.30 release notes
2025-07-07 16:47:02 +02:00
Eelco Dolstra
58e07c3291 Sort contributors 2025-07-07 16:17:06 +02:00
Thomas Bereknyei
9e7655f440 fix: make setuid tests use new build-dir location /nix/var/nix/builds 2025-07-07 10:13:40 -04:00
Eelco Dolstra
8c71de202f Add link 2025-07-07 15:50:51 +02:00
Eelco Dolstra
a492493d97 Rearrange release notes 2025-07-07 15:10:25 +02:00
Eelco Dolstra
2c0343ec51 # Contributors -> ## Contributors 2025-07-07 15:00:49 +02:00
Eelco Dolstra
f5312492c1 Add manual release notes 2025-07-07 14:53:11 +02:00
Eelco Dolstra
19c4e78d97 Typo 2025-07-07 14:19:57 +02:00
Eelco Dolstra
8a9e625ba5 release notes: 2.30.0 2025-07-07 14:09:18 +02:00
Eelco Dolstra
864ccb6e63
Merge pull request #13356 from SimSaladin/sim/fix-erase-output-paths
fix throwing output paths out of sandbox paths
2025-07-07 12:15:23 +02:00
Robert Hensing
c512fd1a4b
Merge pull request #13420 from NixOS/query-missing
Introduce MissingPaths struct for queryMissing() / printMissing()
2025-07-07 11:48:06 +02:00
Eelco Dolstra
99c20e6c3e
Merge pull request #13328 from h0nIg/patch-3
docker: add docu references & remove duplicate code
2025-07-07 11:31:59 +02:00
Sergei Zimmerman
6bf997e0bd
Merge pull request #13419 from NixOS/fix-indent 2025-07-04 20:27:32 +03:00
Eelco Dolstra
5c9592194c nix flake check: Skip substitutable derivations
Since `nix flake check` doesn't produce a `result` symlink, it doesn't
actually need to build/substitute derivations that are already known
to have succeeded, i.e. that are substitutable.

This can speed up CI jobs in cases where the derivations have already
been built by other jobs. For instance, a command like

  nix flake check github:NixOS/hydra/aa62c7f7db31753f0cde690f8654dd1907fc0ce2

should no longer build anything because the outputs are already in
cache.nixos.org.
2025-07-04 17:07:18 +02:00
Eelco Dolstra
f039f6886a nix-build: Drop unnecessary call to queryMissing()
This is already done by Worker::run().
2025-07-04 16:34:34 +02:00
Eelco Dolstra
5d308ccca5 printMissing(): Take a MissingPaths argument 2025-07-04 16:34:30 +02:00
Eelco Dolstra
af05ce0f6d queryMissing(): Return a struct
...instead of having a bunch of pass-by-reference arguments.
2025-07-04 16:34:24 +02:00
Eelco Dolstra
1df17735f5 nix-build: Drop unnecessary call to queryMissing()
This is already done by Worker::run().
2025-07-04 16:32:37 +02:00
Eelco Dolstra
3a636205c5 printMissing(): Take a MissingPaths argument 2025-07-04 16:27:08 +02:00