On 2019-01-03 22:39, swedebugia wrote:
> On 2019-01-03 20:19, Christopher Baines wrote:
>>
>> swedebugia <[email protected]> writes:
>>
>>> On 2019-01-02 22:50, swedebugia wrote:
>>>> On 2018-12-31 13:33, Ricardo Wurmus wrote:
>>>>>
>>>>> Hi swedebugia,
>>>>>
>>>>>> We should upgrade.
>>>>>
>>>>> Could you please send a patch?
>>>>>
>>>>
>>>> Here it is :)
>>
>> I haven't looked too closely at the patch, but I think the newer version
>> of Artanis have bundled guile-redis (or something like that), so it
>> would be good to look at unbundling it, similar to how guile-json is
>> handled.
>>
> 
> Thanks for the review. :)
> 
> Correct. Redis is bundled an I did not unbundle it. Even guile-csv is 
> bundled, but we have not packaged it yet.
> 
> I will try unbundling and send a new patch.

Done. Is this ready to merge? (I gave up on moving it. Maybe the
committer can do this?)

-- 
Cheers 
Swedebugia
From b0453ad329d4b22bc70f90de0bea16ac612d4834 Mon Sep 17 00:00:00 2001
From: swedebugia <[email protected]>
Date: Fri, 4 Jan 2019 21:20:46 +0100
Subject: [PATCH] gnu: artanis: Update to 0.3.1.

* gnu/packages/guile.scm (artanis): Update it. Added note about
  guile-csv.
---
 gnu/packages/guile.scm | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 5a3ce4401..2507375b4 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -528,7 +528,7 @@ program can be installed in one go.")
 ;;;
 
 (define-public artanis
-  (let ((release "0.2.1")
+  (let ((release "0.3.1")
 	(revision 3))
     (package
       (name "artanis")
@@ -543,17 +543,26 @@ program can be installed in one go.")
                 (file-name (string-append name "-" version ".tar.gz"))
                 (sha256
                  (base32
-                  "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn"))
+                  "0hqr5m3mb558bdhkc2sadmd9cbrhp3y525wx7cwirgy6i0zmay68"))
                 (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")
                       (("(#: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)
@@ -565,9 +574,14 @@ program can be installed in one go.")
                        ""))
                     #t))))
       (build-system gnu-build-system)
+      ;; 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.
       (inputs `(("guile" ,guile-2.2)
-                ("guile-json" ,guile-json)))
+                ("guile-json" ,guile-json)
+                ("guile-redis" ,guile-redis)))
       (native-inputs `(("bash"       ,bash)         ;for the `source' builtin
                        ("pkgconfig"  ,pkg-config)
                        ("util-linux" ,util-linux))) ;for the `script' command
@@ -601,7 +615,13 @@ program can be installed in one go.")
                  (wrap-program (string-append bin "/art")
                    `("GUILE_LOAD_PATH" ":" prefix (,scm))
                    `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,go)))
-                 #t))))))
+                 #t)))
+           (delete 'strip))))
+      ;; native-search-paths are needed but left out because we propagate it
+      ;; from the installation of guile.
+      ;; On foreign distributions you have to set this manually no matter if
+      ;; you installed guile with guix or not. On GuixSD it should be set
+      ;; correctly automatically (Guile is always installed there)
       (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
-- 
2.19.2

Reply via email to