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
|
2022-02-14 21:06:17 +03:00
|
|
|
|
{ system ? import ./system.nix
|
2019-04-04 11:33:38 +03:00
|
|
|
|
, 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)
|
2021-11-25 23:23:46 +03:00
|
|
|
|
buf
|
2019-11-13 19:27:28 +03:00
|
|
|
|
coreutils
|
2019-04-04 11:33:38 +03:00
|
|
|
|
curl
|
|
|
|
|
docker
|
|
|
|
|
gawk
|
|
|
|
|
gnutar
|
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
|
|
|
|
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-11-08 16:39:02 +03:00
|
|
|
|
;
|
|
|
|
|
|
2021-11-18 12:03:01 +03:00
|
|
|
|
postgresql_10 = if pkgs.buildPlatform.libc == "glibc"
|
|
|
|
|
then pkgs.runCommand "postgresql_10_wrapper" { buildInputs = [ pkgs.makeWrapper ]; } ''
|
2021-11-08 16:39:02 +03:00
|
|
|
|
mkdir -p $out/bin
|
2021-11-18 12:03:01 +03:00
|
|
|
|
for tool in ${pkgs.postgresql_10}/bin/*; do
|
2021-11-08 16:39:02 +03:00
|
|
|
|
makeWrapper $tool $out/bin/$(basename $tool) --set LOCALE_ARCHIVE ${pkgs.glibcLocales}/lib/locale/locale-archive
|
|
|
|
|
done
|
2021-11-18 12:03:01 +03:00
|
|
|
|
ln -s ${pkgs.postgresql_10}/include $out/include
|
|
|
|
|
ln -s ${pkgs.postgresql_10}/lib $out/lib
|
|
|
|
|
ln -s ${pkgs.postgresql_10}/share $out/share
|
|
|
|
|
'' else pkgs.postgresql_10;
|
2021-11-08 16:39:02 +03:00
|
|
|
|
|
2019-04-04 11:33:38 +03:00
|
|
|
|
|
2021-02-16 12:39:16 +03:00
|
|
|
|
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'';
|
|
|
|
|
});
|
|
|
|
|
|
2022-02-01 13:27:11 +03:00
|
|
|
|
ghcPkgs = pkgs.haskell.packages.native-bignum.ghc902;
|
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;
|
2022-02-22 17:30:15 +03:00
|
|
|
|
buildInputs = [pkgs.python3Packages.sphinx];
|
2020-06-29 13:34:40 +03:00
|
|
|
|
} ;
|
|
|
|
|
|
2022-02-22 17:30:15 +03:00
|
|
|
|
sphinx-exts = pkgs.python3Packages.sphinx.overridePythonAttrs (attrs: rec {
|
2020-06-29 13:34:40 +03:00
|
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs ++ [sphinx-copybutton];
|
|
|
|
|
});
|
|
|
|
|
|
2022-02-08 19:23:53 +03:00
|
|
|
|
script = pkgs.unixtools.script;
|
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
|
|
|
|
|
;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
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 {})
|