about summary refs log tree commit diff
path: root/nix/buildLisp/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/buildLisp/default.nix')
-rw-r--r--nix/buildLisp/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/nix/buildLisp/default.nix b/nix/buildLisp/default.nix
index 30b90d9049d7..f483e3676565 100644
--- a/nix/buildLisp/default.nix
+++ b/nix/buildLisp/default.nix
@@ -319,6 +319,11 @@ let
         (let* ((bindir (concatenate 'string (sb-posix:getenv "out") "/bin"))
                (outpath (make-pathname :name "${name}"
                                        :directory bindir)))
+
+          ;; Tell UIOP that argv[0] will refer to running image, not the lisp impl
+          (when (find-package :uiop)
+            (eval `(setq ,(find-symbol "*IMAGE-DUMPED-P*" :uiop) :executable)))
+
           (save-lisp-and-die outpath
                              :executable t
                              :toplevel
@@ -438,7 +443,7 @@ let
                           ;; to handle argument parsing and such properly. Since
                           ;; this needs to work even when we're not using UIOP,
                           ;; we need to do some compile-time acrobatics.
-                          ,(when (find-package 'uiop)
+                          ,(when (find-package :uiop)
                             `(setf ,(find-symbol "*IMAGE-DUMPED-P*" :uiop) :executable))
                           ;; Run the actual application…
                           (${main})
@@ -561,6 +566,10 @@ let
                (bindir (concatenate 'string out "/bin/"))
                (executable (make-pathname :directory bindir :name "${name}")))
 
+          ;; Tell UIOP that argv[0] will refer to running image, not the lisp impl
+          (when (find-package :uiop)
+            (eval `(setf ,(find-symbol "*IMAGE-DUMPED-P*" :uiop) :executable)))
+
           (save-application executable
                             :purify t
                             :error-handler :quit