mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 11:36:11 +01:00
direnvrc: Add nix_direnv_version
In the style of direnv's `direnv_version`.
729fbecd96/stdlib.go (L1173-L1179)
Can be tested for with `has`, e.g. to decide on using `source_url`.
This commit is contained in:
parent
adfca0d26d
commit
9f40e3b1c3
3 changed files with 41 additions and 4 deletions
|
|
@ -123,10 +123,12 @@ via home-manager section.
|
|||
|
||||
### Direnv source_url
|
||||
|
||||
Put the following line in your .envrc
|
||||
Put the following lines in your `.envrc`:
|
||||
|
||||
```bash
|
||||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/1.2.6/direnvrc" "sha256-jidqAtTK64MJxz1fd394P1RNUZW5Jd8OFgO2nNg2gJU="
|
||||
if ! has nix_direnv_version || ! nix_direnv_version 1.2.6; then
|
||||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/1.2.6/direnvrc" "sha256-jidqAtTK64MJxz1fd394P1RNUZW5Jd8OFgO2nNg2gJU="
|
||||
fi
|
||||
```
|
||||
|
||||
## Usage example
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue