;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016, 2017 Mathieu Lirzin <mthl@gnu.org>
-;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017, 2020, 2021 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
;;;
#:use-module (gnu packages)
#:use-module (guix packages)
#:use-module (guix git-download)
+ #:use-module (guix download)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages docbook)
#:use-module (guix build-system gnu))
(define-public cuirass
- (let ((commit "27af1d34646f4e3fca09283cb52caa8b89cbb2b1")
- (revision "29"))
+ (let ((commit "ff3f25d28782a85841b5e604335fc1118ef93f01")
+ (revision "4"))
(package
(name "cuirass")
- (version (git-version "0.0.1" revision commit))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://git.savannah.gnu.org/git/guix/guix-cuirass.git")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "199fzv4d18qslcggl7lj42ib600nckp0c40x7ahnb4rgnjw8ppyi"))))
+ (version (git-version "1.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/guix/guix-cuirass.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0sykgmh12llkk5qb63542wb7ywjiirscqmlvrsskfkqlgs7scsgg"))))
(build-system gnu-build-system)
(arguments
'(#:modules ((guix build utils)
(guix build gnu-build-system)
(ice-9 rdelim)
(ice-9 popen))
-
#:configure-flags '("--localstatedir=/var") ;for /var/log/cuirass
-
+ #:parallel-tests? #f
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'disable-repo-tests
- (λ _
- ;; Disable tests that use a connection to the Guix daemon.
- (substitute* "Makefile.am"
- (("tests/repo.scm \\\\") "\\"))
- #t))
- (add-after 'disable-repo-tests 'patch-/bin/sh
+ (add-before 'check 'set-PATH-for-tests
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((pg (assoc-ref inputs "ephemeralpg"))
+ (path (getenv "PATH")))
+ (setenv "PATH" (string-append pg "/bin:" path))
+ #t)))
+ ;; Disable the remote tests that require a Guix daemon connection.
+ (add-before 'check 'disable-remote-tests
(lambda _
- (substitute* "build-aux/git-version-gen"
- (("#!/bin/sh") (string-append "#!" (which "sh"))))
+ (substitute* "Makefile.am"
+ (("tests/remote.scm") ""))
#t))
(add-after 'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Wrap the 'cuirass' command to refer to the right modules.
(let* ((out (assoc-ref outputs "out"))
+ (avahi (assoc-ref inputs "guile-avahi"))
(gcrypt (assoc-ref inputs "guile-gcrypt"))
(json (assoc-ref inputs "guile-json"))
- (sqlite (assoc-ref inputs "guile-sqlite3"))
+ (zmq (assoc-ref inputs "guile-simple-zmq"))
+ (squee (assoc-ref inputs "guile-squee"))
(git (assoc-ref inputs "guile-git"))
(bytes (assoc-ref inputs "guile-bytestructures"))
(fibers (assoc-ref inputs "guile-fibers"))
+ (zlib (assoc-ref inputs "guile-zlib"))
+ (matd (assoc-ref inputs "guile-mastodon"))
+ (tls (assoc-ref inputs "gnutls"))
+ (mail (assoc-ref inputs "mailutils"))
(guix (assoc-ref inputs "guix"))
- (deps (list gcrypt json sqlite git bytes fibers guix))
+ (deps (list avahi gcrypt json zmq squee git bytes
+ fibers zlib matd tls mail guix))
(guile (assoc-ref %build-inputs "guile"))
- (effective (read-line
- (open-pipe* OPEN_READ
- (string-append guile "/bin/guile")
- "-c" "(display (effective-version))")))
- (mods (string-drop-right ;drop trailing colon
- (string-join deps
- (string-append "/share/guile/site/"
- effective ":")
- 'suffix)
- 1))
- (objs (string-drop-right
- (string-join deps
- (string-append "/lib/guile/" effective
- "/site-ccache:")
- 'suffix)
- 1)))
- ;; Make sure 'cuirass' can find the 'evaluate' command, as
- ;; well as the relevant Guile modules.
+ (effective
+ (read-line
+ (open-pipe* OPEN_READ
+ (string-append guile "/bin/guile")
+ "-c" "(display (effective-version))")))
+ (mods
+ (string-drop-right ;drop trailing colon
+ (string-join deps
+ (string-append "/share/guile/site/"
+ effective ":")
+ 'suffix)
+ 1))
+ (objs
+ (string-drop-right
+ (string-join deps
+ (string-append "/lib/guile/" effective
+ "/site-ccache:")
+ 'suffix)
+ 1)))
+ ;; Make sure 'cuirass' can find the relevant Guile modules.
(wrap-program (string-append out "/bin/cuirass")
`("PATH" ":" prefix (,(string-append out "/bin")))
`("GUILE_LOAD_PATH" ":" prefix (,mods))
`("GUILE_LOAD_COMPILED_PATH" ":" prefix (,objs)))
#t))))))
(inputs
- `(("guile" ,guile-3.0)
+ `(("guile" ,guile-3.0/libgc-7)
+ ("guile-avahi" ,guile-avahi)
("guile-fibers" ,guile-fibers)
("guile-gcrypt" ,guile-gcrypt)
- ("guile-json" ,guile-json-3)
- ("guile-sqlite3" ,guile-sqlite3)
+ ("guile-json" ,guile-json-4)
+ ("guile-simple-zmq" ,guile-simple-zmq)
+ ("guile-squee" ,guile-squee)
("guile-git" ,guile-git)
+ ("guile-zlib" ,guile-zlib)
+ ("guile-mastodon" ,guile-mastodon)
+ ("gnutls" ,gnutls)
+ ("mailutils" ,mailutils)
;; FIXME: this is propagated by "guile-git", but it needs to be among
;; the inputs to add it to GUILE_LOAD_PATH.
("guile-bytestructures" ,guile-bytestructures)
`(("autoconf" ,autoconf)
("automake" ,automake)
("pkg-config" ,pkg-config)
- ("texinfo" ,texinfo)))
+ ("texinfo" ,texinfo)
+ ("ephemeralpg" ,ephemeralpg)))
(native-search-paths
;; For HTTPS access, Cuirass itself honors these variables, with the
;; same semantics as Git and OpenSSL (respectively).