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.