summary refs log tree commit diff
path: root/pkgs/tools/admin/google-cloud-sdk
diff options
context:
space:
mode:
authorIlya Kolpakov <ilya.kolpakov@gmail.com>2017-11-16 13:46:37 +0100
committerIlya Kolpakov <ilya.kolpakov@gmail.com>2017-11-16 13:46:37 +0100
commit886770c6f0ea3ed43ac934e459efe3ba5f9879e2 (patch)
tree90542bc1f275608b3d206f84c89620842c06d574 /pkgs/tools/admin/google-cloud-sdk
parentfc8fbab87fead3d42ba5849ab50decf2f35aafcf (diff)
downloadnixlib-886770c6f0ea3ed43ac934e459efe3ba5f9879e2.tar
nixlib-886770c6f0ea3ed43ac934e459efe3ba5f9879e2.tar.gz
nixlib-886770c6f0ea3ed43ac934e459efe3ba5f9879e2.tar.bz2
nixlib-886770c6f0ea3ed43ac934e459efe3ba5f9879e2.tar.lz
nixlib-886770c6f0ea3ed43ac934e459efe3ba5f9879e2.tar.xz
nixlib-886770c6f0ea3ed43ac934e459efe3ba5f9879e2.tar.zst
nixlib-886770c6f0ea3ed43ac934e459efe3ba5f9879e2.zip
google-cloud-sdk: no dependence on gce by default (fixes #31369)
Diffstat (limited to 'pkgs/tools/admin/google-cloud-sdk')
-rw-r--r--pkgs/tools/admin/google-cloud-sdk/default.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/pkgs/tools/admin/google-cloud-sdk/default.nix b/pkgs/tools/admin/google-cloud-sdk/default.nix
index ee62b1b84f19..6dec65892b0f 100644
--- a/pkgs/tools/admin/google-cloud-sdk/default.nix
+++ b/pkgs/tools/admin/google-cloud-sdk/default.nix
@@ -1,8 +1,18 @@
-{ stdenv, lib, fetchurl, python, cffi, cryptography, pyopenssl, crcmod, google-compute-engine, makeWrapper }:
+# Make sure that the "with-gce" flag is set when building `google-cloud-sdk`
+# for GCE hosts. This flag prevents "google-compute-engine" from being a
+# default dependency which is undesirable because this package is
+#
+#   1) available only on GNU/Linux (requires `systemd` in particular)
+#   2) intended only for GCE guests (and is useless elsewhere)
+#   3) used by `google-cloud-sdk` only on GCE guests
+#
+
+{ stdenv, lib, fetchurl, makeWrapper, python, cffi, cryptography, pyopenssl,
+  crcmod, google-compute-engine, with-gce ? false }:
 
-# other systems not supported yet
 let
-  pythonInputs = [ cffi cryptography pyopenssl crcmod google-compute-engine ];
+  pythonInputs = [ cffi cryptography pyopenssl crcmod ]
+                 ++ lib.optional (with-gce) google-compute-engine;
   pythonPath = lib.makeSearchPath python.sitePackages pythonInputs;
 
   baseUrl = "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads";