all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Charles via Guix-patches via <guix-patches@gnu.org>
To: 50062@debbugs.gnu.org
Subject: [bug#50062] Add cl-yxorp-cli
Date: Sun, 15 Aug 2021 05:19:15 +0000	[thread overview]
Message-ID: <VkRithd8_9ZGnXvmFY4HQ7z-2wqr3-4y6ZoMbl0e7TTjxcIkmL2wSY8Qa_-PP4mai7aZib_WNX07My3ooo_qXjN7xezo7xKYxUbV8JzfHho=@protonmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 61 bytes --]

let me know if something is wrong or could be better: thanks.

[-- Attachment #1.2: Type: text/html, Size: 72 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-cl-yxorp-cli.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-cl-yxorp-cli.patch, Size: 4346 bytes --]

From f7273b53facac11165e91af80a182837a85c064a Mon Sep 17 00:00:00 2001
From: Charles <charles.b.jackson@protonmail.com>
Date: Sat, 14 Aug 2021 23:54:03 -0500
Subject: [PATCH] gnu: Add cl-yxorp-cli.

* gnu/packages/lisp-xyz.scm (sbcl-yxorp, ecl-yxorp, cl-yxorp): New variables.
* gnu/packages/web.scm (cl-yxorp-cli): New variable.
---
 gnu/packages/lisp-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++++
 gnu/packages/web.scm      | 34 ++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 38cc7d6695..e88f920ec2 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -18243,6 +18243,47 @@ functions allow Lisp programs to explore the web.")
 (define-public cl-aserve
   (sbcl-package->cl-source-package sbcl-aserve))
 
+(define-public sbcl-yxorp
+  (let ((commit "d2e8f9304549e47ae5c7fa35a6b114804603eac9")
+        (revision "1"))
+    (package
+      (name "sbcl-yxorp")
+      (version (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/charJe/cl-yxorp")
+               (commit commit)))
+         (file-name (git-file-name "cl-yxorp" version))
+         (sha256
+          (base32 "1zz1j678vzwkf817h2z0pf0fcyf4mldv4hiv1wyam58hd4bcrjsw"))))
+      (build-system asdf-build-system/sbcl)
+      (inputs
+       `(("cl+ssl" ,sbcl-cl+ssl)
+         ("cl-binding-arrows" ,sbcl-binding-arrows)
+         ("cl-str" ,sbcl-cl-str)
+         ("cl-usocket" ,sbcl-usocket)
+         ("flexi-streams" ,sbcl-flexi-streams)
+         ("trivial-garbage" ,sbcl-trivial-garbage)))
+      (home-page "https://github.com/charje/cl-yxorp")
+      (synopsis
+       "A reverse proxy server written in and configurable in Common Lisp.")
+      (description "It supports WebSocket, HTTP, HTTPS, HTTP to HTTPS
+redirecting, port and host forwarding configuration using a real programming
+language, HTTP header and body manipulation (also using a real programming
+language).")
+      (license license:agpl3))))
+
+(define-public ecl-yxorp
+  ;; Note that due to a bug in ECL this package does not build.
+  ;; The bug has already been fixed on the development branch,
+  ;; so this package will work work in the version after 21.2.1.
+  (sbcl-package->ecl-package sbcl-yxorp))x
+
+(define-public cl-yxorp
+  (sbcl-package->cl-source-package sbcl-yxorp))
+
 (define-public sbcl-rss
   ;; No release.
   (let ((commit "51d0145e91b86327ae5c36364f9c3048052e7a58"))
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index ff53333169..d499fa0299 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -141,6 +141,7 @@
   #:use-module (gnu packages libunistring)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages lisp)
   #:use-module (gnu packages lisp-xyz)
   #:use-module (gnu packages lsof)
   #:use-module (gnu packages lua)
@@ -893,6 +894,39 @@ memory footprint compared to other webservers.  Its features include FastCGI,
 CGI, authentication, output compression, URL rewriting and many more.")
     (license license:bsd-3)))
 
+(define-public cl-yxorp-cli
+  (package
+    (inherit sbcl-yxorp)
+    (name "cl-yxorp-cli")
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f
+       #:strip-binaries? #f
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'set-home
+           (lambda _
+             (setenv "HOME" "/tmp")
+             #t))
+         (replace 'build
+           (lambda _
+             (invoke
+              "sbcl" "--noinform"
+              "--disable-debugger"
+              "--no-userinit"
+              "--eval" "(require :asdf)"
+              "--eval" "(pushnew (uiop:getcwd) asdf:*central-registry*)"
+              "--load" "build.lisp")
+             #t))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+               (mkdir-p bin)
+               (install-file"cl-yxorp" bin))
+             #t)))))
+    (inputs (cons (list "sbcl" sbcl) (package-inputs sbcl-yxorp)))))
+
 (define-public fcgi
   (package
     (name "fcgi")
-- 
2.32.0


             reply	other threads:[~2021-08-15  5:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-15  5:19 Charles via Guix-patches via [this message]
2021-08-16  8:06 ` bug#50062: Add cl-yxorp-cli Guillaume Le Vaillant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='VkRithd8_9ZGnXvmFY4HQ7z-2wqr3-4y6ZoMbl0e7TTjxcIkmL2wSY8Qa_-PP4mai7aZib_WNX07My3ooo_qXjN7xezo7xKYxUbV8JzfHho=@protonmail.com' \
    --to=guix-patches@gnu.org \
    --cc=50062@debbugs.gnu.org \
    --cc=charles.b.jackson@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.