devShell: Fix repl

This commit is contained in:
Jack O'Sullivan 2022-02-15 02:38:35 +00:00
parent 99f8695df2
commit 716ee35c29

View File

@ -143,7 +143,13 @@
name = "repl"; name = "repl";
category = "utilities"; category = "utilities";
help = "Open a `nix repl` with this flake"; help = "Open a `nix repl` with this flake";
command = ''nix repl ${pkgs.writeText "repl.nix" "builtins.getFlake \"${./.}\""}''; command =
''
tmp="$(mktemp --tmpdir repl.nix.XXXXX)"
echo "builtins.getFlake \"$PRJ_ROOT\"" > "$tmp"
nix repl "$tmp" || true
rm "$tmp"
'';
} }
{ {
name = "home-link"; name = "home-link";