[PATCH] gnu: sbcl-triads: Install binary executable.

  • Done
  • quality assurance status badge
Details
5 participants
  • Charles
  • Charles
  • Guillaume Le Vaillant
  • jgart
  • (
Owner
unassigned
Submitted by
jgart
Severity
normal
J
J
jgart wrote on 5 Nov 2022 15:49
(address . guix-patches@gnu.org)
20221105144924.22898-1-jgart@dismail.de
* 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(-)

Toggle diff (54 lines)
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))
--
2.38.1
G
G
Guillaume Le Vaillant wrote on 5 Nov 2022 20:02
(name . jgart)(address . jgart@dismail.de)
87iljt1apb.fsf@kitej
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".
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCY2a0kA8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j8QXgD/aqbvOy4wDhiu6R6yTOE1yy4LvXEOz7/50/xB
zXbnM80BAIZp0BDRKsc9pMrZB3UXpZw7OsF9M7peMDvFKodkY2sf
=td/j
-----END PGP SIGNATURE-----

C
C
Charles wrote on 5 Nov 2022 20:15
(address . 59052@debbugs.gnu.org)
27hDgxTQqp5QZe5WOd7QSinKkfs4qXzQ6atarba8Tyq27jKGYPxSN6GRbBuIFcaT4PGHGkAhnbCygUFbya0jcDxARAYY-JsIvti4aADzvms=@protonmail.com
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:

Toggle quote (1 lines)
> 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".
Attachment: file
(
Re: [bug#59052] [PATCH] gnu: sbcl-triads: Install binary executable.
(address . 59052@debbugs.gnu.org)
CO4LRAG0FJZK.26X1EFW8AQTW3@guix-framework
On Sat Nov 5, 2022 at 7:15 PM GMT, Charles via Guix-patches via wrote:
Toggle quote (2 lines)
> 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''?

-- (
C
C
Charles wrote on 5 Nov 2022 20:21
(address . 59052@debbugs.gnu.org)
qAGmQLLXm11C8aays2eLfN_F997v-xQ1eMy-1VV-0e5d3dhTmWyKlip74DO9fSMwPCWWnMeFFX7ty8jbe8_yu797W8pfoHBrM9uFNShjPKM=@protonmail.com
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:

Toggle quote (1 lines)
> 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''? -- (
Attachment: file
J
J
jgart wrote on 6 Nov 2022 18:24
(name . Charles)(address . charles.b.jackson@protonmail.com)
20221106112421.GB14752@dismail.de
On Sat, 05 Nov 2022 19:21:43 +0000 Charles <charles.b.jackson@protonmail.com> wrote:
Toggle quote (4 lines)
> > 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.
C
C
Charles wrote on 14 Dec 2022 06:06
Add sbcl-triads:bin patch
(name . 59052@debbugs.gnu.org)(address . 59052@debbugs.gnu.org)
Gr00qpvxXaA26zR5ZQ3YKkF9wvOPvrEYi547mxtJPg74AF0EKowpOvLr02aH4y5ol9H-dc0v6NYdoVeMPi6Go1kSGdGDNRnzFTi1t4CTnjI=@proton.me
It seems like a :bin suffix is the usuall way. This also opens up the possibility of ecl-triads:bin, and even ccl-triads:bin, clasp-triads:bin, abcl-triads:bin.
From 3ac729c376dd25d4f7295d237d0f25e3abd63a5f Mon Sep 17 00:00:00 2001
From: Charles <charles.b.jackson@protonmail.com>
Date: Tue, 13 Dec 2022 22:56:23 -0600
Subject: [PATCH] gnu: sbcl-triads: Add bin output.

* gnu/packages/lisp-xyz.scm (sbcl-triads): Add phase to build and install
binary executable (build-binary).

* gnu/packages/lisp-xyz.scm (ecl-triads): Remove the build-binary phase
because this program has not been tested on ECL upstream.
---
gnu/packages/lisp-xyz.scm | 29 +++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)

Toggle diff (50 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 364be8c7a5..fd1b9b82f4 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -26264,8 +26264,25 @@ (define-public sbcl-triads
(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))
+ (system*
+ "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 @@ (define-public cl-triads
(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.
--
2.38.1
G
G
Guillaume Le Vaillant wrote on 19 Dec 2022 14:25
(name . Charles)(address . Charles.b.jackson@proton.me)(address . 59052-done@debbugs.gnu.org)
87sfhbplrl.fsf@kitej
Patch pushed as 89a8534b425817640c3e168399543b7f6e10b5a7.
Thanks.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCY6Bmjg8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j8W9wEAnitgS3XDFcQM6b8iOIiTtyphGl29XJfWUX+r
crDpDLkA/AvklBBjLYdHPBv6HM0KV/ctv/ChHil5APItUHj+/V7S
=1VbH
-----END PGP SIGNATURE-----

Closed
?