From 9dfc0b5ae8a941be37e7afe788663cc49f12ff96 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Thu, 6 Jan 2022 09:29:58 +0100 Subject: [PATCH] Upgrade nixpkgs This gives us GHC 9.0.2 and a new Bazel release. changelog_begin changelog_end --- deps.bzl | 18 +++--------------- nix/nixpkgs/default.src.json | 4 ++-- nix/tools/bazel-cc-toolchain/default.nix | 9 ++++++--- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/deps.bzl b/deps.bzl index da640f6a7522..34c57b757beb 100644 --- a/deps.bzl +++ b/deps.bzl @@ -220,27 +220,15 @@ def daml_deps(): # This should be kept in sync with the grpc version we get from Nix. http_archive( name = "com_github_grpc_grpc", - strip_prefix = "grpc-1.42.0", - urls = ["https://github.com/grpc/grpc/archive/v1.42.0.tar.gz"], - sha256 = "b2f2620c762427bfeeef96a68c1924319f384e877bc0e084487601e4cc6e434c", + strip_prefix = "grpc-1.43.0", + urls = ["https://github.com/grpc/grpc/archive/v1.43.0.tar.gz"], + sha256 = "9647220c699cea4dafa92ec0917c25c7812be51a18143af047e20f3fb05adddc", patches = [ "@com_github_digital_asset_daml//bazel_tools:grpc-bazel-mingw.patch", ], patch_args = ["-p1"], ) - if "com_google_absl" not in native.existing_rules(): - http_archive( - name = "com_google_absl", - sha256 = "35f22ef5cb286f09954b7cc4c85b5a3f6221c9d4df6b8c4a1e9d399555b366ee", - strip_prefix = "abseil-cpp-997aaf3a28308eba1b9156aa35ab7bca9688e9f6", - urls = [ - "https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/997aaf3a28308eba1b9156aa35ab7bca9688e9f6.tar.gz", - "https://github.com/abseil/abseil-cpp/archive/997aaf3a28308eba1b9156aa35ab7bca9688e9f6.tar.gz", - ], - patch_args = ["-p1"], - ) - if "com_google_protobuf" not in native.existing_rules(): http_archive( name = "com_google_protobuf", diff --git a/nix/nixpkgs/default.src.json b/nix/nixpkgs/default.src.json index 3c5e710b99f5..f5e469e43624 100644 --- a/nix/nixpkgs/default.src.json +++ b/nix/nixpkgs/default.src.json @@ -1,6 +1,6 @@ { "owner": "NixOS", "repo": "nixpkgs", - "rev": "a7ecde854aee5c4c7cd6177f54a99d2c1ff28a31", - "sha256": "162dywda2dvfj1248afxc45kcrg83appjd0nmdb541hl7rnncf02" + "rev": "defafc9a220440180a34f923be9772d9c89a8197", + "sha256": "1s6cf4yxzszwl8qgfsr0y0hr1dw1pawwk3nbryi0phri1npvaggj" } diff --git a/nix/tools/bazel-cc-toolchain/default.nix b/nix/tools/bazel-cc-toolchain/default.nix index 1be07c61a4e3..0fa1d6ffb1f1 100644 --- a/nix/tools/bazel-cc-toolchain/default.nix +++ b/nix/tools/bazel-cc-toolchain/default.nix @@ -2,7 +2,7 @@ , binutils , buildEnv , darwin -, llvmPackages +, llvmPackages_7 , makeWrapper , overrideCC , runCommand @@ -14,6 +14,9 @@ # https://github.com/NixOS/nixpkgs/pull/41589. let cc-darwin = with darwin.apple_sdk.frameworks; + # Note (MK): For now we pin to clang 7 since newer versions fail to build abseil. + let stdenv = llvmPackages_7.stdenv; + in runCommand "cc-wrapper-bazel" { buildInputs = [ stdenv.cc makeWrapper ]; @@ -33,12 +36,12 @@ let cc-darwin = makeWrapper ${stdenv.cc}/bin/cc $out/bin/cc \ --add-flags "-Wno-unused-command-line-argument \ -mmacosx-version-min=10.14 \ - -isystem ${llvmPackages.libcxx}/include/c++/v1 \ + -isystem ${llvmPackages_7.libcxx}/include/c++/v1 \ -F${CoreFoundation}/Library/Frameworks \ -F${CoreServices}/Library/Frameworks \ -F${Security}/Library/Frameworks \ -F${Foundation}/Library/Frameworks \ - -L${llvmPackages.libcxx}/lib \ + -L${llvmPackages_7.libcxx}/lib \ -L${darwin.libobjc}/lib" '';