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

19842 commits

Author SHA1 Message Date
Eelco Dolstra
14a67e7f34 Don't crash on flakerefs containing newlines
Fixes #14311.

(cherry picked from commit c1317017e9)
2025-11-06 19:18:00 +00:00
John Ericson
f0620e0e77
Merge pull request #14043 from NixOS/mergify/bp/2.28-maintenance/pr-13929
Remove unused function setChildSignalMask() (backport #13929)
2025-09-22 13:36:51 -04:00
Eelco Dolstra
5ca64ebe73 Remove unused function setChildSignalMask()
(cherry picked from commit a44dcbff13)
2025-09-22 16:30:55 +00:00
mergify[bot]
6ac93c92c2
Merge pull request #13920 from NixOS/mergify/bp/2.28-maintenance/pr-13901
Fix macOS HUP detection using kqueue instead of poll (backport #13901)
2025-09-06 08:02:51 +00:00
Jörg Thalheim
d2483b1add Fix macOS HUP detection using kqueue instead of poll
On macOS, poll() is fundamentally broken for HUP detection. It loses event
subscriptions when EVFILT_READ fires without matching the requested events
in the pollfd. This causes daemon processes to linger after client disconnect.

This commit replaces poll() with kqueue on macOS, which is what poll()
uses internally but without the bugs. The kqueue implementation uses
EVFILT_READ which works for both sockets and pipes, avoiding EVFILT_SOCK
which only works for sockets.

On Linux and other platforms, we continue using poll() with the standard
POSIX behavior where POLLHUP is always reported regardless of requested events.

Based on work from the Lix project (https://git.lix.systems/lix-project/lix)
commit 69ba3c92db3ecca468bcd5ff7849fa8e8e0fc6c0

Fixes: https://github.com/NixOS/nix/issues/13847
Related: https://git.lix.systems/lix-project/lix/issues/729
Apple bugs: rdar://37537852 (poll), FB17447257 (poll)

Co-authored-by: Jade Lovelace <jadel@mercury.com>
(cherry picked from commit 1286d5db78)
2025-09-06 07:21:42 +00:00
Eelco Dolstra
a6b901b3d7 Bump version 2025-09-01 18:11:52 +02:00
Sergei Zimmerman
fefd97fba8
Merge pull request #13868 from NixOS/mergify/bp/2.28-maintenance/pr-13867
nix/develop: Fix misleading ignored error when run with --arg/--argstr (backport #13867)
2025-08-30 01:04:50 +03:00
Sergei Zimmerman
7762b7d629 nix/develop: Fix misleading ignored error when run with --arg/--argstr
This would print erroneous and misleading diagnostics like:

> error (ignored): error: '--arg' and '--argstr' are incompatible with flakes

When run with --expr/--file. Since this installable is used to get the
bash package it doesn't make sense to check this.

(cherry picked from commit b6f98b52a4)
2025-08-29 21:18:40 +00:00
Jörg Thalheim
75e6c8dc90
Merge pull request #13745 from NixOS/mergify/bp/2.28-maintenance/pr-13741
libexpr: Canonicalize TOML timestamps for toml11 > 4.0 (backport #13741)
2025-08-29 07:36:32 +02:00
mergify[bot]
2f63896e01
Merge pull request #13840 from NixOS/mergify/bp/2.28-maintenance/pr-13837
flake: Update nixpkgs (backport #13837)
2025-08-27 08:21:34 +00:00
Sergei Zimmerman
c848e58683 flake: Update nixpkgs
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/cd32a774ac52caaa03bcfc9e7591ac8c18617ced?narHash=sha256-VtMQg02B3kt1oejwwrGn50U9Xbjgzfbb5TV5Wtx8dKI%3D' (2025-08-17)
  → 'github:NixOS/nixpkgs/d98ce345cdab58477ca61855540999c86577d19d?narHash=sha256-O2CIn7HjZwEGqBrwu9EU76zlmA5dbmna7jL1XUmAId8%3D' (2025-08-26)

This update contains d1266642a8722f2a05e311fa151c1413d2b9653c, which
is necessary for the TOML timestamps to get tested via nixpkgsLibTests job.

(cherry picked from commit 625477a7df)
2025-08-27 07:52:40 +00:00
Sergei Zimmerman
8049b297ce
Merge pull request #13794 from NixOS/mergify/bp/2.28-maintenance/pr-13202
Fix nix-copy-closure VM test (backport #13202)
2025-08-19 17:00:38 +03:00
Eelco Dolstra
834bf0d029 Fix nix-copy-closure VM test
https://hydra.nixos.org/build/297112538
(cherry picked from commit d626348f42)
2025-08-19 13:33:49 +00:00
Sergei Zimmerman
552ecdaee2
libexpr: Canonicalize TOML timestamps for toml11 > 4.0
This addresses several changes from toml11 4.0 bump in
nixpkgs [1].

1. Added more regression tests for timestamp formats.
   Special attention needs to be paid to the precision
   of the subsecond range for local-time. Prior versions select the closest
   (upwards) multiple of 3 with a hard cap of 9 digits.

2. Normalize local datetime and offset datetime to always
   use the uppercase separator `T`. This is actually the issue
   surfaced in [2]. This canonicalization is basically a requirement
   by (a certain reading) of rfc3339 section 5.6 [3].

3. If using toml11 >= 4.0 also keep the old behavior wrt
   to the number of digits used for subsecond part of the local-time.
   Newer versions cap it at 6 digits unconditionally.

[1]: https://www.github.com/NixOS/nixpkgs/pull/331649
[2]: https://www.github.com/NixOS/nix/issues/11441
[3]: https://datatracker.ietf.org/doc/html/rfc3339

(cherry picked from commit dc769d72cb)
2025-08-19 00:14:35 +03:00
Sergei Zimmerman
0e8f6b1308
libexpr: Use table.size() instead of unnecessary loop
(cherry picked from commit d8fc55a46e)
2025-08-19 00:14:34 +03:00
Sergei Zimmerman
1b8acb5694
libexpr: Use recursive lambda instead of std::function
There's no reason to use a std::function for recursive lambdas
since there are polymorphic lambdas.

(cherry picked from commit a80a5c4dba)
2025-08-19 00:14:33 +03:00
Sergei Zimmerman
05c7da24cc
libexpr: Remove extra trailing semicolons (NFC)
This looks really weird after the reformat.

(cherry picked from commit df4e55ffc1)
2025-08-19 00:14:32 +03:00
Sergei Zimmerman
73201a6144
tests/functional/lang: Add more tests for TOML timestamps
Current test suite doesn't cover the subsecond formatting at
all and toml11 is quite finicky with that. We should at the very
least test its behavior to avoid silent breakages on updates.

(cherry picked from commit 7ed0229d1a)
2025-08-19 00:14:31 +03:00
John Ericson
265e535650
Merge pull request #13786 from NixOS/mergify/bp/2.28-maintenance/pr-13785
flake: nixpkgs: nixos-unstable -> nixos-25.05-small (backport #13785)
2025-08-18 16:57:02 -04:00
Sergei Zimmerman
25b653559b
hydra: Fix otherNixes.nix_2_18 2025-08-18 22:20:59 +03:00
Sergei Zimmerman
1a4dbd9fa1
hydra: Fix otherNixes.nix_2_3
25.05 has it marked as insecure, but we don't care about it
for testing purposes.

(cherry picked from commit 051290b155)
2025-08-18 22:14:52 +03:00
Robert Hensing
b728740ea5
tests/nixos: Work around network-online.target inactivity
(cherry picked from commit 58b657b976)
2025-08-18 22:13:01 +03:00
Sergei Zimmerman
31005f2236
git-blame-ignore-revs: Add nixfmt 1.0.0, clang-format 19 reformats 2025-08-18 21:26:20 +03:00
Sergei Zimmerman
945d9d7264
treewide: Apply clang-format
Nixpkgs bump in the flake bumps clang-format, so we now have a diff
compared to what was used to format the codebase previously. We should
have made sure that the nixpkgs input is the same in the first place.
2025-08-18 21:20:40 +03:00
Sergei Zimmerman
448bbbe0fd
flake: Apply nixfmt 1.0.0 2025-08-18 21:17:24 +03:00
Sergei Zimmerman
2c57edd677
flake: nixpkgs: nixos-unstable -> nixos-25.05-small
About time we upgraded our nixpkgs flake input. Ideally
we'd have automation to do this.

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/adaa24fbf46737f3f1b5497bf64bae750f82942e?narHash=sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY%3D' (2025-05-13)
  → 'github:NixOS/nixpkgs/cd32a774ac52caaa03bcfc9e7591ac8c18617ced?narHash=sha256-VtMQg02B3kt1oejwwrGn50U9Xbjgzfbb5TV5Wtx8dKI%3D' (2025-08-17)

(cherry picked from commit fc33681583)
2025-08-18 21:12:30 +03:00
Jörg Thalheim
2939ee0ada
Merge pull request #13584 from NixOS/mergify/bp/2.28-maintenance/pr-13228
libutil-tests/json-utils: fix -Werror=sign-compare error (backport #13228)
2025-08-05 21:11:03 +02:00
Sergei Zimmerman
49062664ed
Merge pull request #13677 from NixOS/mergify/bp/2.28-maintenance/pr-13248
libmain: Catch logger exceptions in `handleExceptions` (backport #13248)
2025-08-03 00:10:24 +03:00
Sergei Zimmerman
9656003292 libmain: Catch logger exceptions in handleExceptions
Avoid std::terminate in case logging code also
throws.

(cherry picked from commit 90d1ff4805)
2025-08-02 19:51:31 +00:00
mergify[bot]
b96f21441d
Merge pull request #13598 from NixOS/mergify/bp/2.28-maintenance/pr-13275
Remove propagated-build-inputs when static (backport #13275)
2025-07-31 03:25:58 +00:00
mergify[bot]
a24fddb779
Merge pull request #13636 from NixOS/mergify/bp/2.28-maintenance/pr-13368
libstore: fix race condition when creating state directories (backport #13368)
2025-07-31 03:10:04 +00:00
mergify[bot]
2b4e25b49d
Merge pull request #13627 from NixOS/mergify/bp/2.28-maintenance/pr-13351
docker: make sure `nix config check` works (backport #13351)
2025-07-31 03:10:01 +00:00
mergify[bot]
b13a119a79
Merge pull request #13632 from NixOS/mergify/bp/2.28-maintenance/pr-13360
libexpr: Remove non-const overload of `listElems` (backport #13360)
2025-07-31 03:09:59 +00:00
mergify[bot]
99343a66af
Merge pull request #13604 from NixOS/mergify/bp/2.28-maintenance/pr-13282
tests/functional: Add more language tests for `builtins.match` (backport #13282)
2025-07-31 03:09:56 +00:00
mergify[bot]
9956c97ed9
Merge pull request #13601 from NixOS/mergify/bp/2.28-maintenance/pr-13277
nix flake archive: add --no-check-sigs option (backport #13277)
2025-07-31 03:09:54 +00:00
mergify[bot]
7ad7c662bb
Merge pull request #13649 from NixOS/mergify/bp/2.28-maintenance/pr-13395
libstore-tests: Don't leak memory in tests (backport #13395)
2025-07-31 03:09:51 +00:00
mergify[bot]
63c66c04be
Merge pull request #13581 from NixOS/mergify/bp/2.28-maintenance/pr-13213
docs: fix duplicate anchor (backport #13213)
2025-07-31 03:09:47 +00:00
mergify[bot]
2402aa219f
Merge pull request #13617 from NixOS/mergify/bp/2.28-maintenance/pr-13321
Modify docker.nix to use mapAttrsToList instead of mapAttrsFlatten (backport #13321)
2025-07-31 03:09:45 +00:00
mergify[bot]
e73d16377a
Merge pull request #13625 from NixOS/mergify/bp/2.28-maintenance/pr-13347
Fix broken link in configuration description (backport #13347)
2025-07-31 03:09:42 +00:00
mergify[bot]
84f27a1329
Merge pull request #13645 from NixOS/mergify/bp/2.28-maintenance/pr-13382
Update docs (backport #13382)
2025-07-31 03:09:40 +00:00
mergify[bot]
5bd259b311
Merge pull request #13611 from NixOS/mergify/bp/2.28-maintenance/pr-13305
add documentation of tarball-ttl to nix-channel (backport #13305)
2025-07-31 02:59:37 +00:00
mergify[bot]
35e563b6bd
Merge pull request #13634 from NixOS/mergify/bp/2.28-maintenance/pr-13361
Fix a minor typo (backport #13361)
2025-07-31 02:59:35 +00:00
mergify[bot]
ec920aea61
Merge pull request #13647 from NixOS/mergify/bp/2.28-maintenance/pr-13393
Fix typo: remove an extra word (backport #13393)
2025-07-31 02:59:32 +00:00
mergify[bot]
86ffcbcbfe
Merge pull request #13593 from NixOS/mergify/bp/2.28-maintenance/pr-13253
export/meson: Don't require `-std=c++2a` for -c libraries in `.pc` files (backport #13253)
2025-07-31 02:59:29 +00:00
mergify[bot]
8450dee5a2
Merge pull request #13609 from NixOS/mergify/bp/2.28-maintenance/pr-13304
Fix overriding gtest with gmock (backport #13304)
2025-07-31 02:59:27 +00:00
mergify[bot]
cae5086c60
Merge pull request #13619 from NixOS/mergify/bp/2.28-maintenance/pr-13326
docker.nix: Prevent double copy of nixpkgs source tree (backport #13326)
2025-07-30 19:32:18 +00:00
mergify[bot]
b2a2cf6934
Merge pull request #13585 from NixOS/mergify/bp/2.28-maintenance/pr-13232
docs: add another equivalence for the implication operator (backport #13232)
2025-07-30 19:32:14 +00:00
mergify[bot]
e261cc8f0d
Merge pull request #13591 from NixOS/mergify/bp/2.28-maintenance/pr-13245
nix-profile{,-daemon}.fish: check for profile in XDG_DATA_HOME (backport #13245)
2025-07-30 19:32:10 +00:00
mergify[bot]
8db221bc50
Merge pull request #13578 from NixOS/mergify/bp/2.28-maintenance/pr-13184
Document more references concepts (backport #13184)
2025-07-30 19:29:46 +00:00
mergify[bot]
3fe1b42423
Merge pull request #13583 from NixOS/mergify/bp/2.28-maintenance/pr-13221
doc: Render verbatim `@docroot@` on contributing page (backport #13221)
2025-07-30 19:29:42 +00:00