[PATCH 0/6] Add cl-clog and its missing dependencies

  • Open
  • quality assurance status badge
Details
3 participants
  • Guillaume Le Vaillant
  • Maxime Devos
  • Aurora
Owner
unassigned
Submitted by
Aurora
Severity
normal
A
A
Aurora wrote on 6 Mar 2022 04:33
(address . guix-patches@gnu.org)(name . Aurora)(address . rind38@disroot.org)
20220306033338.3363-1-rind38@disroot.org
Packaging cl-clog or Clog into Guix.

Build tests work for those dependencies which have them, and Clog's
provided demos work.

Aurora (6):
gnu: Add cl-template
gnu: Add cl-fast-websocket
gnu: Add cl-event-emitter
gnu: Add cl-sha1
gnu: Add cl-websocket-driver
gnu: Add cl-clog

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


base-commit: 0c6bf910efd090f0aa0479ba727e5e68655e9b68
--
2.30.2
A
A
Aurora wrote on 6 Mar 2022 04:33
[PATCH 1/6] gnu: Add cl-template
(address . guix-patches@gnu.org)(name . Aurora)(address . rind38@disroot.org)
20220306033338.3363-2-rind38@disroot.org
---
gnu/packages/lisp-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index a4c0317..17acbc2 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20675,3 +20675,33 @@ change since last write.
(inputs
(cons (list "iolib" cl-iolib)
(package-inputs sbcl-nfiles)))))
+
+(define-public sbcl-cl-template
+ (let ((commit "46193a9a389bb950530e579eae7e6e5a18184832")
+ (revision "0"))
+ (package
+ (name "sbcl-cl-template")
+ (version (git-version "0.0.1" revision commit))
+ (home-page "https://github.com/alpha123/cl-template")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit commit)))
+ (sha256
+ (base32
+ "1rhg023a2nxsk5x6abd6i0a8sh36aj0bgsh80w60m3b7xlsva2x2"))))
+ (build-system asdf-build-system/sbcl)
+ (native-inputs
+ (list sbcl-fiveam))
+ (synopsis "Simple, output-agnostic template engine for Common Lisp, inspired by ERb")
+ (description "cl-template is yet another template engine for Common Lisp,
+taking inspiration from Ruby's ERb module.")
+ (license license:expat))))
+
+(define-public cl-template
+ (sbcl-package->cl-source-package sbcl-cl-template))
+
+(define-public ecl-cl-template
+ (sbcl-package->ecl-package sbcl-cl-template))
--
2.30.2
A
A
Aurora wrote on 6 Mar 2022 04:33
[PATCH 2/6] gnu: Add cl-fast-websocket
(address . guix-patches@gnu.org)(name . Aurora)(address . rind38@disroot.org)
20220306033338.3363-3-rind38@disroot.org
---
gnu/packages/lisp-xyz.scm | 40 +++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 17acbc2..89b3474 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20705,3 +20705,43 @@ taking inspiration from Ruby's ERb module.")
(define-public ecl-cl-template
(sbcl-package->ecl-package sbcl-cl-template))
+
+(define-public sbcl-fast-websocket
+ (let ((commit "24c0217e7c0d25b6ef6ab799452cba0b9fb58f44")
+ (revision "0"))
+ (package
+ (name "sbcl-fast-websocket")
+ (version (git-version "0.1.0" revision commit))
+ (home-page "https://github.com/fukamachi/fast-websocket")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit commit)))
+ (sha256
+ (base32
+ "04sacrhpdp3ixvp6wjwxls5mv47g0q6542pd16yn199xjg0drw8a"))))
+ (build-system asdf-build-system/sbcl)
+ (arguments
+ ;; Test system must be loaded before, otherwise tests fail with:
+ ;; Component FAST-WEBSOCKET-ASD::FAST-WEBSOCKET-TEST not found, required by #<SYSTEM
+ ;; "fast-websocket">.
+ '(#:asd-systems '("fast-websocket-test"
+ "fast-websocket")))
+ (inputs
+ (list sbcl-fast-io
+ sbcl-babel
+ sbcl-alexandria))
+ (native-inputs
+ (list sbcl-prove
+ sbcl-trivial-utf-8))
+ (synopsis "Optimized low-level WebSocket protocol parser written in Common Lisp")
+ (description "Optimized low-level WebSocket protocol parser/composer.")
+ (license license:bsd-2))))
+
+(define-public cl-fast-websocket
+ (sbcl-package->cl-source-package sbcl-fast-websocket))
+
+(define-public ecl-fast-websocket
+ (sbcl-package->ecl-package sbcl-fast-websocket))
--
2.30.2
A
A
Aurora wrote on 6 Mar 2022 04:33
[PATCH 3/6] gnu: Add cl-event-emitter
(address . guix-patches@gnu.org)(name . Aurora)(address . rind38@disroot.org)
20220306033338.3363-4-rind38@disroot.org
---
gnu/packages/lisp-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 89b3474..bdfea95 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20745,3 +20745,33 @@ taking inspiration from Ruby's ERb module.")
(define-public ecl-fast-websocket
(sbcl-package->ecl-package sbcl-fast-websocket))
+
+(define-public sbcl-event-emitter
+ (let ((commit "cb0e15f9de4c617cef3f5d5a22a41e28f9613d0b")
+ (revision "0"))
+ (package
+ (name "sbcl-event-emitter")
+ (version (git-version "0.0.1" revision commit))
+ (home-page "https://github.com/fukamachi/event-emitter")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit commit)))
+ (sha256
+ (base32
+ "1i18xzfr6334db9dzj0lsl7wxw1r1l0ixvn883mjbyqw0czp21h6"))))
+ (build-system asdf-build-system/sbcl)
+ (native-inputs
+ (list sbcl-prove))
+ (synopsis "Event mechanism for Common Lisp objects")
+ (description "Event Emitter provides an event mechanism like Node.js for
+Common Lisp objects. Mostly ported from Node.js 'events' module.")
+ (license license:bsd-2))))
+
+(define-public cl-event-emitter
+ (sbcl-package->cl-source-package sbcl-event-emitter))
+
+(define-public ecl-event-emitter
+ (sbcl-package->ecl-package sbcl-event-emitter))
--
2.30.2
A
A
Aurora wrote on 6 Mar 2022 04:33
[PATCH 4/6] gnu: Add cl-sha1
(address . guix-patches@gnu.org)(name . Aurora)(address . rind38@disroot.org)
20220306033338.3363-5-rind38@disroot.org
---
gnu/packages/lisp-xyz.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index bdfea95..2c2c4a4 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20775,3 +20775,32 @@ Common Lisp objects. Mostly ported from Node.js 'events' module.")
(define-public ecl-event-emitter
(sbcl-package->ecl-package sbcl-event-emitter))
+
+(define-public sbcl-sha1
+ (let ((commit "be8b1b155c3a6ad3eb9b200212af6ff52f5611de")
+ (revision "0"))
+ (package
+ (name "sbcl-sha1")
+ (version (git-version "1.0.0" revision commit))
+ (home-page "https://github.com/massung/sha1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit commit)))
+ (sha256
+ (base32
+ "1cfn0j5yfwqkwr2dm73wr9hz8dmws3ngxlbk9886ahxkg544qx4z"))))
+ (build-system asdf-build-system/sbcl)
+ (synopsis "SHA1 Digest and HMAC for Common Lisp")
+ (description "A very simple implementation of SHA1 and HMAC-SHA1 for
+Common Lisp. The code is intended to be easy to follow and is therefore a
+little slower than it could be.")
+ (license license:asl2.0))))
+
+(define-public cl-sha1
+ (sbcl-package->cl-source-package sbcl-sha1))
+
+(define-public ecl-sha1
+ (sbcl-package->ecl-package sbcl-sha1))
--
2.30.2
A
A
Aurora wrote on 6 Mar 2022 04:33
[PATCH 5/6] gnu: Add cl-websocket-driver
(address . guix-patches@gnu.org)(name . Aurora)(address . rind38@disroot.org)
20220306033338.3363-6-rind38@disroot.org
---
gnu/packages/lisp-xyz.scm | 40 +++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 2c2c4a4..964817b 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20804,3 +20804,43 @@ little slower than it could be.")
(define-public ecl-sha1
(sbcl-package->ecl-package sbcl-sha1))
+
+(define-public sbcl-websocket-driver
+ (let ((commit "df94496ecb525d086eeada4f5875975515b7212e")
+ (revision "0"))
+ (package
+ (name "sbcl-websocket-driver")
+ (version (git-version "0.2.0" revision commit))
+ (home-page "https://github.com/fukamachi/websocket-driver")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit commit)))
+ (sha256
+ (base32
+ "0y852sqdnxfma6kw833by4wkgbgbv4ppzawjk8pk3y1pmh6is83y"))))
+ (build-system asdf-build-system/sbcl)
+ (inputs
+ (list sbcl-babel
+ sbcl-clack
+ sbcl-fast-http
+ sbcl-fast-io
+ sbcl-fast-websocket
+ sbcl-event-emitter
+ sbcl-sha1
+ sbcl-cl-base64
+ sbcl-split-sequence
+ sbcl-bordeaux-threads
+ sbcl-quri))
+ (synopsis "Simple, output-agnostic template engine for Common Lisp, inspired by ERb")
+ (description "cl-template is yet another template engine for Common Lisp,
+taking inspiration from Ruby's ERb module.")
+ (license license:expat))))
+
+(define-public cl-websocket-driver
+ (sbcl-package->cl-source-package sbcl-websocket-driver))
+
+(define-public ecl-websocket-driver
+ (sbcl-package->ecl-package sbcl-websocket-driver))
--
2.30.2
A
A
Aurora wrote on 6 Mar 2022 04:33
[PATCH 6/6] gnu: Add cl-clog
(address . guix-patches@gnu.org)(name . Aurora)(address . rind38@disroot.org)
20220306033338.3363-7-rind38@disroot.org
---
gnu/packages/lisp-xyz.scm | 51 +++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 964817b..e25f3ef 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20844,3 +20844,54 @@ taking inspiration from Ruby's ERb module.")
(define-public ecl-websocket-driver
(sbcl-package->ecl-package sbcl-websocket-driver))
+
+(define-public sbcl-clog
+ (let ((commit "v1.2")
+ (revision "0"))
+ (package
+ (name "sbcl-clog")
+ (version "1.2")
+ (home-page "https://github.com/rabbibotton/clog")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "0f4i6571nm0j704zgnh60sc9slifs11byb2gs8gamqjcfh931dap"))))
+ (build-system asdf-build-system/sbcl)
+ (inputs
+ (list sbcl-clack
+ sbcl-websocket-driver
+ sbcl-alexandria
+ sbcl-hunchentoot
+ sbcl-cl-ppcre
+ sbcl-bordeaux-threads
+ sbcl-trivial-open-browser
+ sbcl-parse-float
+ sbcl-quri
+ sbcl-lack
+ sbcl-mgl-pax
+ sbcl-cl-template
+ sbcl-closer-mop
+ sbcl-cl-sqlite
+ sbcl-dbi))
+ (native-inputs
+ (list sbcl-3bmd
+ sbcl-colorize))
+ (synopsis "CLOG - The Common Lisp Omnificent GUI")
+ (description "The Common Lisp Omnificent GUI, CLOG for short, uses web
+technology to produce graphical user interfaces for applications locally or
+remotely. CLOG can take the place, or work alongside, most cross-platform GUI
+frameworks and website frameworks. The CLOG package starts up the
+connectivity to the browser or other websocket client (often a browser
+embedded in a native template application.)")
+ (license license:bsd-3))))
+
+(define-public cl-clog
+ (sbcl-package->cl-source-package sbcl-clog))
+
+(define-public ecl-clog
+ (sbcl-package->ecl-package sbcl-clog))
--
2.30.2
A
A
Aurora wrote on 6 Mar 2022 04:55
Re: ([PATCH 0/6] Add cl-clog and its missing dependencies)
(address . 54268@debbugs.gnu.org)
87y21nbupc.fsf@disp3269
I noticed after packaging & submitting it that Clog does have vendored
copies of its JS dependencies.

I reckon that'll need fixing.
G
G
Guillaume Le Vaillant wrote on 8 Mar 2022 14:19
Re: [bug#54268] Add cl-clog and its missing dependencies
(name . Aurora)(address . rind38@disroot.org)(address . 54268@debbugs.gnu.org)
87sfrsa82j.fsf@kitej
Aurora via Guix-patches via <guix-patches@gnu.org> skribis:

Toggle quote (5 lines)
> I noticed after packaging & submitting it that Clog does have vendored
> copies of its JS dependencies.
>
> I reckon that'll need fixing.

Hi,

I pushed patches 1 to 5 as 3aa89989b084b65674cc603b393cd0144dd08abd and
following with a few modifications (harcoded git repository URLs, added
'file-name' fields, fixed some descriptions or license, added full
commit messages).

Concerning patch 6 adding cl-clog, I think you could first package
jQuery from https://jqueryui.com; then in the package definition for
cl-clog you could add a snippet removing the jQuery files and add
a phase creating links to the files from the jquery input.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYidZpA8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j991wD8C4Y93IaWoB2GuSOcDl4x56g0qguYBPGt7e3X
Z6nHA5IBAJzEbSFB+mAspGAGiNSpVEHjR0q/WNIOyfMMOn8zK3y6
=Kf0D
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 8 Mar 2022 19:29
Re: [bug#54268] [PATCH 6/6] gnu: Add cl-clog
cb340911570eca5a4e5b6c96513f78a9e0011aab.camel@telenet.be
Aurora via Guix-patches via schreef op zo 06-03-2022 om 03:33 [+0000]:
Toggle quote (16 lines)
> +(define-public sbcl-clog
> +  (let ((commit "v1.2")
> +        (revision "0"))
> +    (package
> +     (name "sbcl-clog")
> +     (version "1.2")
> +     (home-page "https://github.com/rabbibotton/clog")
> +     (source
> +      (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url home-page)
> +             (commit (string-append "v" version))))
> +       (sha256
> +        (base32

The variables 'commit' and 'revision' seem unused. Can they be
removed?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYiegfxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7i13AQCWvZtZuaDy+5Ru01dQXtFaaYoU
7oHOnJlCtZSbZ5JL2QD+PUg6ypVCLjE/NWMw+Sa/vqPfWJXlBHtdfFxyU+HTyAU=
=mcGE
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 8 Mar 2022 19:35
Re: [bug#54268] [PATCH 5/6] gnu: Add cl-websocket-driver
c04c49f81221c2ca03f4b91d57f3683229582006.camel@telenet.be
Aurora via Guix-patches via schreef op zo 06-03-2022 om 03:33 [+0000]:
Toggle quote (2 lines)
> +     (version (git-version "0.2.0" revision commit))

What's the reason for picking a commit from git instead of using
a released version?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYieh5RccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7no8AP9pnP34/MMVkmtSLtO967rAx8Zx
wNEszi1h81gH5jm8pwD/QXFbAHGlxBEpR30IJRzOm9whmjgFghlZ/OcJvihFjgc=
=5oZs
-----END PGP SIGNATURE-----


G
G
Guillaume Le Vaillant wrote on 8 Mar 2022 19:52
(name . Maxime Devos)(address . maximedevos@telenet.be)
877d949swm.fsf@kitej
Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (9 lines)
> Aurora via Guix-patches via schreef op zo 06-03-2022 om 03:33 [+0000]:
>> +     (version (git-version "0.2.0" revision commit))
>
> What's the reason for picking a commit from git instead of using
> a released version?
>
> Greetings,
> Maxime.

As far as I can see, the repository for websocket-driver doesn't have
any tag or release. Did you see a released version somewhere?
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYiemaQ8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j/KbAEAl+NyXqRLNjQV64j2U1m0L8wSVhj/yRxzkecA
mEAOfl4A/iTRSPfleigLl27jyifMM9UWCI1tvkiQa2cHnCrIifss
=90+b
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 8 Mar 2022 20:59
(name . Guillaume Le Vaillant)(address . glv@posteo.net)
eefaccb5b5e60f823443835928cb19ea8bd071ea.camel@telenet.be
Guillaume Le Vaillant schreef op di 08-03-2022 om 18:52 [+0000]:
Toggle quote (3 lines)
> As far as I can see, the repository for websocket-driver doesn't have
> any tag or release. Did you see a released version somewhere?

In websocket-driver.asd, there's a line 0.2.0, suggesting the use
of version numbers even if not tagged. It's from commit
which is seven year olds, though, so I guess that picking the latest
commit from git instead would be reasonable.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYie1oBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pqSAQDHikOt/1hU1TxmAdfdwF8FDYGg
HANPgUxLdGYzg3zfPAEAvGpWcUV5R8zu06of14XnJUrsTGPe4aQoCNbvoinSAQs=
=BRBR
-----END PGP SIGNATURE-----


A
A
Aurora wrote on 9 Mar 2022 21:51
(name . Maxime Devos)(address . maximedevos@telenet.be)
874k4697eh.fsf@disp3269
Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (10 lines)
> Guillaume Le Vaillant schreef op di 08-03-2022 om 18:52 [+0000]:
>> As far as I can see, the repository for websocket-driver doesn't have
>> any tag or release. Did you see a released version somewhere?
>
> In websocket-driver.asd, there's a line 0.2.0, suggesting the use
> of version numbers even if not tagged. It's from commit
> <https://github.com/fukamachi/websocket-driver/commit/f97d3c39ae91a7b994315e740a93ef461c82e672>,
> which is seven year olds, though, so I guess that picking the latest
> commit from git instead would be reasonable.

Yeah, the lack of proper version tagging & the presence of versioning
info in the ASD project files are why I manually added the 0.2.0 while
using a commit.

I added the commit plus the version info because a number of changes
occured since it switched versions.

That author's projects tend to remain fairly stable once they're done
with them, but they don't tag them as 1.0 or anything.
A
A
Aurora wrote on 9 Mar 2022 21:59
Re: [bug#54268] [PATCH 6/6] gnu: Add cl-clog
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54268@debbugs.gnu.org)
871qza970j.fsf@disp3269
Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (3 lines)
> The variables 'commit' and 'revision' seem unused. Can they be
> removed?

They could, I think that's an artifact of the package definition I used
as an example & forgot to remove. Sorry about that.

However I don't think I'll going ahead with packaging Clog right away
for now anyway. Noticing the jQuery vendoring was the start of the
troubles.

It has strong dependencies on Bootstrap (and so jQuery, despite not
using all that much directly by itself) & w3.css, which have significant
dependency chains to work through (a few hundred items). Currently it
vendors some of these dependencies and fetches some of those dynamically
online (it does use HTML integrity hashes but it's still not ideal).

It'll take some time to wrangle that.

Regards,
Aurora
?