Unverified Commit b6aa28ad authored by Marcus Ramberg's avatar Marcus Ramberg Committed by GitHub
Browse files

google-cloud-sdk: rewrite vendored CA bundles (#484666)

parents fa48ed12 4cf3f9aa
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
#

{
  cacert,
  stdenv,
  lib,
  fetchurl,
@@ -168,6 +169,16 @@ stdenv.mkDerivation rec {
    $out/bin/gsutil version | grep -w "$(cat platform/gsutil/VERSION)"
  '';

  # Replace all vendored copies of CA bundle with the one used by Nixpkgs.
  # This search/replace is a bit overzealous and replaces some files used by tests
  # but it should cause no harm since we're not running those tests.
  postFixup = ''
    while IFS= read -rd "" f; do
      echo "rewriting certificate bundle: $f"
      ln -sf ${cacert}/etc/ssl/certs/ca-bundle.crt "$f"
    done < <(find "$out" '(' -name cacert.pem -o -name cacerts.txt ')' -print0)
  '';

  passthru = {
    inherit components withExtraComponents;
    updateScript = ./update.sh;