From 6a1c26cac26afd84e1d62319a920362ad01cd604 Mon Sep 17 00:00:00 2001 From: Thierry Pouplier Date: Sun, 14 Jun 2026 09:03:44 -0400 Subject: [PATCH] fix: remove libcamera from pipewire buildInputs (both overlays) meta.platforms = [] on libcamera doesn't help because nixos-25.11 pipewire has libcamera unconditionally in buildInputs. Must overrideAttrs to: - filter libcamera out of buildInputs - clear existing libcamera meson flags and set -Dlibcamera=disabled --- flake.nix | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index a7c321e..9db440d 100644 --- a/flake.nix +++ b/flake.nix @@ -101,9 +101,20 @@ boot.loader.raspberry-pi.bootloader = "kernel"; # Kill camera packages — not needed on uConsole, break cross-compile nixpkgs.overlays = [ + # Make camera packages "unavailable" so no pkgs depend on them (final: prev: { + libcamera = prev.libcamera.overrideAttrs (_: { meta.platforms = []; }); + libcamera-rpi = prev.libcamera-rpi.overrideAttrs (_: { meta.platforms = []; }); + libpisp = prev.libpisp.overrideAttrs (_: { meta.platforms = []; }); + # Pipewire in nixos-25.11 has libcamera unconditionally in buildInputs; + # meta.platforms trick doesn't help — must actually remove it pipewire = prev.pipewire.overrideAttrs (old: { - mesonFlags = old.mesonFlags ++ [ "-Dlibcamera=disabled" ]; + buildInputs = builtins.filter + (x: !(x?pname && x.pname == "libcamera")) + (old.buildInputs or []); + mesonFlags = builtins.filter + (flag: !(builtins.isString flag && builtins.match ".*libcamera.*" flag != null)) + (old.mesonFlags or []) ++ [ "-Dlibcamera=disabled" ]; }); }) ]; @@ -114,7 +125,12 @@ nixpkgs.overlays = [ (final: prev: { pipewire = prev.pipewire.overrideAttrs (old: { - mesonFlags = old.mesonFlags ++ [ "-Dlibcamera=disabled" ]; + buildInputs = builtins.filter + (x: !(x?pname && x.pname == "libcamera")) + (old.buildInputs or []); + mesonFlags = builtins.filter + (flag: !(builtins.isString flag && builtins.match ".*libcamera.*" flag != null)) + (old.mesonFlags or []) ++ [ "-Dlibcamera=disabled" ]; }); }) ];