summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-01-03T15·54+0100
committerVincent Ambo <tazjin@gmail.com>2018-01-03T15·54+0100
commit0d7f845bf5e54f2af6bda4cdf9476bcd66ff08d4 (patch)
tree2f58992f97d6bb5eba7d3ebaf18602a663e1b9b2
parentcc6de0f9c6792413a58031b74190ad358a2b6efd (diff)
refactor(build): Use ASDF facility for output naming
Turns out there is an easy-to-use :build-pathname parameter to set the
output binary name. This kills the hack!
-rw-r--r--default.nix7
-rw-r--r--gemma.asd2
2 files changed, 4 insertions, 5 deletions
diff --git a/default.nix b/default.nix
index f4a10b542691..43950571c51d 100644
--- a/default.nix
+++ b/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
   #
   # 3. Build (and don't strip!) an executable out of the Lisp backend.
   buildPhase = ''
-    mkdir -p $out/share/gemma $out/bin $src/build
+    mkdir -p $out/share/gemma $out/bin
     mkdir .home && export HOME="$PWD/.home"
 
     # Build Elm
@@ -35,9 +35,8 @@ stdenv.mkDerivation rec {
     quicklisp init
     sbcl --load build.lisp
 
-    # ASDF writes this output into an extremely annoying path, but I also can't
-    # be bothered to figure out the output-translation definition for it.
-    mv $HOME/.cache/common-lisp/sbcl-*/$PWD/build/gemma $out/bin/gemma
+    # "Install" result
+    cp $src/gemma $out/bin/gemma
   '';
 
   installPhase = "true";
diff --git a/gemma.asd b/gemma.asd
index 54e794a1eea3..e9a1d298e843 100644
--- a/gemma.asd
+++ b/gemma.asd
@@ -21,7 +21,7 @@
                 :components
                 ((:file "gemma"))))
   :build-operation program-op
-  :output-files (program-op (c o) '("build/gemma"))
+  :build-pathname "gemma"
   :entry-point "gemma::entrypoint"
   :description "Gemma is a household task management system"
   :long-description