summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorCharles Jackson <charles.b.jackson@protonmail.com>2022-12-13 22:56:23 -0600
committerGuillaume Le Vaillant <glv@posteo.net>2022-12-19 13:36:41 +0100
commit89a8534b425817640c3e168399543b7f6e10b5a7 (patch)
treecc2735537e9ba85fd0a8c5f3ee4f893ab3e7d69d /gnu
parentdebfbdefda777d36a625f071d3e17faa89c10545 (diff)
downloadguix-89a8534b425817640c3e168399543b7f6e10b5a7.tar.gz
gnu: sbcl-triads: Add bin output.
* gnu/packages/lisp-xyz.scm (sbcl-triads)[arguments]: Add 'build-binary' phase
  to build and install the binary executable.
  (ecl-triads): Remove the build-binary phase because this program has not
  been tested on ECL upstream.

Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/lisp-xyz.scm29
1 files changed, 27 insertions, 2 deletions
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 8f68e88e9b..bf1ee39c98 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -26264,8 +26264,25 @@ Zombie Raptor game engine project.")
          (sha256
           (base32 "146mwshynhdw82m2nxrcjvf1nk0z3fn6ywcd2vqxkly5qricc53w"))))
       (build-system asdf-build-system/sbcl)
+      (outputs '("out" "bin"))
       (arguments
-       '(#:asd-systems '("charje.triads")))
+       '(#:asd-systems '("charje.triads")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'create-asdf-configuration 'build-binary
+             (lambda* (#:key outputs #:allow-other-keys)
+               (setenv "HOME" (getcwd))
+               (invoke
+                "sbcl" "--eval" "(require :asdf)" "--eval"
+                (format
+                 #f "~S"
+                 `(progn
+                   (require "charje.triads"
+                            ,(string-append (getcwd) "/charje.triads.asd"))
+                   (asdf:make "charje.triads"))))
+               (install-file
+                (string-append (getcwd) "/triads")
+                (string-append (assoc-ref outputs "bin") "/bin")))))))
       (inputs
        (list sbcl-cl-str
              sbcl-serapeum
@@ -26282,7 +26299,15 @@ roman numeral given in the key.")
   (sbcl-package->cl-source-package sbcl-triads))
 
 (define-public ecl-triads
-  (sbcl-package->ecl-package sbcl-triads))
+  (let ((ecl-package (sbcl-package->ecl-package sbcl-triads)))
+    (package
+      (inherit ecl-package)
+      (outputs '("out"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments ecl-package)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (delete 'build-binary))))))))
 
 (define-public sbcl-closure-template
   ;; There are no releases since 2015.