11214 Commits

Author SHA1 Message Date
Robert Hensing aa1345fd8a lib/services: fix reload/readiness bugs and add compliance coverage (#540857) 2026-07-23 16:49:52 +00:00
cinereal ae9994806c lib/services: fix reload/readiness bugs and add compliance coverage
Fixes several correctness bugs primarily around modular services' recent
reload/notification options (#535695) and adds compliance coverage to guard them.

Fixes:

- `lib/services/service.nix`:
  - the reload-conflict assertion had inverted polarity, so it fired on the
    default configuration
  - the `mkIf` guard on `process.reloadCommand` had a misplaced paren, applying
    `!= null` to the `mkIf` result rather than to the condition
  - `process.reloadSignal` derives `process.reloadCommand`, so the assertion
    could not check `reloadCommand != null` -- that fired on every signal-only
    service. The command is now derived at `mkDefault` priority and the
    assertion is gated on `options.process.reloadCommand.highestPrio`, firing
    only when the user also set `reloadCommand` explicitly.
  - change `notificationProtocol` to a sub-module type
- `nixos/modules/system/service/systemd/service.nix`:
  - `systemd.mainExecReload`'s default ran `escapeSystemdExecArgs` (a list
    escaper) on the `nullOr str` `process.reloadCommand`; this threw
    `expected a list but found a string` and would have mangled `$MAINPID`. It
    now uses `process.reloadCommand` verbatim.
  - the `Type` default read a non-existent
    `config.serviceManager.notificationProtocol` instead of
    `config.notificationProtocol`.

Tests:

Extend the modular-service compliance suite to guard the above:

- Portable (manager-agnostic) eval assertions: `reloadSignal` derives
  `reloadCommand`, the conflict assertion does not fire on signal-only services
  but does when both are set explicitly, and `notificationProtocol.systemd`/`.s6`
  default to `false`.
- systemd-specific eval assertions: `serviceConfig.Type` (simple/notify) and
  `serviceConfig.ExecReload` are asserted on the resolved host units. This
  directly guards the `mainExecReload` fix, which threw before it.
- Runtime reload compliance test: a nested reloadable sub-service is started and
  reloaded, asserting the service observed the reload (recorded a SIGHUP marker).
  `callReload` receives the service's name path (the list of names from the
  top-level service down to the target sub-service); each integration joins it
  per its own unit-naming convention (NixOS dash-joins to the systemd unit name,
  e.g. `reload-inner.service`). Keeping it a path list rather than a read-only
  submodule option keeps the suite manager-agnostic.
- `doc/build-helpers/testers.chapter.md`: document `callReload`.

Follow-up to #535695.

Signed-off-by: cinereal <cinereal@riseup.net>
Assisted-by: Claude:claude-opus-4-8
2026-07-20 11:01:04 +02:00
nixpkgs-ci[bot] 0c762cd7ff Merge master into staging-next 2026-07-18 18:18:55 +00:00
Ben Siraphob eeefc5b648 firefox-esr: build on 32-bit (#542781) 2026-07-18 17:30:55 +00:00
nixpkgs-ci[bot] fe492abad6 Merge master into staging-next 2026-07-17 06:48:17 +00:00
Tol Wassman f4f8338f0e Revert "buildMozillaMach: backport BZ 2047651 patch for 153"
This reverts commit 0374b4e5ac.
2026-07-16 21:19:20 +00:00
Ben Siraphob b1ce11974e firefox: disable PGO on 32-bit 2026-07-16 13:52:45 -07:00
nixpkgs-ci[bot] baab16d485 Merge master into staging-next 2026-07-16 12:33:46 +00:00
Vincent Laporte 92a69da464 Change default Rocq packages' name prefix (#541801) 2026-07-16 07:44:32 +00:00
Théo Zimmermann 1b950b50bd rocqPackages.mkRocqDerivation: change prefix for rocq
Make the defauult prefix be set to `[ "rocq" ]` (instead of
`[ "rocq-core" ]`) if `useCoq` is `false`.

This matches the opam convention and ensures that the default
`opam-name` will be correct.
2026-07-15 21:43:39 +02:00
K900 1cb2e8437a Merge remote-tracking branch 'origin/master' into staging-next 2026-07-15 21:31:19 +03:00
Eman Resu c543ac2217 cc-wrapper: Don't force outPath comparisons during metadata evaluation (#539613) 2026-07-15 14:25:23 +00:00
Eman Resu f9feb60dba makePythonWriter: remove a useless (and incorrect) check (#521741) 2026-07-15 14:05:19 +00:00
sempiternal-aurora 8f12d45a14 gcc: revise mirror list
Add an extra one from https://gcc.gnu.org/mirrors.html, and comment out
old ones that don't seem to be keeping up with current releases
2026-07-15 16:29:38 +12:00
Théo Zimmermann c57f76fad5 rocqPackages.mkRocqDerivation: change prefix for coq
Make the default prefix be set to `[ "coq" ]` if `useCoq` is `true`.

This ensures that `mkRocqDerivation` can be called directly to build
Coq derivations without changing the derivation name / `opam-name`.
2026-07-14 15:16:40 +02:00
nixpkgs-ci[bot] c45ba81144 Merge staging-next into staging 2026-07-13 12:50:29 +00:00
Vincent Laporte 17be5c5fe7 Delete duplicated code and make mkCoqDerivation a wrapper on top of mkRocqDerivation (#537856) 2026-07-13 07:41:58 +00:00
nixpkgs-ci[bot] c7eab28550 Merge staging-next into staging 2026-07-13 00:33:23 +00:00
Jo 35ac3dd767 firefox-devedition-unwrapped: 152.0b3 -> 153.0b11 (#540902) 2026-07-12 20:29:23 +00:00
nixpkgs-ci[bot] 4c5e19c3be Merge staging-next into staging 2026-07-12 12:20:06 +00:00
isabel 22d9ea8bf8 buildLakePackage: Small clean-ups for new builder (#519478) 2026-07-12 10:48:25 +00:00
isabel 34cf037ef6 buildFHSEnv: Enable structuredAttrs (#535295) 2026-07-12 10:30:20 +00:00
Ryan Hendrickson 0374b4e5ac buildMozillaMach: backport BZ 2047651 patch for 153 2026-07-11 19:20:50 -04:00
Théo Zimmermann 0235b9517e mkCoqDerivation: make a wrapper on top of mkRocqDerivation 2026-07-10 17:56:53 +02:00
nixpkgs-ci[bot] 2a5eb18dbf Merge staging-next into staging 2026-07-09 12:55:45 +00:00
Martin Weinelt 1eadb818dd buildMozillaMach: enable structuredAttrs and strictDeps 2026-07-09 00:48:08 +02:00
Eelco Dolstra 3dc7da509f cc-wrapper: Don't force outPath comparisons during metadata evaluation
Operations like `nix eval --file '<nixpkgs>' hello.name` are supposed
to be lazy in the sense that they shouldn't cause any derivations to
be instantiated. However, this was not the case anymore, e.g.

  $ time nix eval --file '<nixpkgs>' hello.name -vvvvvvv 2>&1 | grep -c 'copying.*to the store\|^instantiated'
  1145
  real    0m0.359s

In fact, even evaluating `lib.version` triggers 1145 paths to be
copied to the store. (Why `lib` causes a bunch of derivations to be
evaluated is another issue...)

The reason for this is that cc-wrapper has assertions like

  assert libc_bin == bintools.libc_bin

which which Nix implements by comparing their outPaths. Computing an
outPath calls derivationStrict, causing the .drv closure of the
bootstrap libc to be written to the store. Since these asserts ran
whenever a cc-wrapper derivation was forced to WHNF (which the stdenv
bootstrap stage assertions do on every evaluation of the Nixpkgs top
level), merely evaluating e.g. 'hello.name' wrote over a thousand .drv
files.

Now the asserts are (arbitrarily) moved under `unpackPhase`, which is
only forced when the derivation is actually instantiated, so
evaluating metadata attributes stays free of store writes:

  $ time nix eval --file '<nixpkgs>' hello.name -vvvvvvv 2>&1 | grep -c 'copying.*to the store\|^instantiated'
  0
  real    0m0.113s

Assisted-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 15:35:39 +02:00
nixpkgs-ci[bot] 2460cec5c9 Merge staging-next into staging 2026-07-07 18:42:08 +00:00
Gutyina Gergő de25c842e5 fetchPnpmDeps: drop fetcherVersion = 3 for pnpm_11 and the related test 2026-07-07 14:35:19 +02:00
Gutyina Gergő 29ee10df31 fetchPnpmDeps: fix changed hashes due to sqlite bump by reverting to old format 2026-07-07 13:37:57 +02:00
nixpkgs-ci[bot] 82c2d18f05 Merge staging-next into staging 2026-07-06 18:39:46 +00:00
nixpkgs-ci[bot] f185090602 Merge master into staging-next 2026-07-06 18:39:05 +00:00
Philip Taron e923a383a2 buildTypstPackage: enable strictDeps, __structuredAttrs (#538288) 2026-07-06 14:28:42 +00:00
nixpkgs-ci[bot] b699a21608 Merge staging-next into staging 2026-07-06 13:16:30 +00:00
nixpkgs-ci[bot] a7e09e4bd3 Merge master into staging-next 2026-07-06 13:15:52 +00:00
Stefan Frijters 0f8356544c rocqPackages.mkRocqDerivation: move env variables into env 2026-07-06 14:56:07 +02:00
Stefan Frijters 8ad58c00a8 coqPackages.mkCoqDerivation: move env variables into env for structuredAttrs 2026-07-06 14:55:58 +02:00
Théo Zimmermann 5e0de9d493 Symmetric mkRocqDerivation / mkCoqDerivation (#537814) 2026-07-06 11:29:34 +00:00
nixpkgs-ci[bot] 6f7345c8a6 Merge staging-next into staging 2026-07-05 12:30:32 +00:00
nixpkgs-ci[bot] 1cff068641 Merge master into staging-next 2026-07-05 12:29:54 +00:00
Doron Behar abe4c0979b nim: huge refactor of packages (#496960) 2026-07-05 07:42:20 +00:00
Arne Keller 74ebbfaf0b make{Script; Binary}Wrapper: log if target file does not exist (#384765) 2026-07-04 10:59:59 +00:00
Matt Sturgeon cea24fefd1 buildGoModule: supported structuredAttrs with subPackages (#519903) 2026-07-04 01:49:49 +00:00
Ethan Carter Edwards 9fb8d43cff buildTypstPackage: enable strictDeps, __structuredAttrs
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
2026-07-03 21:18:07 -04:00
nixpkgs-ci[bot] 25e094b684 Merge master into staging-next 2026-07-03 18:28:50 +00:00
Jörg Thalheim 6f4e740958 dockerTools: fix streamLayeredImage wrapper shebang when cross compiling (#536230) 2026-07-03 14:32:42 +00:00
Théo Zimmermann 6548b1eece mkCoqDerivation: clean up support for Coq <= 8.6
We don't package these old versions anymore.
2026-07-02 16:52:23 +02:00
Théo Zimmermann 301164d8e0 mkCoqDerivation: clean up enableParallelBuilding warning logic
Not necessary anymore.
2026-07-02 16:52:18 +02:00
Théo Zimmermann 7e160edd5d mkCoqDerivation/mkRocqDerivation: update ref to Rocq-community 2026-07-02 15:53:02 +02:00
eveeifyeve d5f3806901 buildNimPackage: warn of removal of requiredNimVersion
With the rise of the nim refractor this removes the need to specify
versions.

Co-authored-by: éclairevoyant
<848000+eclairevoyant@users.noreply.github.com>
2026-07-02 13:36:59 +10:00