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

20425 commits

Author SHA1 Message Date
Robert Hensing
fc03b89ff4 Fix lessThan doc 2025-07-10 17:50:43 +02:00
Eelco Dolstra
ca9f2028b0 Simplify SymbolTable::create() 2025-07-10 12:28:34 +02:00
Eelco Dolstra
74a144ce98 Require Boost 1.81.0 or higher
Note: this version of Boost was released in December 2022.
2025-07-10 11:53:36 +02:00
Eelco Dolstra
aa18dc54dc 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());
      |                                                                                        ^
2025-07-10 11:41:32 +02:00
tomberek
485cbfc7f1
Merge pull request #13437 from NixOS/respect-transitive-locks
lockFlake(): When updating a lock, respect the input's lock file
2025-07-10 00:28:55 -04:00
Sergei Zimmerman
b19e9acc03
Merge pull request #13402 from DavHau/build-cores
build-cores: detect cores automatically if set to 0
2025-07-09 23:06:55 +03:00
Eelco Dolstra
95437b90fc lockFlake(): When updating a lock, respect the input's lock file 2025-07-09 19:19:15 +02:00
Eelco Dolstra
3cfecd9a80
Merge pull request #13435 from h0nIg/patch-4
docker: fix nixConf
2025-07-09 11:16:55 +02:00
h0nIg
9857c0bb52
docker: fix nixConf - fmt 2025-07-09 09:34:50 +02:00
h0nIg
8a1f471b66
docker: fix nixConf 2025-07-09 09:30:11 +02:00
John Ericson
7caac53ae4
Merge pull request #13433 from ConnorBaker/patch-1
globals.hh: fix broken link to nspawn example
2025-07-08 16:43:40 -04:00
Connor Baker
a16491375a
globals.hh: fix broken link to nspawn example
The substitution included the `.` at the end of the URL, breaking it.
2025-07-08 12:59:16 -07:00
Eelco Dolstra
98a883b51a
Merge pull request #13427 from jsoo1/remove-p
installers, tests: remove --preserve=mode from cp invocations
2025-07-08 17:09:42 +02:00
Eelco Dolstra
6d0194b17f
Merge pull request #13429 from NixOS/bump-2.31.0
Bump version to 2.31.0
2025-07-08 17:03:02 +02:00
Eelco Dolstra
06665e27f4 Update .mergify.yml 2025-07-08 16:18:53 +02:00
Eelco Dolstra
4fa99d743e release-process.md: Remove unnecessary step 2025-07-08 16:15:45 +02:00
Eelco Dolstra
723903da3c Bump version 2025-07-08 16:14:50 +02:00
John Soo
87299e466d 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
2025-07-07 15:34:18 -06:00
John Ericson
cf0df2607d
Merge pull request #13240 from obsidiansystems/dyn-drv-take-3
Get rid of `addWantedOutputs`
2025-07-07 11:39:45 -04: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
7781560724 libstore-tests: Fix impurity trying to access the Nix daemon
This failed on macOS:

  nix-store-tests-run> C++ exception with description "../nix_api_store.cc:33: nix_err_code(ctx) != NIX_OK, message: error: getting status of '/nix/var/nix/daemon-socket/socket': Operation not permitted" thrown in the test body.
2025-07-07 11:42:20 +02:00
Eelco Dolstra
2059f72d02 Fix test 2025-07-07 11:32:33 +02:00
Eelco Dolstra
5b23885216 Show which PID is causing a temp root
Example:

  error: Cannot delete path '/nix/store/klyng5rpdkwi5kbxkncy4gjwb490dlhb-foo.drv' because it's in use by Nix process '{nix-process:3605324}'.
2025-07-07 11:32:33 +02:00
Eelco Dolstra
774c4ba740 Don't censor root info for trusted users 2025-07-07 11:32:33 +02:00
Eelco Dolstra
59700c0978 nix store delete: Show the first root that prevents deletion
Examples:

  error: Cannot delete path '/nix/store/6fcrjgfjip2ww3sx51rrmmghfsf60jvi-patchelf-0.14.3' because it's referenced by the GC root '/home/eelco/Dev/nix-master/build/result'.

  error: Cannot delete path '/nix/store/rn0qyn3kmky26xgpr2n10vr787g57lff-cowsay-3.8.4' because it's referenced by the GC root '/proc/3600568/environ'.
2025-07-07 11:32:33 +02:00
Eelco Dolstra
1929d84f9e nix store delete: Give a more specific error message 2025-07-07 11:32:33 +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
Eelco Dolstra
f29acd5bbc Use writableTmpDirAsHomeHook 2025-07-07 11:12:55 +02:00
Eelco Dolstra
01388b3e78 Give unit tests access to a $HOME directory
Also, don't try to access cache.nixos.org in the libstore unit tests.
2025-07-07 11:02:51 +02:00
DavHau
fb5e22e318 build-cores: detect cores automatically if set to 0
This changes makes nix detect a machines available cores automatically whenever build-cores is set to 0.

So far, nix simply passed NIX_BUILD_CORES=0 whenever build-cores is set to 0. (only when build-cores is unset it was detecting cores automatically)

The behavior of passing NIX_BUILD_CORES=0 leads to a performance penalty when sourcing nixpkgs' generic builder's `setup.sh`, as setup.sh has to execute `nproc`. This significantly slows down sourcing of setup.sh
2025-07-07 10:33:42 +07:00
Sergei Zimmerman
6bf997e0bd
Merge pull request #13419 from NixOS/fix-indent 2025-07-04 20:27:32 +03: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
eb97d8c170 Fix indentation of "Unable to start any build" error message
The use of R"(...)" added a bunch of unnecessary whitespace, e.g.

  error:
                             Unable to start any build;
                             either increase '--max-jobs' or enable remote builds.

                             For more information run 'man nix.conf' and search for '/machines'.

Now we get

  error: Unable to start any build; either increase '--max-jobs' or enable remote builds.

         For more information run 'man nix.conf' and search for '/machines'.
2025-07-04 15:21:31 +02:00
Eelco Dolstra
d4f67fd46d
Merge pull request #13369 from NixOS/null-revision-not-locked
Git fetcher: Do not consider a null revision (i.e. workdir) to be locked
2025-07-03 19:56:21 +02:00
Robert Hensing
c79b8018c0
Merge pull request #13407 from xokdvium/smaller-value
libexpr: Reduce the size of Value down to 16 bytes (on 64 bit systems)
2025-07-03 00:12:47 +02:00
Sergei Zimmerman
5a20a48f13
libexpr: Reduce the size of Value down to 16 bytes
This shaves off a very significand amount of memory used
for evaluation as well as reduces the GC-managed heap.

Previously the union discriminator (InternalType) was
stored as a separate field in the Value, which takes up
whole 8 bytes due to padding needed for member alignment.
This effectively wasted 7 whole bytes of memory. Instead
of doing that InternalType is instead packed into pointer
alignment niches. As it turns out, there's more than enough
unused bits there for the bit packing to be effective.

See the doxygen comment in the ValueStorage specialization
for more details.

This does not add any performance overhead, even though
we now consistently assert the InternalType in all getters.

This can also be made atomic with a double width compare-and-swap
instruction on x86_64 (CMPXCHG16B instruction) for parallel evaluation.
2025-07-02 22:27:37 +03:00