hscloud/shell.nix
Mateusz Lenik 51f6c10660 shell.nix: add git to targetPkgs
nix-shell attempts to use packages from the system and fails to find git
installed via users.users.<name>.packages.  Adding it to targetPkgs
resolves the issue and makes the dependency explicit.

Change-Id: Ie0c3e48065174a5032ced9c31236f65255483d08
2021-07-18 18:08:27 +00:00

40 lines
794 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
git
];
multiPkgs = pkgs: [
(pkgs.runCommand "protocols" {}
''
mkdir -p $out/etc
ln -s ${pkgs.iana-etc}/etc/protocols $out/etc/protocols
'')
];
runScript = wrapper;
}).env