gnu: artanis: Update to 0.4.1.
* gnu/packages/guile-xyz.scm (artanis): Update to 0.4.1. [inputs]: Add nss; move guile-json-1 and guile-redis from here... [propagated-inputs]: ...to here; add guile-readline. [arguments]: Add phase "patch-references-to-libnss".master
parent
fe338d7f00
commit
1a37fd1e72
|
@ -73,6 +73,7 @@
|
||||||
#:use-module (gnu packages ncurses)
|
#:use-module (gnu packages ncurses)
|
||||||
#:use-module (gnu packages networking)
|
#:use-module (gnu packages networking)
|
||||||
#:use-module (gnu packages noweb)
|
#:use-module (gnu packages noweb)
|
||||||
|
#:use-module (gnu packages nss)
|
||||||
#:use-module (gnu packages password-utils)
|
#:use-module (gnu packages password-utils)
|
||||||
#:use-module (gnu packages perl)
|
#:use-module (gnu packages perl)
|
||||||
#:use-module (gnu packages pkg-config)
|
#:use-module (gnu packages pkg-config)
|
||||||
|
@ -99,104 +100,112 @@
|
||||||
#:use-module ((srfi srfi-1) #:select (alist-delete)))
|
#:use-module ((srfi srfi-1) #:select (alist-delete)))
|
||||||
|
|
||||||
(define-public artanis
|
(define-public artanis
|
||||||
(let ((release "0.3.1")
|
(package
|
||||||
(revision 0))
|
(name "artanis")
|
||||||
(package
|
(version "0.4.1")
|
||||||
(name "artanis")
|
(source (origin
|
||||||
(version (if (zero? revision)
|
(method url-fetch)
|
||||||
release
|
(uri (string-append "mirror://gnu/artanis/artanis-"
|
||||||
(string-append release "-"
|
version ".tar.gz"))
|
||||||
(number->string revision))))
|
(sha256
|
||||||
(source (origin
|
(base32
|
||||||
(method url-fetch)
|
"0nnmdfx5xwcc3kck64var7msz7g3qk817d7bv9l159nkmic0v9w4"))
|
||||||
(uri (string-append "mirror://gnu/artanis/artanis-"
|
(modules '((guix build utils)))
|
||||||
release ".tar.gz"))
|
(snippet
|
||||||
(file-name (string-append name "-" version ".tar.gz"))
|
'(begin
|
||||||
(sha256
|
;; Unbundle guile-redis and guile-json
|
||||||
(base32
|
(delete-file-recursively "artanis/third-party/json.scm")
|
||||||
"0hqr5m3mb558bdhkc2sadmd9cbrhp3y525wx7cwirgy6i0zmay68"))
|
(delete-file-recursively "artanis/third-party/json")
|
||||||
(modules '((guix build utils)))
|
(delete-file-recursively "artanis/third-party/redis.scm")
|
||||||
(snippet
|
(delete-file-recursively "artanis/third-party/redis")
|
||||||
'(begin
|
(substitute* '("artanis/artanis.scm"
|
||||||
;; Unbundle guile-redis and guile-json
|
"artanis/lpc.scm"
|
||||||
(delete-file-recursively "artanis/third-party/json.scm")
|
"artanis/oht.scm")
|
||||||
(delete-file-recursively "artanis/third-party/json")
|
(("(#:use-module \\()artanis third-party (json\\))" _
|
||||||
(delete-file-recursively "artanis/third-party/redis.scm")
|
use-module json)
|
||||||
(delete-file-recursively "artanis/third-party/redis")
|
(string-append use-module json)))
|
||||||
(substitute* '("artanis/artanis.scm"
|
(substitute* '("artanis/lpc.scm"
|
||||||
"artanis/lpc.scm"
|
"artanis/session.scm")
|
||||||
"artanis/oht.scm")
|
(("(#:use-module \\()artanis third-party (redis\\))" _
|
||||||
(("(#:use-module \\()artanis third-party (json\\))" _
|
use-module redis)
|
||||||
use-module json)
|
(string-append use-module redis)))
|
||||||
(string-append use-module json)))
|
(substitute* "artanis/oht.scm"
|
||||||
(substitute* '("artanis/lpc.scm"
|
(("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
|
||||||
"artanis/session.scm")
|
_ pre json-string post)
|
||||||
(("(#:use-module \\()artanis third-party (redis\\))" _
|
(string-append pre
|
||||||
use-module redis)
|
"scm" json-string
|
||||||
(string-append use-module redis)))
|
post)))
|
||||||
(substitute* "artanis/oht.scm"
|
(substitute* "artanis/artanis.scm"
|
||||||
(("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
|
(("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
|
||||||
_ pre json-string post)
|
""))
|
||||||
(string-append pre
|
#t))))
|
||||||
"scm" json-string
|
(build-system gnu-build-system)
|
||||||
post)))
|
(inputs
|
||||||
(substitute* "artanis/artanis.scm"
|
`(("guile" ,guile-2.2)
|
||||||
(("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
|
("nss" ,nss)))
|
||||||
""))
|
;; FIXME the bundled csv contains one more exported procedure
|
||||||
#t))))
|
;; (sxml->csv-string) than guile-csv. The author is maintainer of both
|
||||||
(build-system gnu-build-system)
|
;; projects.
|
||||||
;; FIXME the bundled csv contains one more exported procedure
|
;; TODO: Add guile-dbi and guile-dbd optional dependencies.
|
||||||
;; (sxml->csv-string) than guile-csv. The author is maintainer of both
|
(propagated-inputs
|
||||||
;; projects.
|
`(("guile-json" ,guile-json-1)
|
||||||
;; TODO: Add guile-dbi and guile-dbd optional dependencies.
|
("guile-readline" ,guile-readline)
|
||||||
(inputs `(("guile" ,guile-2.2)
|
("guile-redis" ,guile-redis)))
|
||||||
("guile-json" ,guile-json-1)
|
(native-inputs
|
||||||
("guile-redis" ,guile-redis)))
|
`(("bash" ,bash) ;for the `source' builtin
|
||||||
(native-inputs `(("bash" ,bash) ;for the `source' builtin
|
("pkgconfig" ,pkg-config)
|
||||||
("pkgconfig" ,pkg-config)
|
("util-linux" ,util-linux))) ;for the `script' command
|
||||||
("util-linux" ,util-linux))) ;for the `script' command
|
(arguments
|
||||||
(arguments
|
'(#:make-flags
|
||||||
'(#:make-flags
|
;; TODO: The documentation must be built with the `docs' target.
|
||||||
;; TODO: The documentation must be built with the `docs' target.
|
(let* ((out (assoc-ref %outputs "out"))
|
||||||
(let* ((out (assoc-ref %outputs "out"))
|
(scm (string-append out "/share/guile/site/2.2"))
|
||||||
(scm (string-append out "/share/guile/site/2.2"))
|
(go (string-append out "/lib/guile/2.2/site-ccache")))
|
||||||
(go (string-append out "/lib/guile/2.2/site-ccache")))
|
;; Don't use (%site-dir) for site paths.
|
||||||
;; Don't use (%site-dir) for site paths.
|
(list (string-append "MOD_PATH=" scm)
|
||||||
(list (string-append "MOD_PATH=" scm)
|
(string-append "MOD_COMPILED_PATH=" go)))
|
||||||
(string-append "MOD_COMPILED_PATH=" go)))
|
#:test-target "test"
|
||||||
#:test-target "test"
|
#:phases
|
||||||
#:phases
|
(modify-phases %standard-phases
|
||||||
(modify-phases %standard-phases
|
(add-after 'unpack 'patch-site-dir
|
||||||
(add-after 'unpack 'patch-site-dir
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(substitute* "artanis/commands/help.scm"
|
||||||
(substitute* "artanis/commands/help.scm"
|
(("\\(%site-dir\\)")
|
||||||
(("\\(%site-dir\\)")
|
(string-append "\""
|
||||||
(string-append "\""
|
(assoc-ref outputs "out")
|
||||||
(assoc-ref outputs "out")
|
"/share/guile/site/2.2\"")))))
|
||||||
"/share/guile/site/2.2\"")))))
|
(add-after 'unpack 'patch-reference-to-libnss
|
||||||
(add-before 'install 'substitute-root-dir
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(substitute* "artanis/security/nss.scm"
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(("ffi-binding \"libnss3\"")
|
||||||
(substitute* "Makefile" ;ignore the execution of bash.bashrc
|
(string-append
|
||||||
((" /etc/bash.bashrc") " /dev/null"))
|
"ffi-binding \""
|
||||||
(substitute* "Makefile" ;set the root of config files to OUT
|
(assoc-ref inputs "nss") "/lib/nss/libnss3.so"
|
||||||
((" /etc") (string-append " " out "/etc")))
|
"\"")))
|
||||||
(mkdir-p (string-append out "/bin")) ;for the `art' executable
|
#t))
|
||||||
#t)))
|
(add-before 'install 'substitute-root-dir
|
||||||
(add-after 'install 'wrap-art
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(substitute* "Makefile" ;ignore the execution of bash.bashrc
|
||||||
(bin (string-append out "/bin"))
|
((" /etc/bash.bashrc") " /dev/null"))
|
||||||
(scm (string-append out "/share/guile/site/2.2"))
|
(substitute* "Makefile" ;set the root of config files to OUT
|
||||||
(go (string-append out "/lib/guile/2.2/site-ccache")))
|
((" /etc") (string-append " " out "/etc")))
|
||||||
(wrap-program (string-append bin "/art")
|
(mkdir-p (string-append out "/bin")) ;for the `art' executable
|
||||||
`("GUILE_LOAD_PATH" ":" prefix
|
#t)))
|
||||||
(,scm ,(getenv "GUILE_LOAD_PATH")))
|
(add-after 'install 'wrap-art
|
||||||
`("GUILE_LOAD_COMPILED_PATH" ":" prefix
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
#t))))))
|
(bin (string-append out "/bin"))
|
||||||
(synopsis "Web application framework written in Guile")
|
(scm (string-append out "/share/guile/site/2.2"))
|
||||||
(description "GNU Artanis is a web application framework written in Guile
|
(go (string-append out "/lib/guile/2.2/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"))))
|
||||||
|
#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
|
Scheme. A web application framework (WAF) is a software framework that is
|
||||||
designed to support the development of dynamic websites, web applications, web
|
designed to support the development of dynamic websites, web applications, web
|
||||||
services and web resources. The framework aims to alleviate the overhead
|
services and web resources. The framework aims to alleviate the overhead
|
||||||
|
@ -204,8 +213,8 @@ associated with common activities performed in web development. Artanis
|
||||||
provides several tools for web development: database access, templating
|
provides several tools for web development: database access, templating
|
||||||
frameworks, session management, URL-remapping for RESTful, page caching, and
|
frameworks, session management, URL-remapping for RESTful, page caching, and
|
||||||
more.")
|
more.")
|
||||||
(home-page "https://www.gnu.org/software/artanis/")
|
(home-page "https://www.gnu.org/software/artanis/")
|
||||||
(license (list license:gpl3+ license:lgpl3+))))) ;dual license
|
(license (list license:gpl3+ license:lgpl3+)))) ;dual license
|
||||||
|
|
||||||
;; There has not been any release yet.
|
;; There has not been any release yet.
|
||||||
(define-public guildhall
|
(define-public guildhall
|
||||||
|
|
Reference in New Issue