4
0
Fork 2
mirror of https://gerrit.hackerspace.pl/hscloud synced 2024-10-18 16:27:45 +00:00
hscloud/shell.nix
Serge Bazanski 43b0e0920f shell.nix: add random utilities
Change-Id: I49bfe400af054a8bcc0861f6066e7ca426590268
2021-06-06 12:59:44 +00:00

39 lines
786 B
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.config.pkgs; let
wrapper = pkgs.writeScript "wrapper.sh"
''
source /etc/profile
source ${toString ./.}/env.sh
${toString ./.}/tools/install.sh
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
];
multiPkgs = pkgs: [
(pkgs.runCommand "protocols" {}
''
mkdir -p $out/etc
ln -s ${pkgs.iana-etc}/etc/protocols $out/etc/protocols
'')
];
runScript = wrapper;
}).env