diff mbox series

[bug#59052] gnu: sbcl-triads: Install binary executable.

Message ID 20221105144924.22898-1-jgart@dismail.de
State New
Headers show
Series [bug#59052] gnu: sbcl-triads: Install binary executable. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue
cbaines/applying patch fail
cbaines/issue success View issue

Commit Message

jgart Nov. 5, 2022, 2:49 p.m. UTC
* gnu/packages/lisp-xyz.scm (sbcl-triads): Install binary executable.
[arguments]: Install the triads binary executable in a phase.

Co-authored-by: Charles <charles.b.jackson@protonmail.com>

Hi Guillaume,

I forgot to add in this phase.

thanks in advance,

jgart
---
 gnu/packages/lisp-xyz.scm | 38 +++++++++++++++++++++++++++-----------
 1 file changed, 27 insertions(+), 11 deletions(-)

Comments

Guillaume Le Vaillant Nov. 5, 2022, 7:02 p.m. UTC | #1
Hi,

If triads is supposed to be used as a standalone program and not as
a library, it may be better to remove "cl-triads" and "ecl-triads", and
to rename "sbcl-triads" to "triads" and move it to "music.scm".
Charles Nov. 5, 2022, 7:15 p.m. UTC | #2
It is meant to be a stand alone program, but it could also be used as a library if someone wants the same functionality as part of a larger program.

My personal thought is that there should be the 3 *cl-triads in lisp-xyz.scm and then a triads in music.scm that is installs a binary. I'm not sure what guix standard is about this.

-------- Original Message --------
On Nov 5, 2022, 2:02 PM, Guillaume Le Vaillant wrote:

> Hi, If triads is supposed to be used as a standalone program and not as a library, it may be better to remove "cl-triads" and "ecl-triads", and to rename "sbcl-triads" to "triads" and move it to "music.scm".
\( Nov. 5, 2022, 7:17 p.m. UTC | #3
On Sat Nov 5, 2022 at 7:15 PM GMT, Charles via Guix-patches via wrote:
> My personal thought is that there should be the 3 *cl-triads in lisp-xyz.scm and then a triads in music.scm that is installs a binary. I'm not sure what guix standard is about this.

How about an output; ``cl-triads:bin''?

    -- (
Charles Nov. 5, 2022, 7:21 p.m. UTC | #4
That could work too. sbcl-triads:bin makes more sense though because the tested binary is built with sbcl.
-------- Original Message --------
On Nov 5, 2022, 2:17 PM, ( wrote:

> On Sat Nov 5, 2022 at 7:15 PM GMT, Charles via Guix-patches via wrote: > My personal thought is that there should be the 3 *cl-triads in lisp-xyz.scm and then a triads in music.scm that is installs a binary. I'm not sure what guix standard is about this. How about an output; ``cl-triads:bin''? -- (
jgart Nov. 6, 2022, 5:24 p.m. UTC | #5
On Sat, 05 Nov 2022 19:21:43 +0000 Charles <charles.b.jackson@protonmail.com> wrote:
> > On Sat Nov 5, 2022 at 7:15 PM GMT, Charles via Guix-patches via wrote: > My personal thought is that there should be the 3 *cl-triads in lisp-xyz.scm and then a triads in music.scm that is installs a binary. I'm not sure what guix standard is about this. How about an output; ``cl-triads:bin''? -- (

> I'm not sure what guix standard is about this.

Hi, how would we like to proceed?

I'm fine with either approach. Charles, would you like to send an update
patch for your approach? I might need about a weekish to get back to this.
diff mbox series

Patch

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 98860f131c..34ad0af1fb 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -24527,20 +24527,36 @@  (define-public sbcl-triads
          (file-name (git-file-name "cl-triads" version))
          (sha256
           (base32 "146mwshynhdw82m2nxrcjvf1nk0z3fn6ywcd2vqxkly5qricc53w"))))
-      (build-system asdf-build-system/sbcl)
-      (arguments
-       '(#:asd-systems '("charje.triads")))
-      (inputs
-       (list sbcl-cl-str
-             sbcl-serapeum
-             sbcl-trivia))
-      (home-page "https://github.com/charJe/triads")
-      (synopsis "Music composition tool to convert roman numerals into triads")
-      (description "Triads is a simple command line tool that reads roman
+    (build-system asdf-build-system/sbcl)
+    (arguments
+      `(#:asd-systems '("charje.triads")
+        #:phases
+        (modify-phases %standard-phases
+          (replace 'build
+            (lambda* (#:key outputs #:allow-other-keys)
+              (setenv "HOME" (getcwd))
+              (system*
+               "sbcl" "--no-userinit"
+               "--eval" "(require :asdf)"
+               "--eval" (string-append
+                         "(require :charje.triads \""
+                         (getcwd) "/charje.triads.asd\")")
+               "--eval" "(asdf:make :charje.triads)")
+              (install-file (string-append (getcwd) "/triads")
+                            (string-append (assoc-ref outputs "out") "/bin"))))
+          (delete 'check)
+          (delete 'create-asdf-configuration))))
+    (inputs
+      (list sbcl-cl-str
+            sbcl-serapeum
+            sbcl-trivia))
+    (home-page "https://github.com/charJe/triads")
+    (synopsis "Music composition tool to convert roman numerals into triads")
+    (description "Triads is a simple command line tool that reads roman
 numeral notation from standard input (or a file) and an musical key and outputs
 the roman numeral in addition to the notes of the triad associated with that
 roman numeral given in the key.")
-      (license license:gpl3))))
+    (license license:gpl3))))
 
 (define-public cl-triads
   (sbcl-package->cl-source-package sbcl-triads))