diff options
author | Andreas Rammhold <andreas@rammhold.de> | 2019-09-09 10:44:39 +0200 |
---|---|---|
committer | Andreas Rammhold <andreas@rammhold.de> | 2019-09-09 10:50:12 +0200 |
commit | 4fdbdcede0af0ab70d94eecb5358225b1a04407f (patch) | |
tree | 0eef4bb292c5e28757b136114acb0b1a50099ed7 /pkgs/tools/admin/google-cloud-sdk/default.nix | |
parent | 5f3d43fedfa12ad555fd3ebdac8601db924aa803 (diff) | |
download | nixpkgs-4fdbdcede0af0ab70d94eecb5358225b1a04407f.tar nixpkgs-4fdbdcede0af0ab70d94eecb5358225b1a04407f.tar.gz nixpkgs-4fdbdcede0af0ab70d94eecb5358225b1a04407f.tar.bz2 nixpkgs-4fdbdcede0af0ab70d94eecb5358225b1a04407f.tar.lz nixpkgs-4fdbdcede0af0ab70d94eecb5358225b1a04407f.tar.xz nixpkgs-4fdbdcede0af0ab70d94eecb5358225b1a04407f.tar.zst nixpkgs-4fdbdcede0af0ab70d94eecb5358225b1a04407f.zip |
google-cloud-sdk: prefer using a pythonEnv vs just a search path
Previously only direct dependencies were available in the python search path. Transitive dependencies would not be available and thus a few features would not work due to import errors. Those import errors were being caugth and gave a (wrong) hint why it wouldn't work. By using `python.withPackages` instead of the crafted search path with only the direct dependencies those missing feature should now be working. See issue #67094 for details on the observed errors. Fixes #67094
Diffstat (limited to 'pkgs/tools/admin/google-cloud-sdk/default.nix')
-rw-r--r-- | pkgs/tools/admin/google-cloud-sdk/default.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/tools/admin/google-cloud-sdk/default.nix b/pkgs/tools/admin/google-cloud-sdk/default.nix index 7c81e861ddb..5b701600dd1 100644 --- a/pkgs/tools/admin/google-cloud-sdk/default.nix +++ b/pkgs/tools/admin/google-cloud-sdk/default.nix @@ -13,7 +13,7 @@ let pythonInputs = [ cffi cryptography pyopenssl crcmod ] ++ lib.optional (with-gce) google-compute-engine; - pythonPath = lib.makeSearchPath python.sitePackages pythonInputs; + pythonEnv = python.withPackages (_: pythonInputs); baseUrl = "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads"; sources = name: system: { @@ -53,8 +53,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 |