Files
dshackle/.envrc
Aldo b6a05d67df solution: use gradle 7.2
Co-authored-by: Brian McGee <brian@41north.dev>
2021-11-11 21:36:32 -05:00

25 lines
646 B
Bash

#!/usr/bin/env bash
# Reload if any of these files change
watch_file nix/*
watch_file .envrc.local
# Build a folder that contains all the tools
nix-build ./nix -A env --out-link ./env
# source .profile from `$env`.
# This is only used to set things interpolated by nix.
# All *static* things should live inside .envrc.
source_env ./env/.profile
# used by docker-compose to run processes with the same user ID mapping
HOST_UID=$(id -u)
HOST_GID=$(id -g)
export HOST_UID HOST_GID
# set protoc path from nix env
export PROTOC_PATH=$(readlink -f ./env/bin/protoc)
# allow local .envrc overrides
[[ -f .envrc.local ]] && source_env .envrc.local