2019-04-04 11:33:38 +03:00
|
|
|
|
# Bazel MUST only use this file to source dependencies
|
|
|
|
|
#
|
|
|
|
|
# This allows CI to pre-build and cache the build outputs
|
|
|
|
|
{ system ? builtins.currentSystem
|
|
|
|
|
, pkgs ? import ./nixpkgs.nix { inherit system; }
|
|
|
|
|
}:
|
2019-08-13 21:00:14 +03:00
|
|
|
|
let shared = rec {
|
2019-04-04 11:33:38 +03:00
|
|
|
|
inherit (pkgs)
|
2019-11-13 19:27:28 +03:00
|
|
|
|
coreutils
|
2019-04-04 11:33:38 +03:00
|
|
|
|
curl
|
|
|
|
|
docker
|
|
|
|
|
gawk
|
|
|
|
|
gnutar
|
2021-10-12 14:43:20 +03:00
|
|
|
|
grpc
|
2019-11-13 19:27:28 +03:00
|
|
|
|
grpcurl
|
2019-04-04 11:33:38 +03:00
|
|
|
|
gzip
|
|
|
|
|
imagemagick
|
|
|
|
|
jdk8
|
2021-04-08 11:42:40 +03:00
|
|
|
|
jdk11
|
2020-05-05 20:35:30 +03:00
|
|
|
|
jekyll
|
2019-04-04 11:33:38 +03:00
|
|
|
|
jq
|
2019-11-13 19:27:28 +03:00
|
|
|
|
netcat-gnu
|
2019-04-04 11:33:38 +03:00
|
|
|
|
nodejs
|
2020-03-12 12:36:40 +03:00
|
|
|
|
openssl
|
2020-04-11 22:53:44 +03:00
|
|
|
|
gnupatch
|
2019-04-04 11:33:38 +03:00
|
|
|
|
patchelf
|
2019-10-14 10:35:18 +03:00
|
|
|
|
postgresql_9_6
|
|
|
|
|
protobuf3_8
|
2019-07-05 17:04:47 +03:00
|
|
|
|
python3
|
2020-05-26 19:32:33 +03:00
|
|
|
|
toxiproxy
|
2019-04-04 11:33:38 +03:00
|
|
|
|
zip
|
|
|
|
|
;
|
|
|
|
|
|
2021-02-16 12:39:16 +03:00
|
|
|
|
scala_2_12 = (pkgs.scala_2_12.override { }).overrideAttrs (attrs: {
|
|
|
|
|
# Something appears to be broken in nixpkgs' fixpoint which results in the
|
|
|
|
|
# test not having the version number we overwrite so it fails
|
|
|
|
|
# with a mismatch between the version in nixpkgs and the one we
|
|
|
|
|
# overwrite.
|
|
|
|
|
installCheckPhase = "";
|
2021-03-26 23:26:40 +03:00
|
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ pkgs.makeWrapper ];
|
2021-02-16 12:39:16 +03:00
|
|
|
|
installPhase = attrs.installPhase + ''
|
|
|
|
|
wrapProgram $out/bin/scala --add-flags "-nobootcp"
|
|
|
|
|
wrapProgram $out/bin/scalac --add-flags "-nobootcp"
|
|
|
|
|
wrapProgram $out/bin/scaladoc --add-flags "-nobootcp"
|
|
|
|
|
wrapProgram $out/bin/scalap --add-flags "-nobootcp"
|
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
scala_2_13 = (pkgs.scala_2_13.override { }).overrideAttrs (attrs: {
|
2021-02-08 14:12:07 +03:00
|
|
|
|
# Something appears to be broken in nixpkgs' fixpoint which results in the
|
|
|
|
|
# test not having the version number we overwrite so it fails
|
|
|
|
|
# with a mismatch between the version in nixpkgs and the one we
|
|
|
|
|
# overwrite.
|
|
|
|
|
installCheckPhase = "";
|
2021-03-26 23:26:40 +03:00
|
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ pkgs.makeWrapper ];
|
2021-02-08 14:12:07 +03:00
|
|
|
|
installPhase = attrs.installPhase + ''
|
|
|
|
|
wrapProgram $out/bin/scala --add-flags "-nobootcp"
|
|
|
|
|
wrapProgram $out/bin/scalac --add-flags "-nobootcp"
|
|
|
|
|
wrapProgram $out/bin/scaladoc --add-flags "-nobootcp"
|
|
|
|
|
wrapProgram $out/bin/scalap --add-flags "-nobootcp"
|
|
|
|
|
'';
|
|
|
|
|
});
|
2019-06-27 19:47:42 +03:00
|
|
|
|
|
2019-05-07 14:55:30 +03:00
|
|
|
|
# We need to have a file in GOPATH that we can use as
|
|
|
|
|
# root_file in go_wrap_sdk.
|
|
|
|
|
go = pkgs.go.overrideAttrs (oldAttrs: {
|
|
|
|
|
doCheck = false;
|
|
|
|
|
postFixup = ''touch $out/share/go/ROOT'';
|
|
|
|
|
});
|
|
|
|
|
|
2021-11-02 17:52:55 +03:00
|
|
|
|
ghcPkgs = pkgs.haskell.packages.integer-simple.ghc8107;
|
2021-02-08 14:12:07 +03:00
|
|
|
|
|
2021-01-25 14:53:53 +03:00
|
|
|
|
ghc = ghcPkgs.ghc;
|
2021-02-08 14:12:07 +03:00
|
|
|
|
# Deliberately not taken from ghcPkgs. This is a fully
|
|
|
|
|
# static executable so it doesn’t pull in another GHC
|
|
|
|
|
# and upstream nixpkgs does not cache packages for
|
|
|
|
|
# integer-simple.
|
|
|
|
|
hlint = pkgs.hlint;
|
2019-04-04 11:33:38 +03:00
|
|
|
|
|
2019-04-15 18:53:05 +03:00
|
|
|
|
|
|
|
|
|
# Java 8 development
|
|
|
|
|
mvn = pkgs.writeScriptBin "mvn" ''
|
|
|
|
|
exec ${pkgs.maven}/bin/mvn ''${MVN_SETTINGS:+-s "$MVN_SETTINGS"} "$@"
|
|
|
|
|
'';
|
|
|
|
|
|
2020-01-21 19:38:11 +03:00
|
|
|
|
# rules_nodejs expects nodejs in a subdirectory of a repository rule.
|
|
|
|
|
# We use a linkFarm to fulfill this requirement.
|
|
|
|
|
nodejsNested = pkgs.linkFarm "nodejs" [ { name = "node_nix"; path = pkgs.nodejs; }];
|
|
|
|
|
|
2019-11-20 17:27:32 +03:00
|
|
|
|
sass = pkgs.sass;
|
2019-04-04 11:33:38 +03:00
|
|
|
|
|
2020-06-29 13:34:40 +03:00
|
|
|
|
sphinx-copybutton = pkgs.python3Packages.buildPythonPackage rec {
|
|
|
|
|
pname = "sphinx-copybutton";
|
|
|
|
|
version = "0.2.12";
|
|
|
|
|
|
|
|
|
|
src = pkgs.python3Packages.fetchPypi {
|
|
|
|
|
inherit pname version;
|
|
|
|
|
sha256 = "0p1yls8pplfg59wzmb96m3pjcyr3202an1rcr5wn2jwqhqvqi4ll";
|
|
|
|
|
};
|
|
|
|
|
doCheck = false;
|
|
|
|
|
buildInputs = [sphinx183];
|
|
|
|
|
} ;
|
|
|
|
|
|
2020-02-07 15:13:38 +03:00
|
|
|
|
# sphinx 2.2.2 causes build failures of //docs:pdf-docs.
|
2020-06-29 13:34:40 +03:00
|
|
|
|
# We override here rather than in nixpkgs.nix since GHC depends on sphinx
|
|
|
|
|
# and we don’t want to rebuild that unnecessarily.
|
2020-02-07 15:13:38 +03:00
|
|
|
|
sphinx183 = pkgs.python3Packages.sphinx.overridePythonAttrs (attrs: rec {
|
|
|
|
|
version = "1.8.3";
|
2021-06-24 16:58:56 +03:00
|
|
|
|
doCheck = false;
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
|
owner = "sphinx-doc";
|
|
|
|
|
repo = "sphinx";
|
|
|
|
|
rev = "v${version}";
|
|
|
|
|
sha256 = "1hkqi5kzs85idv1w85qdl1bb2fwh7ccmgp6m860kzpkrl55149y8";
|
2020-02-07 15:13:38 +03:00
|
|
|
|
};
|
|
|
|
|
});
|
2019-04-04 11:33:38 +03:00
|
|
|
|
|
2020-06-29 13:34:40 +03:00
|
|
|
|
sphinx183-exts = sphinx183.overridePythonAttrs (attrs: rec {
|
|
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs ++ [sphinx-copybutton];
|
|
|
|
|
});
|
|
|
|
|
|
2021-09-07 16:41:43 +03:00
|
|
|
|
sysctl = pkgs.unixtools.sysctl;
|
|
|
|
|
|
2019-04-04 11:33:38 +03:00
|
|
|
|
# Custom combination of latex packages for our latex needs
|
|
|
|
|
texlive = pkgs.texlive.combine {
|
|
|
|
|
inherit (pkgs.texlive)
|
|
|
|
|
bera
|
|
|
|
|
capt-of
|
|
|
|
|
collection-fontsrecommended
|
|
|
|
|
collection-luatex
|
|
|
|
|
datetime
|
|
|
|
|
enumitem
|
|
|
|
|
environ
|
|
|
|
|
epigraph
|
|
|
|
|
eqparbox
|
|
|
|
|
eulervm
|
|
|
|
|
fancyhdr
|
|
|
|
|
fmtcount
|
|
|
|
|
fncychap
|
|
|
|
|
footmisc
|
|
|
|
|
footnotebackref
|
|
|
|
|
framed
|
|
|
|
|
latexmk
|
|
|
|
|
lipsum
|
|
|
|
|
mathpartir
|
|
|
|
|
mathpazo
|
|
|
|
|
mnsymbol
|
|
|
|
|
multirow
|
|
|
|
|
needspace
|
|
|
|
|
palatino
|
|
|
|
|
scheme-small
|
|
|
|
|
tabulary
|
|
|
|
|
threeparttable
|
|
|
|
|
tikzsymbols
|
|
|
|
|
titlesec
|
|
|
|
|
tocbibind
|
|
|
|
|
todonotes
|
2020-05-11 12:47:54 +03:00
|
|
|
|
transparent
|
2019-04-04 11:33:38 +03:00
|
|
|
|
trimspaces
|
|
|
|
|
varwidth
|
|
|
|
|
wrapfig
|
|
|
|
|
xargs
|
|
|
|
|
;
|
|
|
|
|
};
|
|
|
|
|
|
2020-05-20 09:08:18 +03:00
|
|
|
|
z3 = pkgs.z3;
|
|
|
|
|
|
2019-04-04 11:33:38 +03:00
|
|
|
|
bazel-cc-toolchain = pkgs.callPackage ./tools/bazel-cc-toolchain {};
|
2019-08-13 21:00:14 +03:00
|
|
|
|
};
|
|
|
|
|
in shared // (if pkgs.stdenv.isLinux then {
|
2019-04-04 11:33:38 +03:00
|
|
|
|
inherit (pkgs)
|
|
|
|
|
glibcLocales
|
|
|
|
|
;
|
|
|
|
|
} else {})
|