Add gems that have binaries installed in a project to the PATH in that project
This commit is contained in:
parent
53d7317351
commit
ad1e8b30bc
4 changed files with 7 additions and 1 deletions
|
@ -8,4 +8,6 @@
|
||||||
|
|
||||||
* Edit the `shell.nix` file so that it contains `import /path/to/this/repo/shells/your-new-file.nix`.
|
* 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.
|
* Execute `direnv allow` to load the `.envrc` file which in turn uses `lorri` to load your `shell.nix` file.
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
".envrc"
|
".envrc"
|
||||||
"shell.nix"
|
"shell.nix"
|
||||||
# Ruby dependencies in source tree
|
# Ruby dependencies in source tree
|
||||||
"/vendor/bundler"
|
"/vendor/rubygems"
|
||||||
"**/*.patch"
|
"**/*.patch"
|
||||||
];
|
];
|
||||||
userEmail = config.custom.git.email;
|
userEmail = config.custom.git.email;
|
||||||
|
|
|
@ -49,5 +49,7 @@ pkgs.mkShell {
|
||||||
listen_addresses = '''
|
listen_addresses = '''
|
||||||
unix_socket_directories = '$PGHOST'
|
unix_socket_directories = '$PGHOST'
|
||||||
HERE
|
HERE
|
||||||
|
export GEM_HOME="$PWD/vendor/rubygems"
|
||||||
|
export PATH="$GEM_HOME/bin:$PATH"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,5 +50,7 @@ pkgs.mkShell {
|
||||||
];
|
];
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export DATABASE_URL="mysql2://root:dodona@127.0.0.1:3306/dodona"
|
export DATABASE_URL="mysql2://root:dodona@127.0.0.1:3306/dodona"
|
||||||
|
export GEM_HOME="$PWD/vendor/rubygems"
|
||||||
|
export PATH="$GEM_HOME/bin:$PATH"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue