Merge pull request #68348 from andir/google-cloud-sdk-pythonenv
Google cloud sdk pythonenv
This commit is contained in:
commit
8495566fb6
3 changed files with 11 additions and 12 deletions
|
@ -7,13 +7,15 @@
|
|||
# 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 }:
|
||||
{ stdenv, lib, fetchurl, makeWrapper, python, with-gce ? false }:
|
||||
|
||||
let
|
||||
pythonInputs = [ cffi cryptography pyopenssl crcmod ]
|
||||
++ lib.optional (with-gce) google-compute-engine;
|
||||
pythonPath = lib.makeSearchPath python.sitePackages pythonInputs;
|
||||
pythonEnv = python.withPackages (p: with p; [
|
||||
cffi
|
||||
cryptography
|
||||
pyopenssl
|
||||
crcmod
|
||||
] ++ lib.optional (with-gce) google-compute-engine);
|
||||
|
||||
baseUrl = "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads";
|
||||
sources = name: system: {
|
||||
|
@ -53,8 +55,8 @@ in stdenv.mkDerivation rec {
|
|||
programPath="$out/google-cloud-sdk/bin/$program"
|
||||
binaryPath="$out/bin/$program"
|
||||
wrapProgram "$programPath" \
|
||||
--set CLOUDSDK_PYTHON "${python}/bin/python" \
|
||||
--prefix PYTHONPATH : "${pythonPath}"
|
||||
--set CLOUDSDK_PYTHON "${pythonEnv}/bin/python" \
|
||||
--prefix PYTHONPATH : "${pythonEnv}/${python.sitePackages}"
|
||||
|
||||
mkdir -p $out/bin
|
||||
ln -s $programPath $binaryPath
|
||||
|
|
|
@ -3488,8 +3488,8 @@ in
|
|||
|
||||
google-authenticator = callPackage ../os-specific/linux/google-authenticator { };
|
||||
|
||||
google-cloud-sdk = python2.pkgs.google-cloud-sdk;
|
||||
google-cloud-sdk-gce = python2.pkgs.google-cloud-sdk-gce;
|
||||
google-cloud-sdk = callPackage ../tools/admin/google-cloud-sdk { };
|
||||
google-cloud-sdk-gce = google-cloud-sdk.override { with-gce = true; };
|
||||
|
||||
google-fonts = callPackage ../data/fonts/google-fonts { };
|
||||
|
||||
|
|
|
@ -2384,9 +2384,6 @@ in {
|
|||
|
||||
python-gitlab = callPackage ../development/python-modules/python-gitlab { };
|
||||
|
||||
google-cloud-sdk = callPackage ../tools/admin/google-cloud-sdk { };
|
||||
google-cloud-sdk-gce = callPackage ../tools/admin/google-cloud-sdk { with-gce=true; };
|
||||
|
||||
google-compute-engine = callPackage ../tools/virtualization/google-compute-engine { };
|
||||
|
||||
google-music = callPackage ../development/python-modules/google-music { };
|
||||
|
|
Loading…
Reference in a new issue