2019-04-04 11:33:38 +03:00
|
|
|
|
# Pinned version of nixpkgs that we use for our development and deployment.
|
|
|
|
|
|
2019-11-12 15:15:31 +03:00
|
|
|
|
{ system ? builtins.currentSystem, ... }:
|
2019-04-04 11:33:38 +03:00
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
# See ./nixpkgs/README.md for upgrade instructions.
|
2019-06-27 19:47:42 +03:00
|
|
|
|
src = import ./nixpkgs;
|
2019-04-04 11:33:38 +03:00
|
|
|
|
|
|
|
|
|
# package overrides
|
|
|
|
|
overrides = _: pkgs: rec {
|
2019-11-26 20:47:39 +03:00
|
|
|
|
grpc = pkgs.grpc.overrideAttrs (oldAttrs: {
|
|
|
|
|
version = "1.23.1";
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
|
owner = "grpc";
|
|
|
|
|
repo = "grpc";
|
|
|
|
|
rev = "v1.23.1";
|
|
|
|
|
sha256 = "1jcyd9jy7kz5zfch25s4inwlivb1y1w52fzfjy5ra5vcnp3hmqyr";
|
|
|
|
|
fetchSubmodules = true;
|
|
|
|
|
};
|
2020-02-07 15:13:38 +03:00
|
|
|
|
# Upstream nixpkgs applies patches that are incompatbile with our version
|
|
|
|
|
# of grpc. So, we disable them.
|
2020-05-11 12:47:54 +03:00
|
|
|
|
patches = [
|
|
|
|
|
# Fix glibc version conflict.
|
|
|
|
|
./grpc-Fix-gettid-naming-conflict.patch
|
|
|
|
|
./grpc-Rename-gettid-functions.patch
|
|
|
|
|
];
|
2019-11-26 20:47:39 +03:00
|
|
|
|
});
|
2019-06-27 19:47:42 +03:00
|
|
|
|
ephemeralpg = pkgs.ephemeralpg.overrideAttrs(oldAttrs: {
|
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $out
|
|
|
|
|
PREFIX=$out make install
|
2019-10-14 10:35:18 +03:00
|
|
|
|
wrapProgram $out/bin/pg_tmp --prefix PATH : ${pkgs.postgresql_9_6}/bin:$out/bin
|
2019-06-27 19:47:42 +03:00
|
|
|
|
'';
|
|
|
|
|
});
|
2020-03-10 15:13:58 +03:00
|
|
|
|
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 it’s 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 = "1j25bycn9q7536ab3ln6yi6zpzv2b25fwdyxbgnalkpl2dz9idb7";
|
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
|
});
|
2019-04-04 11:33:38 +03:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nixpkgs = import src {
|
|
|
|
|
inherit system;
|
|
|
|
|
|
|
|
|
|
# pin the overlays
|
|
|
|
|
overlays = [overrides];
|
|
|
|
|
|
|
|
|
|
config.allowUnfree = true;
|
|
|
|
|
config.allowBroken = true;
|
|
|
|
|
};
|
|
|
|
|
in
|
|
|
|
|
nixpkgs
|