From 196f6a812b310e3179afcf48bf2907853246dcad Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 12 Jun 2025 23:10:07 +0100 Subject: [PATCH] =?UTF-8?q?nixos/nixpkgs/read-only:=20fix=20cross=E2=80=90?= =?UTF-8?q?compilation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This matches the definition of `_module.args.pkgs` in the standard Nixpkgs module, and fixes a bunch of build issues caused by use of `nativeBuildInputs = [ pkgs.foo ];` throughout NixOS. A fallback could be added in case we expect people might be passing in package sets without `__splicedPackages`, although that seems like it would be inherently broken to me. --- nixos/modules/misc/nixpkgs/read-only.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/misc/nixpkgs/read-only.nix b/nixos/modules/misc/nixpkgs/read-only.nix index fa372d13e545..db43615c12f0 100644 --- a/nixos/modules/misc/nixpkgs/read-only.nix +++ b/nixos/modules/misc/nixpkgs/read-only.nix @@ -63,7 +63,7 @@ in # find mistaken definitions builtins.seq cfg.config builtins.seq cfg.overlays builtins.seq cfg.hostPlatform builtins.seq cfg.buildPlatform - cfg.pkgs; + cfg.pkgs.__splicedPackages; nixpkgs.config = cfg.pkgs.config; nixpkgs.overlays = cfg.pkgs.overlays; nixpkgs.hostPlatform = cfg.pkgs.stdenv.hostPlatform;