[PATCH 0/2] gnu: Add cl-coleslaw.

  • Done
  • quality assurance status badge
Details
2 participants
  • Guillaume Le Vaillant
  • Paul A. Patience
Owner
unassigned
Submitted by
Paul A. Patience
Severity
normal
P
P
Paul A. Patience wrote on 18 Dec 2022 04:40
(address . guix-patches@gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20221218034033.366963-1-paul@apatience.com
Hi,

This patch series adds the Common Lisp static site generator called Coleslaw.
I tried to use G-expressions for the arguments field, but writing

Toggle snippet (3 lines)
#:asd-systems #~'("coleslaw" "coleslaw-cli")

results in a stacktrace and the following error:

Toggle snippet (4 lines)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure cdr: Wrong type argument in position 1 (expecting pair): #<gexp (quote ("coleslaw" "coleslaw-cli")) /home/paul/external/guix/gnu/packages/lisp-xyz.scm:781:28 7f28ea908270>

which I cannot decipher.

Cheers,

Paul A. Patience (2):
gnu: Add cl-closure-template.
gnu: Add cl-coleslaw.

gnu/packages/lisp-xyz.scm | 104 ++++++++++++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)

--
2.38.1
P
P
Paul A. Patience wrote on 18 Dec 2022 04:43
[PATCH 1/2] gnu: Add cl-closure-template.
(address . 60172@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20221218034303.367244-1-paul@apatience.com
* gnu/packages/lisp-xyz.scm (sbcl-closure-template, cl-closure-template,
ecl-closure-template): New variables.
---
gnu/packages/lisp-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (49 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index c0a5436958..6c31639742 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -22758,6 +22758,44 @@ (define-public cl-template
(define-public ecl-cl-template
(sbcl-package->ecl-package sbcl-cl-template))

+(define-public sbcl-closure-template
+ (let ((commit "f1983aa525045691e128027d2a2d74831c873d6e")
+ (revision "0"))
+ (package
+ (name "sbcl-closure-template")
+ (version (git-version "0.2.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/archimag/cl-closure-template")
+ (commit commit)))
+ (file-name (git-file-name "cl-closure-template" version))
+ (sha256
+ (base32 "16h0fs6bjjd4n9pbkwcprpgyj26vsw2akk3q08m7xmsmqi05dppv"))))
+ (build-system asdf-build-system/sbcl)
+ (native-inputs
+ (list sbcl-lift))
+ (inputs
+ (list sbcl-alexandria
+ sbcl-babel
+ sbcl-closer-mop
+ sbcl-esrap
+ sbcl-iterate
+ sbcl-parse-number
+ sbcl-split-sequence))
+ (home-page "https://github.com/archimag/cl-closure-template")
+ (synopsis "Common Lisp implementation of Google's Closure Templates")
+ (description "@code{cl-closure-template} is a Common Lisp library that
+implements Google's Closure Templates.")
+ (license license:llgpl))))
+
+(define-public cl-closure-template
+ (sbcl-package->cl-source-package sbcl-closure-template))
+
+(define-public ecl-closure-template
+ (sbcl-package->ecl-package sbcl-closure-template))
+
(define-public sbcl-fast-websocket
(let ((commit "baeeaddf1447015863d708f840ef9dfc5ff5b7a2")
(revision "1"))
--
2.38.1
P
P
Paul A. Patience wrote on 18 Dec 2022 04:43
[PATCH 2/2] gnu: Add cl-coleslaw.
(address . 60172@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20221218034303.367244-2-paul@apatience.com
* gnu/packages/lisp-xyz.scm (sbcl-coleslaw, cl-coleslaw, ecl-coleslaw):
New variables.
---
gnu/packages/lisp-xyz.scm | 66 +++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)

Toggle diff (84 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 6c31639742..4901d5dd39 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -103,6 +103,7 @@ (define-module (gnu packages lisp-xyz)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages rsync)
#:use-module (gnu packages sdl)
#:use-module (gnu packages serialization)
#:use-module (gnu packages sqlite)
@@ -759,6 +760,71 @@ (define-public cl-irc
(define-public ecl-cl-irc
(sbcl-package->ecl-package sbcl-cl-irc))

+(define-public sbcl-coleslaw
+ (let ((commit "e7e68ce6020d13b14bf212890a7d8973d7af3b40")
+ (revision "0"))
+ (package
+ (name "sbcl-coleslaw")
+ (version (git-version "0.9.7" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/coleslaw-org/coleslaw")
+ (commit commit)))
+ (file-name (git-file-name "cl-coleslaw" version))
+ (sha256
+ (base32 "1w21a272q4x7nlr4kbmwwvkjvb4hpnw869byvy47vv361y7pimws"))))
+ (build-system asdf-build-system/sbcl)
+ (outputs '("out" "bin"))
+ (arguments
+ '(#:asd-systems '("coleslaw" "coleslaw-cli")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda _
+ (substitute* "plugins/publish-gh-pages.sh"
+ (("^rsync\\b") (which "rsync")))
+ (substitute* '("plugins/rsync.lisp"
+ "src/coleslaw.lisp")
+ (("\\brun-program \"rsync\\b")
+ (string-append "run-program \"" (which "rsync"))))))
+ (add-after 'create-asdf-configuration 'build-program
+ (lambda* (#:key outputs #:allow-other-keys)
+ (build-program
+ (string-append (assoc-ref outputs "bin") "/bin/coleslaw")
+ outputs
+ #:dependencies '("coleslaw-cli")
+ #:entry-program '((apply (function coleslaw-cli::main)
+ arguments))
+ #:compress? #t))))))
+ (native-inputs
+ (list sbcl-prove))
+ (inputs
+ (list rsync
+ sbcl-3bmd
+ sbcl-alexandria
+ sbcl-cl-fad
+ sbcl-cl-ppcre
+ sbcl-cl-unicode
+ sbcl-clack
+ sbcl-closer-mop
+ sbcl-closure-template
+ sbcl-inferior-shell
+ sbcl-local-time
+ sbcl-trivia))
+ (home-page "https://github.com/coleslaw-org/coleslaw")
+ (synopsis "Static site generator")
+ (description
+ "Coleslaw is a static site generator written in Common Lisp.")
+ (license license:bsd-2))))
+
+(define-public cl-coleslaw
+ (sbcl-package->cl-source-package sbcl-coleslaw))
+
+(define-public ecl-coleslaw
+ (sbcl-package->ecl-package sbcl-coleslaw))
+
(define-public sbcl-tripod
(let ((commit "bcea16610b4961a927e417e4413fffe686d71c83")
(revision "0"))
--
2.38.1
G
G
Guillaume Le Vaillant wrote on 19 Dec 2022 14:29
Re: [bug#60172] [PATCH 0/2] gnu: Add cl-coleslaw.
(name . Paul A. Patience)(address . paul@apatience.com)(address . 60172-done@debbugs.gnu.org)
87fsdbplgk.fsf@kitej
"Paul A. Patience" <paul@apatience.com> skribis:

Toggle quote (19 lines)
> Hi,
>
> This patch series adds the Common Lisp static site generator called Coleslaw.
> I tried to use G-expressions for the arguments field, but writing
>
> --8<---------------cut here---------------start------------->8---
> #:asd-systems #~'("coleslaw" "coleslaw-cli")
> --8<---------------cut here---------------end--------------->8---
>
>
> results in a stacktrace and the following error:
>
> --8<---------------cut here---------------start------------->8---
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> In procedure cdr: Wrong type argument in position 1 (expecting pair): #<gexp (quote ("coleslaw" "coleslaw-cli")) /home/paul/external/guix/gnu/packages/lisp-xyz.scm:781:28 7f28ea908270>
> --8<---------------cut here---------------end--------------->8---
>
> which I cannot decipher.

Maybe #~(list "coleslaw" "coleslaw-cli") would have worked...


Toggle quote (7 lines)
> Paul A. Patience (2):
> gnu: Add cl-closure-template.
> gnu: Add cl-coleslaw.
>
> gnu/packages/lisp-xyz.scm | 104 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 104 insertions(+)

cl-closure-template is already in Guix (added in
608999be5951588c100fb527df7cb21a3e478468), so I only pushed the second
patch as 2565616ab3635eae1161a97974e80928400ae624.
Thanks.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCY6BoGw8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j82cwD8CCrefzHJv5WRe7bLJt5D5bvIOWINZEENOXZq
jlN6pXsA/i6oLqkhkaZFoLQjkH2Ntbq7okPX2+FIFET+cGaPin7C
=TDDY
-----END PGP SIGNATURE-----

Closed
?