Serge Bazanski | c97461e | 2021-02-17 20:29:48 +0100 | [diff] [blame] | 1 | # Shell for being able to use bazel on NixOS (or on any operating system with Nix installed). |
| 2 | |
| 3 | let |
| 4 | |
| 5 | hscloud = import ./default.nix {}; |
| 6 | |
| 7 | in 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 | |
| 18 | in (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 Bazanski | dce10ba | 2021-03-11 23:16:10 +0000 | [diff] [blame] | 27 | gcc binutils |
Serge Bazanski | c97461e | 2021-02-17 20:29:48 +0100 | [diff] [blame] | 28 | ]; |
| 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 |