Skip to content

Commit

Permalink
fix: work arround path:../../ & input.parent error
Browse files Browse the repository at this point in the history
This error is introduced via NixOS/nix#4641

Proper analysis / evlt. fix is pending.
  • Loading branch information
blaggacao authored and Pacman99 committed Feb 23, 2022
1 parent 4bb01ba commit 667be56
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ let
diggaurl=
lockfile_updated=1
lockfile_present=1
tempdigga="\"github:divnix/digga/$(git rev-parse HEAD)\""
cleanup() {
if is $lockfile_present; then
Expand All @@ -24,13 +25,13 @@ let
git rm -f flake.lock
fi
# ensure: restore input
[ -z $diggaurl ] || sed -i "s|\"path:../../\"|$diggaurl|g" flake.nix
[ -z $diggaurl ] || sed -i "s|$tempdigga|$diggaurl|g" flake.nix
}
digga_fixture() {
# ensure: replace input
diggaurl=$({ grep -o '"github:divnix/digga.*"' flake.nix || true; })
sed -i 's|"github:divnix/digga/.*"|"path:../../"|g' flake.nix
sed -i "s|\"github:divnix/digga/.*\"|$tempdigga|g" flake.nix
}
trap_err() {
Expand Down

0 comments on commit 667be56

Please sign in to comment.