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

20414 commits

Author SHA1 Message Date
mergify[bot]
0765fe9d8b
Merge pull request #13967 from NixOS/mergify/bp/2.30-maintenance/pr-13966
meson: add soversion to libraries (#13960) (backport #13966)
2025-09-12 07:12:24 +00:00
Jens Petersen
564b436434 meson: add soversion to libraries (#13960)
(cherry picked from commit bdbc739d6e)
2025-09-12 06:26:40 +00:00
mergify[bot]
4ef8ddbca3
Merge pull request #13921 from NixOS/mergify/bp/2.30-maintenance/pr-13901
Fix macOS HUP detection using kqueue instead of poll (backport #13901)
2025-09-06 08:03:51 +00:00
Jörg Thalheim
b747f703fc 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:43 +00:00
Eelco Dolstra
84c4de7c40 Bump version 2025-09-02 11:01:51 +02:00
Jörg Thalheim
4692c07349
Merge pull request #13884 from xokdvium/2.30-maintenance-drop-toml-bump
Revert "packaging: Build with toml11 4.4.0"
2025-09-01 09:11:30 +02:00
Sergei Zimmerman
cecac6138b
Revert "packaging: Build with toml11 4.4.0"
This reverts commit 306d8838ab.

This was included in the backport accidentally.
2025-09-01 01:56:58 +03:00
Sergei Zimmerman
a1f07151a5
Merge pull request #13869 from NixOS/mergify/bp/2.30-maintenance/pr-13867
nix/develop: Fix misleading ignored error when run with --arg/--argstr (backport #13867)
2025-08-30 01:04:59 +03:00
Sergei Zimmerman
55a060f64b 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:41 +00:00
Jörg Thalheim
241c84029e
Merge pull request #13747 from NixOS/mergify/bp/2.30-maintenance/pr-13741
libexpr: Canonicalize TOML timestamps for toml11 > 4.0 (backport #13741)
2025-08-29 07:35:35 +02:00
Sergei Zimmerman
61bb7b27ea
Merge pull request #13842 from NixOS/mergify/bp/2.30-maintenance/pr-13837 2025-08-27 14:29:27 +03:00
Sergei Zimmerman
5de886ecdf 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
306d8838ab
packaging: Build with toml11 4.4.0
(cherry picked from commit 320b2c74ef)
2025-08-19 00:10:46 +03:00
Sergei Zimmerman
a2e7c0e040
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:10:45 +03:00
Sergei Zimmerman
4ba8f167ff
libexpr: Use table.size() instead of unnecessary loop
(cherry picked from commit d8fc55a46e)
2025-08-19 00:10:44 +03:00
Sergei Zimmerman
219b85478a
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:10:43 +03:00
Sergei Zimmerman
85df250bea
libexpr: Remove extra trailing semicolons (NFC)
This looks really weird after the reformat.

(cherry picked from commit df4e55ffc1)
2025-08-19 00:10:42 +03:00
Sergei Zimmerman
34b38e18cf
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:10:41 +03:00
John Ericson
65d09373d1
Merge pull request #13788 from NixOS/mergify/bp/2.30-maintenance/pr-13785
flake: nixpkgs: nixos-unstable -> nixos-25.05-small (backport #13785)
2025-08-18 16:56:18 -04:00
Sergei Zimmerman
1db4697742
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 23:12:55 +03:00
Sergei Zimmerman
e747853f08
git-blame-ignore-revs: Add nixfmt 1.0.0 reformat 2025-08-18 23:12:44 +03:00
Sergei Zimmerman
7518fdc1f8
flake: Apply nixfmt 1.0.0 2025-08-18 23:11:41 +03:00
Sergei Zimmerman
aec0f0d3f9 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 17:59:06 +00:00
mergify[bot]
1a0f70dd7c
Merge pull request #13728 from NixOS/mergify/bp/2.30-maintenance/pr-13726
docs: add self-attrs documentation (backport #13726)
2025-08-10 15:56:55 +00:00
a-kenji
d9c33be3dd docs: Add self-attribute documentation
(cherry picked from commit 937780ea08)
2025-08-10 15:20:07 +00:00
mergify[bot]
7bd00d13b5
Merge pull request #13562 from NixOS/mergify/bp/2.30-maintenance/pr-13558
meson: Fix `nix_system_cpu` for MIPS and 32 bit ARM systems (backport #13558)
2025-07-27 00:12:12 +00:00
Sergei Zimmerman
b41a9085b2 meson: Fix nix_system_cpu for MIPS and 32 bit ARM systems
Prior patches in 54dc5314e8
and 6db6190002 fixed the default
system double for i686 and ppc/ppc64. This also patch also covers
32 bit arm and mips. ARM cpu names are taken from host_machine.cpu()
for a lack of a better option, but host_machine.cpu_family() is
preferred, since that is supposed to be somewhat standard for cross
files. Endianness is handled correctly by looking at host_machine.endian().

This also updates the documentation to be up to date to how system cpu
is translated from the host_machine specification.

(cherry picked from commit 60d124b36e)
2025-07-26 23:29:28 +00:00
Eelco Dolstra
01b37cfb76 Bump version 2025-07-25 11:31:58 +02:00
Sergei Zimmerman
c56ecddbee
Merge pull request #13549 from NixOS/mergify/bp/2.30-maintenance/pr-13546
ci: Make it actually possible to disable dogfooding (backport #13546)
2025-07-25 02:53:09 +03:00
Sergei Zimmerman
cd9e090506
ci: Roll back default nix to 2.29.1 in install-nix-action
Daemon tests are broken in 2.30.1 Darwin sandbox and there's
no point release with the fix yet.
2025-07-25 02:24:01 +03:00
Sergei Zimmerman
c6893b217a ci: Make it actually possible to disable dogfooding
Github composite actions are a real treat. Boolean inputs
are not actually booleans but rather strings [1].

[1]: https://www.github.com/actions/runner/issues/2238

(cherry picked from commit f0695e177f)
2025-07-24 23:18:46 +00:00
Sergei Zimmerman
e73ac67663
Merge pull request #13538 from NixOS/mergify/bp/2.30-maintenance/pr-13473
ci: Dogfood Nix from master (backport #13473)
2025-07-25 01:06:36 +03:00
Sergei Zimmerman
e1d9f9b9d1
ci: Don't dogfood installer from master
CI on release branches should be stable, otherwise backporting
might become flaky and unreliable. Dogfooding only really makes
sense for CI on master branch, where failures are not as tedious
to work around.
2025-07-24 23:19:58 +03:00
Eelco Dolstra
ffcf5b369f
Merge pull request #13541 from NixOS/mergify/bp/2.30-maintenance/pr-13535
Fix nix_system_cpu on i686-linux (backport #13535)
2025-07-24 20:01:54 +02:00
Eelco Dolstra
d6f8b9d009 Fix nix_system_cpu on i686-linux
Fixes #13532.

(cherry picked from commit 54dc5314e8)
2025-07-24 17:14:45 +00:00
Sergei Zimmerman
19e3ebb32e ci: Dogfood nix from master for vm_tests and flake_regressions
This should provide more coverage for the build from master that
is being dogfooded.

(cherry picked from commit 3b3c02160d)
2025-07-24 17:09:47 +00:00
Sergei Zimmerman
e05bf58d4b ci: Dogfood Nix from master
(cherry picked from commit 04f6974d2c)
2025-07-24 17:09:47 +00:00
mergify[bot]
8eaa838768
Merge pull request #13529 from NixOS/mergify/bp/2.30-maintenance/pr-13520
meson: Correctly handle endianness for PowerPC CPU families (backport #13520)
2025-07-23 21:27:41 +00:00
Sergei Zimmerman
30bcfa5b54 meson: Correctly handle endianness for PowerPC CPU families
I've missed this while reviewing 6db6190002.
I only built big endian ppc64, so that didn't occur to me.

From meson manual:

> Those porting from autotools should note that Meson does not add
> endianness to the name of the cpu_family. For example, autotools will
> call little endian PPC64 "ppc64le", Meson will not, you must also check
> the .endian() value of the machine for this information.

This code should handle that correctly.

(cherry picked from commit ebd311b7b7)
2025-07-23 20:36:44 +00:00
mergify[bot]
808af0786a
Merge pull request #13518 from NixOS/mergify/bp/2.30-maintenance/pr-13514
treewide: Fix Meson CPU names for powerpc CPUs (backport #13514)
2025-07-21 23:32:05 +00:00
OPNA2608
460822d06c treewide: Fix Meson CPU names for powerpc CPUs
(cherry picked from commit 6db6190002)
2025-07-21 22:49:17 +00:00
Jörg Thalheim
0bc2b6666f
Merge pull request #13504 from NixOS/mergify/bp/2.30-maintenance/pr-13108
Rip off the bandaid: Format the codebase with clang-format (backport #13108)
2025-07-18 22:12:04 +02:00
Sergei Zimmerman
03b47a1bba
Update .git-blame-ignore-revs to ignore the mass reformatting
Co-authored-by: Graham Christensen <graham@grahamc.com>
2025-07-18 22:28:06 +03:00
Sergei Zimmerman
95d9c13716
Apply clang-format universally.
* It is tough to contribute to a project that doesn't use a formatter,
* It is extra hard to contribute to a project which has configured the formatter, but ignores it for some files
* Code formatting makes it harder to hide obscure / weird bugs by accident or on purpose,

Let's rip the bandaid off?

Note that PRs currently in flight should be able to be merged relatively easily by applying `clang-format` to their tip prior to merge.

Co-authored-by: Graham Christensen <graham@grahamc.com>
2025-07-18 22:26:03 +03:00
Graham Christensen
9b8b5d8560 Update clang-format with fixing namespace coments, and separate definition blocks
(cherry picked from commit 41bf87ec70)
2025-07-18 18:31:13 +00:00
Graham Christensen
4bee881a7b Drop a ton of files that should just get formatted
(cherry picked from commit e7af2e6566)
2025-07-18 18:31:12 +00:00
Graham Christensen
b19042bb54 Add sed
(cherry picked from commit 6896761d79)
2025-07-18 18:31:12 +00:00
Graham Christensen
f9923dfec4 format.sh: support looping until it is happy
(cherry picked from commit ee9b57cbf5)
2025-07-18 18:31:12 +00:00
Jörg Thalheim
7f5709c012
Merge pull request #13500 from NixOS/mergify/bp/2.30-maintenance/pr-13496
Fix `nix help shell` by properly handling command aliases (backport #13496)
2025-07-17 20:47:03 +02:00
Oleksandr Knyshuk
31ea1d3fc8 Make nix help shell work by handling aliases properly
Previously, `nix help shell` failed with "Nix has no subcommand 'shell'" despite `nix shell --help`
working correctly. This happened because the `shell` command is actually an alias for `env shell`,
and the help system wasn't resolving aliases when looking up documentation.

This patch modifies the `showHelp` function to check for and resolve aliases before generating the
manpage name, ensuring that shorthand commands like `shell` get proper help documentation.

Closes: #13431
(cherry picked from commit d678b071d6)
2025-07-17 17:42:22 +00:00