2021-02-17 20:29:48 +01:00
|
|
|
# Shell for being able to use bazel on NixOS (or on any operating system with Nix installed).
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
hscloud = import ./default.nix {};
|
|
|
|
|
2021-08-30 23:28:45 +02:00
|
|
|
in with hscloud.pkgs; let
|
2021-02-17 20:29:48 +01:00
|
|
|
|
2022-04-26 23:09:43 +02:00
|
|
|
fontconfig = pkgs.writeText "fc-00-nixos-cache.conf" ''
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
|
|
|
<fontconfig>
|
|
|
|
<include>/etc/fonts/fonts.conf</include>
|
|
|
|
<dir>${pkgs.roboto}</dir>
|
|
|
|
</fontconfig>
|
|
|
|
'';
|
|
|
|
|
2021-02-17 20:29:48 +01:00
|
|
|
wrapper = pkgs.writeScript "wrapper.sh"
|
|
|
|
''
|
2022-04-26 23:09:43 +02:00
|
|
|
export NIX_SSL_CERT_FILE="${cacert}/etc/ssl/certs/ca-bundle.crt"
|
|
|
|
export SSL_CERT_FILE="${cacert}/etc/ssl/certs/ca-bundle.crt"
|
|
|
|
export FONTCONFIG_FILE="${fontconfig}"
|
|
|
|
|
2021-02-17 20:29:48 +01:00
|
|
|
source ${toString ./.}/env.sh
|
2022-04-26 23:09:43 +02:00
|
|
|
|
|
|
|
# FIXME: //tools:install runs in a different PATH which thrashes our cache
|
|
|
|
# and causes massive rebuilds on every launch... This next line is the only
|
|
|
|
# important part off tools/install.sh
|
|
|
|
# bazel run //tools:install
|
2023-07-28 17:14:50 +00:00
|
|
|
#bazel build //tools/... //cluster/tools/...
|
2021-02-17 20:29:48 +01:00
|
|
|
|
2021-09-11 01:14:13 +02:00
|
|
|
# Fancy colorful PS1 to make people notice easily they're in hscloud.
|
|
|
|
PS1='\[\033]0;\u/hscloud:\w\007\]'
|
|
|
|
if type -P dircolors >/dev/null ; then
|
|
|
|
PS1+='\[\033[01;35m\]\u/hscloud\[\033[01;34m\] \w \$\[\033[00m\] '
|
|
|
|
fi
|
|
|
|
export PS1
|
|
|
|
|
2022-04-26 23:09:43 +02:00
|
|
|
exec bash --noprofile --norc "$@"
|
2021-02-17 20:29:48 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
in (pkgs.buildFHSUserEnv {
|
|
|
|
name = "hscloud-build";
|
|
|
|
targetPkgs = pkgs: with pkgs; [
|
2022-11-26 21:33:38 +01:00
|
|
|
bazel_5
|
2021-02-17 20:29:48 +01:00
|
|
|
postgresql
|
2023-07-28 17:14:50 +00:00
|
|
|
python310
|
2021-02-17 20:29:48 +01:00
|
|
|
openjdk11
|
|
|
|
openldap.dev cyrus_sasl.dev # for python-ldap
|
2023-07-28 17:14:50 +00:00
|
|
|
# No wkhtmltopdf as it got yoten from the hydra build set, and building it
|
|
|
|
# takes ages. Run locally in docker container instead.
|
|
|
|
#wkhtmltopdf
|
|
|
|
gcc binutils clang
|
|
|
|
libxcrypt-legacy
|
2021-06-06 12:50:54 +00:00
|
|
|
pwgen
|
|
|
|
tmate
|
2021-07-18 16:33:03 +02:00
|
|
|
git
|
2021-09-14 18:37:10 +02:00
|
|
|
which
|
2021-09-14 19:57:03 +02:00
|
|
|
gnupg
|
2021-09-14 18:37:10 +02:00
|
|
|
nettools
|
2022-04-26 23:09:43 +02:00
|
|
|
file
|
|
|
|
curl
|
|
|
|
netcat
|
|
|
|
nix
|
2022-06-11 12:16:12 +00:00
|
|
|
vim
|
|
|
|
openssh
|
2023-03-02 10:32:46 +01:00
|
|
|
libxcrypt
|
2023-10-08 12:28:06 +00:00
|
|
|
zlib
|
2021-02-17 20:29:48 +01:00
|
|
|
];
|
|
|
|
multiPkgs = pkgs: [
|
|
|
|
(pkgs.runCommand "protocols" {}
|
|
|
|
''
|
|
|
|
mkdir -p $out/etc
|
|
|
|
ln -s ${pkgs.iana-etc}/etc/protocols $out/etc/protocols
|
|
|
|
'')
|
|
|
|
];
|
|
|
|
runScript = wrapper;
|
|
|
|
}).env
|