bug#33932: [PATCH] gnu: artanis: Move to web.scm and update to 0.3.1. (was: Re: bug#33932: Artanis fails to build - 0.3.1 is out)

2019-01-03 Thread Christopher Baines

swedebugia  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.


signature.asc
Description: PGP signature


bug#33932: [PATCH] gnu: artanis: Move to web.scm and update to 0.3.1. (was: Re: bug#33932: Artanis fails to build - 0.3.1 is out)

2019-01-03 Thread Ricardo Wurmus


Hi swedebugia,

> From a7f0c26705aad362acc35e632bed2dcc9e32d004 Mon Sep 17 00:00:00 2001
> From: swedebugia 
> Date: Wed, 2 Jan 2019 23:47:07 +0100
> Subject: [PATCH] gnu: artanis: Move to web.scm and update to 0.3.1.
>
> * gnu/packages/guile.scm (artanis): Move from here...
> * gnu/packages/web.scm (artanis): To here and Update to 0.3.1.

Thanks.

Unfortunately, this patch contains a lot of unrelated changes, as you
can see here:

>  gnu/packages/guile.scm | 360 +++--
>  gnu/packages/web.scm   |  95 +++
>  2 files changed, 368 insertions(+), 87 deletions(-)

Please also split the upgrade from moving the package definition to
another file.

--
Ricardo





bug#33932: [PATCH] gnu: artanis: Move to web.scm and update to 0.3.1. (was: Re: bug#33932: Artanis fails to build - 0.3.1 is out)

2019-01-02 Thread swedebugia

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 :)




--
Cheers Swedebugia
>From a7f0c26705aad362acc35e632bed2dcc9e32d004 Mon Sep 17 00:00:00 2001
From: swedebugia 
Date: Wed, 2 Jan 2019 23:47:07 +0100
Subject: [PATCH] gnu: artanis: Move to web.scm and update to 0.3.1.

* gnu/packages/guile.scm (artanis): Move from here...
* gnu/packages/web.scm (artanis): To here and Update to 0.3.1.
---
 gnu/packages/guile.scm | 360 +++--
 gnu/packages/web.scm   |  95 +++
 2 files changed, 368 insertions(+), 87 deletions(-)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 07b568ee7..998090c75 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -527,93 +527,6 @@ program can be installed in one go.")
 ;;; Extensions.
 ;;;
 
-(define-public artanis
-  (let ((release "0.2.1")
-	(revision 3))
-(package
-  (name "artanis")
-  (version (if (zero? revision)
-   release
-   (string-append release "-"
-  (number->string revision
-  (source (origin
-(method url-fetch)
-(uri (string-append "mirror://gnu/artanis/artanis-"
-release ".tar.gz"))
-(file-name (string-append name "-" version ".tar.gz"))
-(sha256
- (base32
-  "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn"))
-(modules '((guix build utils)))
-(snippet
- '(begin
-(delete-file-recursively "artanis/third-party/json.scm")
-(delete-file-recursively "artanis/third-party/json")
-(substitute* '("artanis/artanis.scm"
-   "artanis/oht.scm")
-  (("(#:use-module \\()artanis third-party (json\\))" _
-use-module json)
-   (string-append use-module json)))
-(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)
-  ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
-  (inputs `(("guile" ,guile-2.2)
-("guile-json" ,guile-json)))
-  (native-inputs `(("bash"   ,bash) ;for the `source' builtin
-   ("pkgconfig"  ,pkg-config)
-   ("util-linux" ,util-linux))) ;for the `script' command
-  (arguments
-   '(#:make-flags
- ;; TODO: The documentation must be built with the `docs' target.
- (let* ((out (assoc-ref %outputs "out"))
-(scm (string-append out "/share/guile/site/2.2"))
-(go  (string-append out "/lib/guile/2.2/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-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")) ;for the `art' executable
- #t)))
-   (add-after 'install 'wrap-art
- (lambda* (#:key outputs #:allow-other-keys)
-   (let* ((out (assoc-ref outputs "out"))
-  (bin (string-append out "/bin"))
-  (scm (string-append out "/share/guile/site/2.2"))
-  (go  (string-append out "/lib/guile/2.2/site-ccache")))
- (wrap-program (string-append bin "/art")
-   `("GUILE_LOAD_PATH" ":" prefix (,scm))
-   `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,go)))
- #t))
-  (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 d