Commit graph

197 commits

Author SHA1 Message Date
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
Jörg Thalheim
d2d121de14
use USER instead of LOGNAME
it looks like $LOGNAME is not set in our CI?
2020-04-11 20:41:01 +01:00
Jörg Thalheim
16ae21c9a6
fix persistent derivation link
a95abd152a broke this
2020-04-11 20:33:51 +01:00
Jörg Thalheim
a95abd152a
direnv_layout_dir is actually a function 2020-04-10 13:36:45 +01:00
Jörg Thalheim
ae191f0cd4
Respect direnv-layout-dir
fixes #11
2020-04-10 10:57:02 +01:00
Jörg Thalheim
ea7c07e783
replace shebang by shellcheck directive 2020-04-01 16:08:58 +01:00
Jörg Thalheim
e7fce0da51
shellcheck fixes 2020-04-01 14:50:29 +01:00
Luke Worth
12f05b10ac
Restore (NIX_)SSL_CERT_FILE to original value 2020-04-01 11:39:31 +11:00
Jörg Thalheim
5a91446000
Fix TMPDIR backup (#1)
This was clearing TMPDIR since it was first not setting the
`tmp_backup` local variable, and then, since `tmp_backup` was null, it
was unsetting TMPDIR.

Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2020-03-05 07:33:06 +00:00
Jörg Thalheim
f988975869
fix broken eval a second time 2019-10-23 14:09:01 +01:00
Jörg Thalheim
9ce7643b1b
make shell-check happy 2019-10-21 15:05:15 +01:00
Jörg Thalheim
28854ee129
fix evaluation of nix env
read seems to do weird stuff when reading from a file
2019-10-21 14:45:42 +01:00
Jörg Thalheim
292d43a005 improve performance by reducing subshells
forking is somewhat slow
2019-10-18 12:53:44 +00:00
Jörg Thalheim
ea257f1130 make nixpkgs git detection a wee bit more precise 2019-10-18 12:37:54 +00:00
Jörg Thalheim
983f7b8154 fix dereferencing git HEAD 2019-10-18 12:33:38 +00:00
Jörg Thalheim
e7df598cd0
fix environment variable dump extraction
Grep does not work across multiple lines.
However the output of direnv is on a single anyway.
2019-09-30 17:15:28 +01:00
Jörg Thalheim
f678ba557b
add direnvrc 2019-09-27 09:03:55 +01:00