From 716ee35c29e52b65690b4f7f965a75b3ae6e3f76 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Tue, 15 Feb 2022 02:38:35 +0000 Subject: [PATCH] devShell: Fix repl --- flake.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 1bb6817..9998149 100644 --- a/flake.nix +++ b/flake.nix @@ -143,7 +143,13 @@ name = "repl"; category = "utilities"; 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";