2021-02-17 19:29:48 +00: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 21:28:45 +00:00
|
|
|
in with hscloud.pkgs; let
|
2021-02-17 19:29:48 +00:00
|
|
|
|
|
|
|
wrapper = pkgs.writeScript "wrapper.sh"
|
|
|
|
''
|
|
|
|
source /etc/profile
|
|
|
|
source ${toString ./.}/env.sh
|
2021-10-16 20:53:51 +00:00
|
|
|
bazel run //tools:install
|
2021-02-17 19:29:48 +00:00
|
|
|
|
2021-09-10 23:14:13 +00: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
|
|
|
|
|
2021-02-17 19:29:48 +00:00
|
|
|
exec bash "$@"
|
|
|
|
'';
|
|
|
|
|
|
|
|
in (pkgs.buildFHSUserEnv {
|
|
|
|
name = "hscloud-build";
|
|
|
|
targetPkgs = pkgs: with pkgs; [
|
|
|
|
bazel
|
|
|
|
postgresql
|
|
|
|
python38
|
|
|
|
openjdk11
|
|
|
|
openldap.dev cyrus_sasl.dev # for python-ldap
|
|
|
|
wkhtmltopdf
|
2021-03-11 23:16:10 +00:00
|
|
|
gcc binutils
|
2021-06-06 12:50:54 +00:00
|
|
|
pwgen
|
|
|
|
tmate
|
2021-07-18 14:33:03 +00:00
|
|
|
git
|
2021-09-14 16:37:10 +00:00
|
|
|
which
|
2021-09-14 17:57:03 +00:00
|
|
|
gnupg
|
2021-09-14 16:37:10 +00:00
|
|
|
nettools
|
2021-02-17 19:29:48 +00:00
|
|
|
];
|
|
|
|
multiPkgs = pkgs: [
|
|
|
|
(pkgs.runCommand "protocols" {}
|
|
|
|
''
|
|
|
|
mkdir -p $out/etc
|
|
|
|
ln -s ${pkgs.iana-etc}/etc/protocols $out/etc/protocols
|
|
|
|
'')
|
|
|
|
];
|
|
|
|
runScript = wrapper;
|
|
|
|
}).env
|