mirror of
https://gerrit.hackerspace.pl/hscloud
synced 2024-10-18 12:27:46 +00:00
47 lines
1 KiB
Nix
47 lines
1 KiB
Nix
# Shell for being able to use bazel on NixOS (or on any operating system with Nix installed).
|
|
|
|
let
|
|
|
|
hscloud = import ./default.nix {};
|
|
|
|
in with hscloud.pkgs; let
|
|
|
|
wrapper = pkgs.writeScript "wrapper.sh"
|
|
''
|
|
source /etc/profile
|
|
source ${toString ./.}/env.sh
|
|
${toString ./.}/tools/install.sh
|
|
|
|
# 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
|
|
|
|
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
|
|
gcc binutils
|
|
pwgen
|
|
tmate
|
|
git
|
|
];
|
|
multiPkgs = pkgs: [
|
|
(pkgs.runCommand "protocols" {}
|
|
''
|
|
mkdir -p $out/etc
|
|
ln -s ${pkgs.iana-etc}/etc/protocols $out/etc/protocols
|
|
'')
|
|
];
|
|
runScript = wrapper;
|
|
}).env
|