Jörg Thalheim
d677f78787
bump version 2.0.0
2022-04-07 09:02:29 +02:00
Eric Wolf
d0c7bc5d90
nix channel path might be a link to a store path
...
Use `_nix_direnv_realpath` to resolve it, that way
the store path gets noticed and "borrow some bits from ..."
succeeds.
2022-04-03 20:45:31 -04:00
Eric Wolf
8ce0765b55
use_nix: file was used in two places and values got confused
...
Using `file` in the for loop over the `nix_watches` entries
left a value in `file`, so the check '[[ "$file" == ""]]'
always failed.
Found by adding `set -x` to `direnvrc` temporarily and staring
hard at the output.
2022-04-03 20:45:27 -04:00
Bryan Bennett
3cca1afdec
Start work of integrating nix 24 features
2022-04-03 20:45:19 -04:00
Bryan Bennett
deb345be82
Move realpath into a function
...
Using ls to resolve the path does not work if the next level is also a symlink
2022-04-03 20:45:15 -04:00
Bryan Bennett
7133709885
create a function for all pre-flight checks
2022-04-03 20:45:11 -04:00
Bryan Bennett
fef7340826
Use ls to resolve symlink
2022-04-03 20:45:07 -04:00
Bryan Bennett
c1df7c3c15
Don't track flake.{nix,lock} for remote flakes
2022-04-03 20:45:02 -04:00
Petar Kirov
d7ddae4be8
Release version 1.6.1
...
* Update hashes
* Hash obtained via:
```sh
direnv fetchurl 'https://raw.githubusercontent.com/nix-community/nix-direnv/master/direnvrc ' \
| grep -m1 -o 'sha256-.*'
```
* Bump tag to 1.6.1 in:
* README.md
* direnvrc
* template/.envrc
This release includes the following changes:
* Allow watching of arbitrary files for nix flake updates ([#148 ][1])
[1]: https://github.com/nix-community/nix-direnv/pull/148
2022-03-22 11:56:16 +02:00
polygon
1241f1115e
Add nix_direnv_watch_file command
...
Used to watch files that, when changed, trigger an update of the
cached nix environment.
2022-02-25 21:09:10 +01:00
Jörg Thalheim
1257fd47e4
bump version 1.6.0
2022-02-07 21:20:54 +01:00
Bryan Bennett
c6db289e0f
Print a more useful error on old direnv versions
2022-02-02 14:23:59 -05:00
Bryan Bennett
effc976ce7
Use non-zero exit code for error status
2022-01-31 13:26:21 -05:00
Bryan Bennett
6d6f0d85a3
Declare (and enforce) a minimum direnv version
...
2.21.3 introduces extglob to direnv's stdlib.
This means we need at least 2.21.3 to execute nix_direnv_version.
This just enforces a previously unstated dependency.
2022-01-31 13:24:02 -05:00
Bryan Bennett
2a99301bbc
Quote argument expansion
...
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2021-12-22 07:59:20 -05:00
Bryan Bennett
0eef85db95
Allow passing arguments to print-dev-env invocation
2021-12-21 10:05:44 -05:00
John Axel Eriksson
7b801eaaec
invalidate cache on changes to devshell.toml
2021-12-17 11:16:29 +01:00
Jörg Thalheim
57235bb89e
bump version 1.5.1
2021-12-16 10:07:14 +01:00
Jörg Thalheim
76f26b2692
useFlake(): fix sed invocation on legacy operating systems
...
macOS has `-i` but it insists on writing backup files.
2021-11-13 06:45:46 +01:00
Jörg Thalheim
083ac16bf5
bump version 1.5.0
2021-10-21 07:50:57 +02:00
Jörg Thalheim
8729f1740c
Merge pull request #106 from immae/add_argsum
...
Add a suffix to cache file to allow multiple calls to use_nix
2021-09-12 05:32:00 +01:00
Jörg Thalheim
77418af186
make shellcheck happy
2021-09-12 06:29:45 +02:00
Jörg Thalheim
ceb91896cd
prefer sha1sum over shasum
...
sha1sum is written in C, while shasum requires perl interpreter
and has higher overhead.
2021-09-12 06:25:14 +02:00
Jörg Thalheim
97d73b892a
remove dependency on external tools when computing cache key
2021-09-12 06:23:42 +02:00
Zak B. Elep
37c36013b4
direnvrc: don't override TMPDIR
...
On macOS, `$TMPDIR` is usually a private temp dir separate from
`/tmp` - this trips up some programs like `emacsclient` when under
nix-shell.
2021-08-15 20:05:09 +08:00
Ismaël Bouya
9544919b4c
Add a suffix to allow multiple calls to use_nix
...
This change permits to make multiple calls to use_nix, with different
arguments passed to it. It will generate a cache file for each distinct
"argument list" rather than based solely on the nixpkgs version.
2021-08-12 12:08:18 +02:00
ryneeverett
6e68ea7235
flakes: Don't run shellHook on cached dev shells
...
This makes the behavior of `use flake` consistent with that of `use
nix`.
Resolve #90 .
2021-06-08 20:51:07 -04:00
Jörg Thalheim
f2fd3f433c
bump version 1.4.0
2021-06-03 18:44:32 +02:00
Dominique Martinet
fd12ba39f3
use flake: allow optional flake expression
...
This allows using flake.nix out of tree, which is very appreciable
if you develop in a big repository as flake evaluation will copy the
whole git archive to store everytime it changes.
2021-05-26 13:49:31 +09:00
Jörg Thalheim
a14fc56bdf
bump version 1.3.0
2021-05-19 07:13:59 +02:00
bb010g
9f40e3b1c3
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`.
2021-05-19 06:47:20 +02:00
Jörg Thalheim
be4863dae6
Revert "async nix-shell"
...
This reverts commit 5996ecbfdb .
2021-05-14 08:42:04 +02:00
Jörg Thalheim
5996ecbfdb
async nix-shell
2021-05-09 08:38:49 +02:00
Bruno Bigras
760ce16e6c
don't override experimental-features
...
Co-authored-by: regnat <rg@regnat.ovh>
2021-05-05 12:09:09 -04:00
Jörg Thalheim
c3a8747d62
direnvc: add TODO
2021-03-19 21:20:50 +00:00
meck
b2d35ce3e9
save XDG_DATA_DIRS in flakes
2021-03-19 13:02:49 +01:00
meck
7ac4290e82
Preserve XDG_DATA_DIRS
2021-02-27 17:38:48 +01:00
Jörg Thalheim
763d572df3
properly register flake source gc root
...
Before it just add a gc root with to a symlink to the current directory.
2021-02-11 08:59:09 +01:00
Jörg Thalheim
3a6dfcede5
fallback to store path as nixpkgs cache key
2021-02-10 14:33:18 +01:00
Jörg Thalheim
991ea66bb8
fix nix shells with different nix version
...
If shell.nix contains its own nix version,
our version check might no longer work.
2021-01-30 12:19:10 +01:00
Jörg Thalheim
5dc8842dbc
get rid of gnugrep dependency
2021-01-30 12:18:19 +01:00
Jörg Thalheim
1322dc3dbe
don't print nix version
2021-01-09 08:49:15 +01:00
Jörg Thalheim
7faa01070b
only set experimental features in old nix
2021-01-02 11:31:14 +01:00
Jörg Thalheim
944585ff46
fix shellcheck warnings
2021-01-02 11:22:19 +01:00
Jörg Thalheim
f289bce100
add NIX_BIN_PREFIX to hardcode nix
2021-01-02 11:06:53 +01:00
Jörg Thalheim
7e9ee77fca
Merge pull request #58 from bevuta/fix-nixpkgs-git-checkout-version
...
direnvrc: Fix reading of nixpkgs version from git checkout
2020-12-30 19:21:15 +00:00
Jörg Thalheim
6833ac2172
fix path collision with multiple gcroots in same dir
2020-12-25 19:20:19 +01:00
Jörg Thalheim
f79469890a
use perl on macos to emulate realpath
...
readlink without -f breaks with use_flakes
2020-12-25 18:59:56 +01:00
Jörg Thalheim
5dd5a26ccf
direnv: fix updating gcroots if store path is a directory
2020-12-25 17:59:48 +01:00
Jörg Thalheim
e19d62fc02
use_flake: add gcroot for inputs
2020-12-25 17:29:44 +01:00