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
6 changes: 5 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
use flake
source_up_if_exists
if command -v nix >/dev/null 2>&1; then
use flake
fi
source_env_if_exists .envrc.local
Comment thread
VVKot marked this conversation as resolved.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ datafusion/core/benches/data/*
# Generated Nix environment hooks

.direnv/
.envrc.local

# rat
filtered_rat.txt
Expand Down
15 changes: 15 additions & 0 deletions docs/source/contributor-guide/development_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ Notes:
- `protoc` is required to compile DataFusion from source.
- Some tests and examples rely on git submodule data being present locally.

## Nix and direnv

The repository's `flake.nix` provides a Nix development shell. Enter it directly
with `nix develop`, or install and configure [direnv](https://direnv.net/) and run
`direnv allow` from the repository root to load it automatically.

The repository's `.envrc` first loads the nearest ancestor `.envrc`, if one
exists, and then loads the shared Nix environment when Nix is installed. Put
project-specific direnv settings in `.envrc.local`. This file is ignored by Git
and loaded last so that local settings take precedence.

If you previously kept personal settings in the repository's `.envrc`, move
only those settings to `.envrc.local`. Do not copy the shared `.envrc`, as doing
so would load the Nix environment twice.

## Windows Setup

```shell
Expand Down
Loading