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
Moritz Heidkamp
19372436ef
direnvrc: Fix reading of nixpkgs version from git checkout
2020-12-21 15:29:54 +01:00
Jörg Thalheim
e5c4a4678a
use readlink instead of realpath
...
fixes #54
readpath is not available on macOS.
2020-12-09 17:38:37 +01:00
Erik Arvstedt
91f83adf52
use mkdir -p for direnv_layout_dir
...
This avoids a 'cannot create directory' error when a custom layout dir like
direnv_layout_dir=$HOME/.cache/nix-direnv/$pwdHash
is used and the cache dir doesn't exist. This may happen when nix-direnv is used
for the first time or when the cache has been cleared.
2020-10-15 21:38:04 +02:00
Jörg Thalheim
1ef31ac5ff
direnvrc: don't drop shellHook output
2020-10-15 01:58:54 +02:00
Jörg Thalheim
bb0fc5792f
don't override SHELL
...
this variable might be useful in direnv to expose different behavior
depending on calling shell.
fixes https://github.com/nix-community/nix-direnv/issues/45
2020-10-15 01:47:48 +02:00
Jörg Thalheim
ab123704e7
fix incorrectly spelled variable
...
fixes #37
2020-09-17 16:12:10 +01:00
Jörg Thalheim
300258e2bd
remove uncessary line escapes
2020-08-16 11:19:32 +01:00
Jörg Thalheim
970c00c66c
make condition checks more eye-pleasing
2020-08-15 09:48:16 +01:00
Jörg Thalheim
83eb30fbdd
introduce helper function to unset env variables.
2020-08-15 09:48:09 +01:00
Jörg Thalheim
647242044d
fix restoring SSL_CERT_FILE files
2020-08-11 14:11:02 +00:00
Jörg Thalheim
f8592153f3
direnvrc: fix gcroot creation in use-nix
2020-08-11 07:04:24 +01:00
Jörg Thalheim
20e2676b19
fixup temporary directory environment variables
2020-08-11 06:48:45 +01:00
Jörg Thalheim
8fa23fb61b
fix gcroot for nix-shell
2020-08-11 05:20:31 +00:00
Jörg Thalheim
c2998e750d
fix NIX_SSL_CERT_FILE handling
2020-08-10 10:39:47 +01:00
Jörg Thalheim
70d8f8444d
add use_flake
2020-08-09 22:50:56 +01:00
Farid Zakaria
d9ae5315b3
Mark NIX_SHEL as impure ( #29 )
...
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2020-07-18 09:45:18 +01:00
Jörg Thalheim
8e95338708
fix direnv strict_env evaluation
...
.version-suffix does not contain a newline and therefore fails with read
2020-07-09 12:56:41 +01:00
Jörg Thalheim
ba30d7fa4c
direnvrc: do not set an empty NIX_SSL_CERT_FILE
...
Otherwise python does not find any certificates
2020-04-20 12:22:07 +01:00