google-cloud-sdk: make NumPy optional

NumPy is an optional runtime dependency and only needed for IAP TCP forwarding:
https://cloud.google.com/iap/docs/using-tcp-forwarding#increasing_the_tcp_upload_bandwidth

The closure size is 2.05 GiB, of which 1.66 GiB is NumPy
This commit is contained in:
Olivér Falvai
2025-09-07 17:05:09 +02:00
parent 4627f598c9
commit 9878cd45a3
+4 -1
View File
@@ -18,6 +18,9 @@
callPackage,
installShellFiles,
with-gce ? false,
# NumPy is an optional runtime dependency and only needed for IAP TCP forwarding
# https://cloud.google.com/iap/docs/using-tcp-forwarding#increasing_the_tcp_upload_bandwidth
with-numpy ? true,
}:
let
@@ -47,10 +50,10 @@ let
cryptography
pyopenssl
crcmod
numpy
grpcio
]
++ lib.optional (with-gce) google-compute-engine
++ lib.optional (with-numpy) numpy
);
data = import ./data.nix { };