Various packages failing to build in nixos-rebuild

end of nixos-rebuild switch output:

error: Cannot build '/nix/store/ihf7w53c991hlp434a8klr2aw1xr1cqx-pamixer-1.6.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/vdn1va0px0cymqlhsra01n7yj3rk4k85-pamixer-1.6
building '/nix/store/3vknqskn8yh82jk9a4asrw9nr2gxbwn5-unit-systemd-remount-fs.service.drv'...
building '/nix/store/rlrbgnknci3cnaz2wpgkzh4h66vcg0zg-unit-systemd-sysctl.service.drv'...
building '/nix/store/gmk0f3235nk3qca0daycypylkzbqy8k8-unit-systemd-timedated.service.drv'...
building '/nix/store/4acd4n0ha7y1bj60wcy6bx9qpm4y2p4r-unit-systemd-timesyncd.service.drv'...
error: Cannot build '/nix/store/4xjya6ckww9b4pg83083yrmy3zm5z5ij-man-paths.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/6qi9j04g197xdlrlddlk07zzp7h8y3nl-man-paths
error: Cannot build '/nix/store/cswiiwagn7h92bxia5b6zx4l5drwqlmq-system-path.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/p0p69p8fipggiihb1gjq31vagv3l5p4f-system-path
error: Cannot build '/nix/store/9l1n4ss6gr55p0diqjd5bplhpaxq1z4f-nixos-system-nixos-25.11pre872917.21980a9c20f3.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/jscjf7gxlhyzdfrwgjli3m5wwkfpcp5x-nixos-system-nixos-25.11pre872917.21980a9c20f3
Command 'nix-build '<nixpkgs/nixos>' --attr config.system.build.toplevel --no-out-link' returned non-zero exit status 100.

and here’s the meson build output (I’ve explicitly included pkg-config-wrapped and cxxopts as well as tried builds with and without them yielding the same results):

The Meson build system
Version: 1.9.0
Source dir: /build/source
Build dir: /build/source/build
Build type: native build
Project name: pamixer
Project version: 1.6
C++ compiler for the host machine: g++ (gcc 14.3.0 "g++ (GCC) 14.3.0")
C++ linker for the host machine: g++ ld.bfd 2.44
Host machine cpu family: x86_64
Host machine cpu: x86_64
Configuring config.hh using configuration
Found pkg-config: YES (/nix/store/k9s1w95rqfr14lb5xms1lwzrq1yiinzz-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.2
Run-time dependency libpulse found: YES 17.0
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency cxxopts found: NO 

meson.build:17:10: ERROR: Dependency lookup for cxxopts with method 'pkgconfig' failed: Could not generate cflags for cxxopts:
Package icu-cu was not found in the pkg-config search path.
Perhaps you should add the directory containing `icu-cu.pc'
to the PKG_CONFIG_PATH environment variable
Package 'icu-cu', required by 'cxxopts', not found


A full log can be found at /build/source/build/meson-logs/meson-log.txt
Using udevCheckHook
Running phase: unpackPhase
unpacking source archive /nix/store/a8ckm33y2g53h98cxg4svsfcjmamf6i6-qemu-10.1.0.tar.xz
building '/nix/store/v0y5kn6d9kmx05qf5f3yjklgpw1xz2f9-cups-progs.drv'...

nix-shell -p and nix-build outputs for each of these packages yield the same results as in nixos-rebuild

I just need to be able to successfully complete a nixos-rebuild switch

when I switch to nixpkgs-25.05-darwin the same errors occur — I’m not sure what could suddenly be causing this

it appears the problem is with icu-cu which may not be a real program and actually a typo
I’m trying to find icu-cu in meson.build so I can apply a patch in configuration.nix but I’m not sure where meson.build will be

cmake is found in nix build nixpkgs#pamixer --print-build-logs --rebuild but not nixos-rebuild switch

Related? GitHub · Where software is built

maybe - I’m currently generating overlays for each failed package build using chatgpt and chipping away at tons of different packages including pamixer, dolphinemu, maxflow and more

this allows nixos-rebuild completion: with nixpkgs.overlays = import /etc/nixos/overlays.nix; in /etc/nixos/configuration.nix:

[
  (self: super: {
    pamixer = super.pamixer.overrideAttrs (oldAttrs: {
      buildInputs = (oldAttrs.buildInputs or []) ++ [
        self.icu74
        self.cxxopts
        self.cmake
        self.stdenv.cc
      ];

      nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [
        self.pkg-config
        self.meson
        self.ninja
      ];

    });

    maxflow = super.maxflow.overrideAttrs (oldAttrs: {
      cmakeFlags = (oldAttrs.cmakeFlags or []) ++ [
        "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
      ];
      buildInputs = (oldAttrs.buildInputs or []) ++ [ self.stdenv.cc ];
    });

    dolphin-emu = super.dolphin-emu.overrideAttrs (oldAttrs: {
      cmakeFlags = (oldAttrs.cmakeFlags or []) ++ [
        "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
      ];
    });
  })
]

The trouble started with an update from cxxopts 3.2.1 → 3.3.1

The cxxopts sources added icu-cu in this commit

After digging through the documentation, I believe it’s a typo of icu-uc.

EDIT: Filed Build failure on nixpkgs for Darwin: "Package 'icu-cu', required by 'cxxopts', not found" · Issue #469 · jarro2783/cxxopts · GitHub