Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ store_paths=$(echo "$nix_files" | xargs nix-store --add ./nix)
layout_dir=$(direnv_layout_dir)
env_dir=./.env

export NIX_CONFIG='extra-experimental-features = nix-command flakes'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This broke my setup somewhat:

❯ cd dev/wire/wire-server
direnv: error /home/flokli/dev/wire/wire-server/.envrc is blocked. Run `direnv allow` to approve its content
❯ direnv allow
direnv: loading ~/dev/wire/wire-server/.envrc                         
🔧 Building environment
warning: unknown experimental feature 'flakes'
warning: unknown experimental feature 'flakes'
⏱ 4sdirenv: ([/nix/store/0lf6mkfaqx4zmsni9yys650qx573zfcw-direnv-2.33.0/bin/direnv export zsh]) is taking a while to execute. Use CTRL-C to give up.
⏱ 8s^C
^C^X^C^C^C

I got stuck here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out, we're not using any flake features, so we can just disable this again: #3777


[[ -d "$layout_dir" ]] || mkdir -p "$layout_dir"

if [[ ! -d "$env_dir" || ! -f "$layout_dir/nix-rebuild" || "$store_paths" != $(< "$layout_dir/nix-rebuild" ) ]]; then
if [[ ! -d "$env_dir" || ! -d "./.env-hs-run" || ! -f "$layout_dir/nix-rebuild" || "$store_paths" != $(< "$layout_dir/nix-rebuild" ) ]]; then
bcmd=nix
if command -v nom &> /dev/null; then
if [[ "${USE_NOM}" != "0" ]]; then
Expand All @@ -25,11 +27,12 @@ if [[ ! -d "$env_dir" || ! -f "$layout_dir/nix-rebuild" || "$store_paths" != $(<
echo "🔧 Building environment"
$bcmd build -f nix wireServer.devEnv -Lv --out-link ./.env
echo "🔧 Building hs-run"
$bcmd build github:wireapp/ghc-flakr -Lv --out-link ./.env
$bcmd build github:wireapp/ghc-flakr -Lv --out-link ./.env-hs-run
echo "$store_paths" > "$layout_dir/nix-rebuild"
fi

PATH_add "./.env/bin"
PATH_add "./.env-hs-run/bin"
path_add "PKG_CONFIG_PATH" "./.env/lib/pkgconfig"
path_add "LIBRARY_PATH" "./.env/lib"
path_add "PYTHONPATH" "./hack/python"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ result-*
# Created by .envrc
.direnv
.env
.env-hs-run

# emacs misc
.dir-locals.el
Expand Down