daml/nix/nixpkgs.nix
Moritz Kiefer 310f893fa7
Bump JVM on Darwin and force TLS 1.2 (#8697)
Details are in the comments but this seems to workaround the annoying
tls issues we have been dealing with for the past few days.

changelog_begin
changelog_end
2021-02-01 13:04:14 +00:00

68 lines
2.4 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Pinned version of nixpkgs that we use for our development and deployment.
{ system ? builtins.currentSystem, ... }:
let
# See ./nixpkgs/README.md for upgrade instructions.
src = import ./nixpkgs;
# package overrides
overrides = _: pkgs: rec {
# nixpkgs ships with a very old version of openjdk on darwin
# because newer versions cause issues with jvmci. We dont care
# about that so we upgrade it to the latest.
jdk8 =
if pkgs.stdenv.isDarwin then
pkgs.jdk8.overrideAttrs(oldAttrs: {
name = "zulu1.8.0_282-8.52.0.23";
src = pkgs.fetchurl {
url = "https://cdn.azul.com/zulu/bin/zulu8.52.0.23-ca-jdk8.0.282-macosx_x64.zip";
sha256 = "04azr412azqx3cyj9fda0r025hbzypwbnpb44gi15s683ns63wd2";
curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/zulu-linux/";
};
})
else pkgs.jdk8;
nodejs = pkgs.nodejs-12_x;
ephemeralpg = pkgs.ephemeralpg.overrideAttrs(oldAttrs: {
installPhase = ''
mkdir -p $out
PREFIX=$out make install
wrapProgram $out/bin/pg_tmp --prefix PATH : ${pkgs.postgresql_9_6}/bin:$out/bin
'';
});
bazel = pkgs.bazel.overrideAttrs(oldAttrs: {
patches = oldAttrs.patches ++ [
# Note (MK)
# This patch enables caching of tests marked as `exclusive`. It got apparently
# rolled back because it caused problems internally at Google but its unclear
# what is actually failing and it seems to work fine for us.
# See https://github.com/bazelbuild/bazel/pull/8983/files#diff-107db037d4a55f2421fed9ed5c6cc31b
# for the only change that actually affects the code in this patch. The rest is tests
# and/or documentation.
(pkgs.fetchurl {
url = "https://patch-diff.githubusercontent.com/raw/bazelbuild/bazel/pull/8983.patch";
sha256 = "1qdyqymsylinkdwqhbxbm8bvbyznrdn74n744pi5xhdwb6lw1r8a";
})
];
});
scala_2_12 = pkgs.scala_2_12.overrideAttrs (oldAttrs: rec {
name = "scala-2.12.12";
src = pkgs.fetchurl {
url = "https://www.scala-lang.org/files/archive/${name}.tgz";
sha256 = "3520cd1f3c9efff62baee75f32e52d1e5dc120be2ccf340649e470e48f527e2b";
};
});
};
nixpkgs = import src {
inherit system;
# pin the overlays
overlays = [overrides];
config.allowUnfree = true;
config.allowBroken = true;
};
in
nixpkgs