diff --git a/default.nix b/default.nix
index 435c16c09157bc34045f2f9c9016a1d1757441b9..e7cdc23580e498ffa2425591c5f4634d9d8bd8b1 100644
--- a/default.nix
+++ b/default.nix
@@ -10,5 +10,5 @@ runCommand "nix-repl"
       -o $out/bin/nix-repl ${./nix-repl.cc} \
       -I${nix}/include/nix \
       -lnixformat -lnixutil -lnixstore -lnixexpr -lnixmain -lreadline -lgc \
-      -DNIX_VERSION=${(builtins.parseDrvName nix.name).version}
+      -DNIX_VERSION=\"${(builtins.parseDrvName nix.name).version}\"
   ''