Subject: bug#74649: closed (Re: [bug#74573] [PATCH v2] gnu: artanis: update to 1.0.0.)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 26 Dec 2024 22:24:03 +0000

Your bug report

#74573: [PATCH] Update Artanis to 1.0.0

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
74573: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74573
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#74573] [PATCH v2] gnu: artanis: update to 1.0.0.
From: Ludovic Courtès <[email-masked]>
To: Andy Tai <[email-masked]>
Cc: [email-masked], [email-masked], [email-masked]
Date: Thu, 26 Dec 2024 23:22:46 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Andy Tai <[email-masked]> skribis:

> * gnu/packages/guile-xyz.scm (artanis): update to 1.0.0.
> [source]: Remove code removing non-existent old directories.
> [arguments]<#:configure-flags>: Add aarch64 specific flag.
>
> Change-Id: I27b38eaff75cda008ae7de3eceb84dc5b7bf01aa

[...]

>      (arguments
> -     `(#:modules (((guix build guile-build-system)
> +     `(#:configure-flags
> +       '( ,@(if (target-aarch64?) '("--build=aarch64-unknown-linux-gnu") '()))

Applied without the #:configure-flags above since that’s already exactly
what happens by default.

Thanks,
Ludo’.

Subject: [PATCH] Update Artanis to 1.0.0
From: Josep Bigorra <[email-masked]>
To: [email-masked]
Date: Mon, 2 Dec 2024 14:03:42 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi all! I am submitting an update to Artanis, after noticing on Guix
an old version is in the repos.
Hope I didn't miss anything, thanks in advance!

Regards,
Joe
From 2d3c7348ae8a87a6e2d0e921e14768ecf632ca6a Mon Sep 17 00:00:00 2001
Message-ID: <2[email-masked]>
From: Josep Bigorra <[email-masked]>
Date: Mon, 2 Dec 2024 14:01:30 +0100
Subject: [PATCH] update artanis to 1.0.0

---
 gnu/packages/guile-xyz.scm | 232 ++++++++++++++++++-------------------
 1 file changed, 114 insertions(+), 118 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index a21289d368..4db3899352 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -51,6 +51,7 @@
 ;;; Copyright © 2024 Artyom Bologov <[email-masked]>
 ;;; Copyright © 2024 Felix Lechner <[email-masked]>
 ;;; Copyright © 2024 Alec Barreto <[email-masked]>
+;;; Copyright © 2024 Josep Bigorra <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -148,122 +149,117 @@ (define-module (gnu packages guile-xyz)
 
 (define-public artanis
   (package
-    (name "artanis")
-    (version "0.6")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/artanis/artanis-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "1y4mf8vv2fwjg4z8c4d7an5rxi96sh7krk0djnafm2l66i97cj3m"))
-              (modules '((guix build utils)))
-              (snippet
-               '(begin
-                  ;; Unbundle guile-redis and guile-json
-                  (delete-file-recursively "artanis/third-party/json.scm")
-                  (delete-file-recursively "artanis/third-party/json")
-                  (delete-file-recursively "artanis/third-party/redis.scm")
-                  (delete-file-recursively "artanis/third-party/redis")
-                  (substitute* '("artanis/artanis.scm"
-                                 "artanis/lpc.scm"
-                                 "artanis/oht.scm"
-                                 "artanis/tpl/parser.scm")
-                    (("(#:use-module \\()artanis third-party (json\\))" _
-                      use-module json)
-                     (string-append use-module json)))
-                  (substitute* '("artanis/lpc.scm"
-                                 "artanis/session.scm")
-                    (("(#:use-module \\()artanis third-party (redis\\))" _
-                      use-module redis)
-                     (string-append use-module redis)))
-                  (substitute* "artanis/oht.scm"
-                    (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
-                      _ pre json-string post)
-                     (string-append pre
-                                    "scm" json-string
-                                    post)))
-                  (substitute* "artanis/artanis.scm"
-                    (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
-                     ""))
-                  #t))))
-    (build-system gnu-build-system)
-    (inputs
-     (list bash-minimal guile-3.0 nspr nss))
-    ;; FIXME the bundled csv contains one more exported procedure
-    ;; (sxml->csv-string) than guile-csv. The author is maintainer of both
-    ;; projects.
-    ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
-    (propagated-inputs
-     (list guile-json-3 guile-curl guile-readline guile-redis))
-    (native-inputs
-     (list bash-minimal                           ;for the `source' builtin
-           pkg-config
-           util-linux))                           ;for the `script' command
-    (arguments
-     `(#:modules (((guix build guile-build-system)
-                   #:select (target-guile-effective-version))
-                  ,@%default-gnu-modules)
-       #:imported-modules ((guix build guile-build-system)
-                           ,@%default-gnu-imported-modules)
-       #:make-flags
-       ;; TODO: The documentation must be built with the `docs' target.
-       (let* ((out (assoc-ref %outputs "out"))
-              ;; We pass guile explicitly here since this executes before the
-              ;; set-paths phase and therefore guile is not yet in PATH.
-              (effective-version (target-guile-effective-version
-                                  (assoc-ref %build-inputs "guile")))
-              (scm (string-append out "/share/guile/site/" effective-version))
-              (go (string-append out "/lib/guile/" effective-version "/site-ccache")))
-         ;; Don't use (%site-dir) for site paths.
-         (list (string-append "MOD_PATH=" scm)
-               (string-append "MOD_COMPILED_PATH=" go)))
-       #:test-target "test"
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-site-dir
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "artanis/commands/help.scm"
-               (("\\(%site-dir\\)")
-                (string-append "\""
-                               (assoc-ref outputs "out")
-                               "/share/guile/site/"
-                               (target-guile-effective-version)
-                               "\"")))))
-         (add-after 'unpack 'patch-reference-to-libnss
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "artanis/security/nss.scm"
-               (("ffi-binding \"libnss3\"")
-                (string-append
-                 "ffi-binding \""
-                 (assoc-ref inputs "nss") "/lib/nss/libnss3.so"
-                 "\""))
-               (("ffi-binding \"libssl3\"")
-                (string-append
-                 "ffi-binding \"" (assoc-ref inputs "nss") "/lib/nss/libssl3.so\"")))))
-         (add-before 'install 'substitute-root-dir
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out  (assoc-ref outputs "out")))
-               (substitute* "Makefile"   ;ignore the execution of bash.bashrc
-                 ((" /etc/bash.bashrc") " /dev/null"))
-               (substitute* "Makefile"   ;set the root of config files to OUT
-                 ((" /etc") (string-append " " out "/etc")))
-               (mkdir-p (string-append out "/bin")) )))
-         (add-after 'install 'wrap-art
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (effective-version (target-guile-effective-version))
-                    (bin (string-append out "/bin"))
-                    (scm (string-append out "/share/guile/site/" effective-version))
-                    (go (string-append out "/lib/guile/" effective-version
-                                       "/site-ccache")))
-               (wrap-program (string-append bin "/art")
-                 `("GUILE_LOAD_PATH" ":" prefix
-                   (,scm ,(getenv "GUILE_LOAD_PATH")))
-                 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
-                   (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))))))))
-    (synopsis "Web application framework written in Guile")
-    (description "GNU Artanis is a web application framework written in Guile
+   (name "artanis")
+   (version "1.0.0")
+   (source (origin
+            (method url-fetch)
+            (uri (string-append "mirror://gnu/artanis/artanis-"
+                                version ".tar.gz"))
+            (sha256
+             (base32
+              "05sigqvm04x0r1gwpwrxjffb3i13bss3ff24frr477zqm54wv5d8"))
+            (modules '((guix build utils)))
+            (snippet
+             '(begin
+                (substitute* '("artanis/artanis.scm"
+                               "artanis/lpc.scm"
+                               "artanis/oht.scm"
+                               "artanis/tpl/parser.scm")
+                             (("(#:use-module \\()artanis third-party (json\\))" _
+                               use-module json)
+                              (string-append use-module json)))
+                (substitute* '("artanis/lpc.scm"
+                               "artanis/session.scm")
+                             (("(#:use-module \\()artanis third-party (redis\\))" _
+                               use-module redis)
+                              (string-append use-module redis)))
+                (substitute* "artanis/oht.scm"
+                             (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
+                               _ pre json-string post)
+                              (string-append pre
+                                             "scm" json-string
+                                             post)))
+                (substitute* "artanis/artanis.scm"
+                             (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
+                              ""))
+                #t))))
+   (build-system gnu-build-system)
+   (inputs
+    (list bash-minimal guile-3.0 nspr nss))
+   ;; FIXME the bundled csv contains one more exported procedure
+   ;; (sxml->csv-string) than guile-csv. The author is maintainer of both
+   ;; projects.
+   ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
+   (propagated-inputs
+    (list guile-json-4 guile-curl guile-readline guile-redis))
+   (native-inputs
+    (list bash-minimal                           ;for the `source' builtin
+          pkg-config
+          util-linux))                           ;for the `script' command
+   (arguments
+    `(#:modules (((guix build guile-build-system)
+                  #:select (target-guile-effective-version))
+                 ,@%default-gnu-modules)
+      #:imported-modules ((guix build guile-build-system)
+                          ,@%default-gnu-imported-modules)
+      #:make-flags
+      ;; TODO: The documentation must be built with the `docs' target.
+      (let* ((out (assoc-ref %outputs "out"))
+             ;; We pass guile explicitly here since this executes before the
+             ;; set-paths phase and therefore guile is not yet in PATH.
+             (effective-version (target-guile-effective-version
+                                 (assoc-ref %build-inputs "guile")))
+             (scm (string-append out "/share/guile/site/" effective-version))
+             (go (string-append out "/lib/guile/" effective-version "/site-ccache")))
+        ;; Don't use (%site-dir) for site paths.
+        (list (string-append "MOD_PATH=" scm)
+              (string-append "MOD_COMPILED_PATH=" go)))
+      #:test-target "test"
+      #:phases
+      (modify-phases %standard-phases
+                     (add-after 'unpack 'patch-site-dir
+                                (lambda* (#:key outputs #:allow-other-keys)
+                                  (substitute* "artanis/commands/help.scm"
+                                               (("\\(%site-dir\\)")
+                                                (string-append "\""
+                                                               (assoc-ref outputs "out")
+                                                               "/share/guile/site/"
+                                                               (target-guile-effective-version)
+                                                               "\"")))))
+                     (add-after 'unpack 'patch-reference-to-libnss
+                                (lambda* (#:key inputs #:allow-other-keys)
+                                  (substitute* "artanis/security/nss.scm"
+                                               (("ffi-binding \"libnss3\"")
+                                                (string-append
+                                                 "ffi-binding \""
+                                                 (assoc-ref inputs "nss") "/lib/nss/libnss3.so"
+                                                 "\""))
+                                               (("ffi-binding \"libssl3\"")
+                                                (string-append
+                                                 "ffi-binding \"" (assoc-ref inputs "nss") "/lib/nss/libssl3.so\"")))))
+                     (add-before 'install 'substitute-root-dir
+                                 (lambda* (#:key outputs #:allow-other-keys)
+                                   (let ((out  (assoc-ref outputs "out")))
+                                     (substitute* "Makefile"   ;ignore the execution of bash.bashrc
+                                                  ((" /etc/bash.bashrc") " /dev/null"))
+                                     (substitute* "Makefile"   ;set the root of config files to OUT
+                                                  ((" /etc") (string-append " " out "/etc")))
+                                     (mkdir-p (string-append out "/bin")) )))
+                     (add-after 'install 'wrap-art
+                                (lambda* (#:key inputs outputs #:allow-other-keys)
+                                  (let* ((out (assoc-ref outputs "out"))
+                                         (effective-version (target-guile-effective-version))
+                                         (bin (string-append out "/bin"))
+                                         (scm (string-append out "/share/guile/site/" effective-version))
+                                         (go (string-append out "/lib/guile/" effective-version
+                                                            "/site-ccache")))
+                                    (wrap-program (string-append bin "/art")
+                                                  `("GUILE_LOAD_PATH" ":" prefix
+                                                    (,scm ,(getenv "GUILE_LOAD_PATH")))
+                                                  `("GUILE_LOAD_COMPILED_PATH" ":" prefix
+                                                    (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))))))))
+   (synopsis "Web application framework written in Guile")
+   (description "GNU Artanis is a web application framework written in Guile
 Scheme.  A web application framework (WAF) is a software framework that is
 designed to support the development of dynamic websites, web applications, web
 services and web resources.  The framework aims to alleviate the overhead
@@ -271,8 +267,8 @@ (define-public artanis
 provides several tools for web development: database access, templating
 frameworks, session management, URL-remapping for RESTful, page caching, and
 more.")
-    (home-page "https://www.gnu.org/software/artanis/")
-    (license (list license:gpl3+ license:lgpl3+)))) ;dual license
+   (home-page "https://www.gnu.org/software/artanis/")
+   (license (list license:gpl3+ license:lgpl3+)))) ;dual license
 
 (define-public guilescript
   (package
-- 
2.46.0