gnu: artanis: Make some improvements.
authorChristopher Baines <mail@cbaines.net>
Mon, 4 Feb 2019 23:43:45 +0000 (23:43 +0000)
committerChristopher Baines <mail@cbaines.net>
Tue, 5 Feb 2019 09:24:34 +0000 (09:24 +0000)
* gnu/packages/guile-xyz.scm (artanis): Remove a tab character by the
revision.
[arguments]: Patch the site-dir for the help command, to make it work. Wrap
the art command such that it finds guile-json and guile-redis.

gnu/packages/guile-xyz.scm

index 9640d17..6c1e9c5 100644 (file)
@@ -85,7 +85,7 @@
 
 (define-public artanis
   (let ((release "0.3.1")
-       (revision 0))
+        (revision 0))
     (package
       (name "artanis")
       (version (if (zero? revision)
          #: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/2.2\"")))))
            (add-before 'install 'substitute-root-dir
              (lambda* (#:key outputs #:allow-other-keys)
                (let ((out  (assoc-ref outputs "out")))
                  (mkdir-p (string-append out "/bin")) ;for the `art' executable
                  #t)))
            (add-after 'install 'wrap-art
-             (lambda* (#:key outputs #:allow-other-keys)
+             (lambda* (#:key inputs 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)))
+                   `("GUILE_LOAD_PATH" ":" prefix
+                     (,scm ,(getenv "GUILE_LOAD_PATH")))
+                   `("GUILE_LOAD_COMPILED_PATH" ":" prefix
+                     (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
                  #t))))))
       (synopsis "Web application framework written in Guile")
       (description "GNU Artanis is a web application framework written in Guile