summary refs log tree commit diff
path: root/gnu/packages/guile.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-06-08 23:54:56 +0200
committerLudovic Courtès <ludo@gnu.org>2017-06-08 23:54:56 +0200
commitdfcd02c0f69a36bf91bfd1dfc9f8144fa6888df5 (patch)
tree043e2f60e47e1a687a917b05644c350dc0610c20 /gnu/packages/guile.scm
parentea4678a427b5c95f13a25faf4dca792f0bb9bbd8 (diff)
downloadguix-dfcd02c0f69a36bf91bfd1dfc9f8144fa6888df5.tar.gz
gnu: artanis: Update to 0.2.1.
* gnu/packages/guile.scm (artanis): Update to 0.2.1.
[inputs]: Switch to GUILE-2.2.
[arguments]: Adjust #:make-flags for Guile 2.2.  Take .go files from
lib/guile/2.2.  Add 'wrap-art' phase.
* gnu/packages/patches/artanis-fix-Makefile.in.patch: Remove.
* gnu/local.mk (dist_patch_DATA): Remove it.
Diffstat (limited to 'gnu/packages/guile.scm')
-rw-r--r--gnu/packages/guile.scm29
1 files changed, 19 insertions, 10 deletions
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index b9cd664604..b57f4c3b6c 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -387,18 +387,17 @@ program can be installed in one go.")
 (define-public artanis
   (package
     (name "artanis")
-    (version "0.1.2")
+    (version "0.2.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "ftp://alpha.gnu.org/gnu/artanis/artanis-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "19m3ak12cqk8js9d2mdg11kh4fjsq8frfpd10qw75h0zpr5cywpp"))
-              (patches (search-patches "artanis-fix-Makefile.in.patch"))))
+                "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn"))))
     (build-system gnu-build-system)
     ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
-    (inputs `(("guile" ,guile-2.0)))
+    (inputs `(("guile" ,guile-2.2)))
     (native-inputs `(("bash"       ,bash)         ;for the `source' builtin
                      ("pkgconfig"  ,pkg-config)
                      ("util-linux" ,util-linux))) ;for the `script' command
@@ -406,15 +405,15 @@ program can be installed in one go.")
      '(#:make-flags
        ;; TODO: The documentation must be built with the `docs' target.
        (let* ((out (assoc-ref %outputs "out"))
-              (dir (string-append out "/share/guile/site/2.0")))
+              (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=" dir)
-               (string-append "MOD_COMPILED_PATH=" dir)))
+         (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
+         (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
@@ -422,7 +421,17 @@ program can be installed in one go.")
               (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))))))
+              #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