daml/bazel_tools/nixpkgs-disable-http2.patch
Andreas Herrmann a9828565db
Disable http2 with Nix to work around segfaults (#4427)
* Disable http2 with Nix to work around segfaults

CHANGELOG_BEGIN
CHANGELOG_END

* Disable http2 in dev-env calls to nix-build as well

Co-authored-by: Andreas Herrmann <andreash87@gmx.ch>
2020-02-06 15:15:11 +00:00

26 lines
957 B
Diff

diff --git a/nixpkgs/nixpkgs.bzl b/nixpkgs/nixpkgs.bzl
index 263bb37..d363dfb 100644
--- a/nixpkgs/nixpkgs.bzl
+++ b/nixpkgs/nixpkgs.bzl
@@ -88,7 +88,7 @@ def _nixpkgs_package_impl(repository_ctx):
"The NIX_PATH environment variable is not inherited."
)
- expr_args = []
+ expr_args = ["--option", "http2", "false"]
if repository_ctx.attr.nix_file and repository_ctx.attr.nix_file_content:
fail("Specify one of 'nix_file' or 'nix_file_content', but not both.")
elif repository_ctx.attr.nix_file:
diff --git a/nixpkgs/nixpkgs.bzl b/nixpkgs/nixpkgs.bzl
index 263bb37..3360b9b 100644
--- a/nixpkgs/nixpkgs.bzl
+++ b/nixpkgs/nixpkgs.bzl
@@ -117,6 +117,7 @@ def _nixpkgs_package_impl(repository_ctx):
"bazel-support/nix-out-link",
])
+ expr_args.extend(["--option", "http2", "false"])
expr_args.extend(repository_ctx.attr.nixopts)
# If repositories is not set, leave empty so nix will fail