From a064585217e44afce7325d826a358acbf7ad8e78 Mon Sep 17 00:00:00 2001 From: Eotel <49769982+Eotel@users.noreply.github.com> Date: Mon, 26 Oct 2026 13:51:09 +0900 Subject: [PATCH] fix(nix): use host platform for system dependencies --- .changeset/nix-host-platform.md | 5 +++++ flake.nix | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/nix-host-platform.md diff --git a/.changeset/nix-host-platform.md b/.changeset/nix-host-platform.md new file mode 100644 index 0000000000..5e28e46fae --- /dev/null +++ b/.changeset/nix-host-platform.md @@ -0,0 +1,5 @@ +--- +"@googleworkspace/cli": patch +--- + +Use Nix host platform attributes when selecting system dependencies. diff --git a/flake.nix b/flake.nix index 0f465d77df..b7b3c852ad 100644 --- a/flake.nix +++ b/flake.nix @@ -38,8 +38,8 @@ }; nativeBuildInputs = [ pkgs.pkg-config ]; - buildInputs = pkgs.lib.optionals pkgs.stdenv.isLinux linuxDeps - ++ pkgs.lib.optionals pkgs.stdenv.isDarwin darwinDeps; + buildInputs = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux linuxDeps + ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isDarwin darwinDeps; # Tests are disabled by default in buildRustPackage if not specified, # but we'll be explicit. Some tests might require network.