-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy path.envrc
More file actions
29 lines (22 loc) · 992 Bytes
/
.envrc
File metadata and controls
29 lines (22 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
nix-build $PWD/default.nix -A env --out-link .nix-env
PATH_add ".nix-env/bin"
export LOCALHOST_PYTHON="$PWD/.nix-env/bin/python"
# source .profile from `$env`.
# This is only used to set things interpolated by nix.
# All *static* things should live inside .envrc.
[[ -f ".nix-env/.profile" ]] && source_env ".nix-env/.profile"
# allow local .envrc overrides
[[ -f .envrc.local ]] && source_env .envrc.local
if [[ "$NO_GIT_HOOKS" == "TRUE" ]]; then
# setting up .git-hooks for commit message verification
git config core.hooksPath .git-hooks
echo ""
echo " Git Hooks has been configured in your current environment."
echo " Read more about them here: https://github.com/wireapp/wire-server-deploy?tab=readme-ov-file#optional-git-commit-message-verification"
echo " If you don't want to use it, then set NO_GIT_HOOKS=FALSE in file .envrc.local and re-laod the envionment by running:"
echo " direnv reload"
echo ""
else
git config --unset core.hooksPath
fi