blob: 3e0bdc4941cbe7a63e6551baddc503fea62f416b [file] [log] [blame]
Serge Bazanskic97461e2021-02-17 20:29:48 +01001# Shell for being able to use bazel on NixOS (or on any operating system with Nix installed).
2
3let
4
5 hscloud = import ./default.nix {};
6
7in with hscloud.config.pkgs; let
8
9 wrapper = pkgs.writeScript "wrapper.sh"
10 ''
11 source /etc/profile
12 source ${toString ./.}/env.sh
13 ${toString ./.}/tools/install.sh
14
15 exec bash "$@"
16 '';
17
18in (pkgs.buildFHSUserEnv {
19 name = "hscloud-build";
20 targetPkgs = pkgs: with pkgs; [
21 bazel
22 postgresql
23 python38
24 openjdk11
25 openldap.dev cyrus_sasl.dev # for python-ldap
26 wkhtmltopdf
Serge Bazanskidce10ba2021-03-11 23:16:10 +000027 gcc binutils
Serge Bazanskic97461e2021-02-17 20:29:48 +010028 ];
29 multiPkgs = pkgs: [
30 (pkgs.runCommand "protocols" {}
31 ''
32 mkdir -p $out/etc
33 ln -s ${pkgs.iana-etc}/etc/protocols $out/etc/protocols
34 '')
35 ];
36 runScript = wrapper;
37}).env