summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--default.nix5
-rw-r--r--gemma.asd5
2 files changed, 5 insertions, 5 deletions
diff --git a/default.nix b/default.nix
index 43950571c51d..02f8c225f9e8 100644
--- a/default.nix
+++ b/default.nix
@@ -33,10 +33,7 @@ stdenv.mkDerivation rec {
     # Build Lisp
     cd $src
     quicklisp init
-    sbcl --load build.lisp
-
-    # "Install" result
-    cp $src/gemma $out/bin/gemma
+    env GEMMA_BIN_TARGET=$out/bin/gemma sbcl --load build.lisp
   '';
 
   installPhase = "true";
diff --git a/gemma.asd b/gemma.asd
index e9a1d298e843..0aea9c95ff92 100644
--- a/gemma.asd
+++ b/gemma.asd
@@ -9,6 +9,8 @@
   Copyright (c) 2017 Vincent Ambo
 |#
 
+(require 'sb-posix)
+
 (defsystem "gemma"
   :version "0.1.0"
   :author "Vincent Ambo"
@@ -21,7 +23,8 @@
                 :components
                 ((:file "gemma"))))
   :build-operation program-op
-  :build-pathname "gemma"
+  :build-pathname #.(or (pathname  (sb-posix:getenv "GEMMA_BIN_TARGET"))
+                        "gemma")
   :entry-point "gemma::entrypoint"
   :description "Gemma is a household task management system"
   :long-description