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

20394 commits

Author SHA1 Message Date
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
Eelco Dolstra
17fc0f47cf
Merge pull request #13472 from NixOS/mergify/bp/2.30-maintenance/pr-13468
libstore: fix Unix sockets in the build directory on sandboxed macOS (backport #13468)
2025-07-14 11:58:07 +02:00
Emily
38a286681c libstore: fix Unix sockets in the build directory on sandboxed macOS
We’re already allowing `/tmp` anyway, so this should be harmless,
and it fixes a regression in the default configuration caused by
moving the build directories out of `temp-dir`. (For instance, that
broke the Lix `guessOrInventPath.sockets` test.)

Note that removing `/tmp` breaks quite a few builds, so although it may
be a good idea in general it would require work on the Nixpkgs side.

Fixes: 749afbbe99fd7b45f828b72628252feba9241362
Change-Id: I6a6a69645f429bc50d4cb24283feda3d3091f534

(This is a cherry-pick of commit d1db3e5fa3faa43b3d2f2e2e843e9cfc1e6e1b71)

Lix patch: https://gerrit.lix.systems/c/lix/+/3500

(cherry picked from commit 5cd94436f5)
2025-07-14 09:14:53 +00:00
Eelco Dolstra
23fb4ff8b6 Bump version 2025-07-12 09:42:24 +02:00
Eelco Dolstra
857365c859
Merge pull request #13458 from NixOS/mergify/bp/2.30-maintenance/pr-13455
Address ifdef problem with macOS/BSD sandboxing (backport #13455)
2025-07-12 08:55:18 +02:00
gustavderdrache
9497b593c6 CI: Roll nix version to 2.29.1
This works around the macOS issue that the prior commit addresses.

(cherry picked from commit 8e5814d972)
2025-07-11 23:09:58 +00:00
gustavderdrache
1cf202650a Address ifdef problem with macOS/BSD sandboxing
(cherry picked from commit e2ef2cfcbc)
2025-07-11 23:09:58 +00:00
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
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
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
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
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