diff --git a/README.md b/README.md index 772e3c3c..88969487 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,6 @@ * Edit the `shell.nix` file so that it contains `import /path/to/this/repo/shells/your-new-file.nix`. +* For shells that have a shellHook that exports environment containing computed directories (e.g. the git root or the current working directory), add `eval "$shellHook"` to your `.envrc`. + * Execute `direnv allow` to load the `.envrc` file which in turn uses `lorri` to load your `shell.nix` file. diff --git a/programs/git/default.nix b/programs/git/default.nix index 08b81589..6d3d20cc 100644 --- a/programs/git/default.nix +++ b/programs/git/default.nix @@ -23,7 +23,7 @@ ".envrc" "shell.nix" # Ruby dependencies in source tree - "/vendor/bundler" + "/vendor/rubygems" "**/*.patch" ]; userEmail = config.custom.git.email; diff --git a/shells/accentor-api.nix b/shells/accentor-api.nix index 606baeb2..45a73348 100644 --- a/shells/accentor-api.nix +++ b/shells/accentor-api.nix @@ -49,5 +49,7 @@ pkgs.mkShell { listen_addresses = ''' unix_socket_directories = '$PGHOST' HERE + export GEM_HOME="$PWD/vendor/rubygems" + export PATH="$GEM_HOME/bin:$PATH" ''; } diff --git a/shells/dodona.nix b/shells/dodona.nix index 35357a0e..dad579b7 100644 --- a/shells/dodona.nix +++ b/shells/dodona.nix @@ -50,5 +50,7 @@ pkgs.mkShell { ]; shellHook = '' export DATABASE_URL="mysql2://root:dodona@127.0.0.1:3306/dodona" + export GEM_HOME="$PWD/vendor/rubygems" + export PATH="$GEM_HOME/bin:$PATH" ''; }