;;; 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 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (gnu packages version-control)
#:use-module (gnu packages web)
#:use-module (gnu packages xml)
- #:use-module (gnu packages zip)
#:use-module (guix build-system gnu))
(define-public hydra
(license l:gpl3+))))
(define-public cuirass
- (let ((commit "f695c79eb3b93a0432901844c8ede16de39b8d07")
- (revision "4"))
+ (let ((commit "9cfea9fe2e3ca6a3d1b832a6ec217426ec973c93")
+ (revision "10"))
(package
(name "cuirass")
(version (string-append "0.0.1-" revision "." (string-take commit 7)))
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://notabug.org/mthl/cuirass")
+ (url "https://git.savannah.gnu.org/git/guix/guix-cuirass.git")
(commit commit)))
(file-name (string-append name "-" version))
(sha256
(base32
- "1zsj3l85d8jq7h9a0zfb2w5pyvlwkirgvis4bv60syhbpblfvmri"))))
+ "177klidmsw12kjk9dzawc0bqcwqlplgx45m87qpgjfx3cnk28i2b"))))
(build-system gnu-build-system)
(arguments
- '(#:phases
+ '(#:modules ((guix build utils)
+ (guix build gnu-build-system)
+ (ice-9 rdelim)
+ (ice-9 popen))
+
+ #:phases
(modify-phases %standard-phases
(add-after 'unpack 'disable-repo-tests
(λ _
(substitute* "Makefile.am"
(("tests/repo.scm \\\\") "\\"))
#t))
- (add-before 'configure 'bootstrap
+ (add-after 'disable-repo-tests 'patch-/bin/sh
+ (lambda _
+ (substitute* "build-aux/git-version-gen"
+ (("#!/bin/sh") (string-append "#!" (which "sh"))))
+ #t))
+ (add-after 'patch-/bin/sh 'bootstrap
(lambda _ (zero? (system* "sh" "bootstrap"))))
(add-after 'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(json (assoc-ref inputs "guile-json"))
(sqlite (assoc-ref inputs "guile-sqlite3"))
- (git (assoc-ref inputs "git"))
+ (git (assoc-ref inputs "guile-git"))
+ (bytes (assoc-ref inputs "guile-bytestructures"))
(guix (assoc-ref inputs "guix"))
- (mods (string-append json "/share/guile/site/2.0:"
- sqlite "/share/guile/site/2.0:"
- guix "/share/guile/site/2.0")))
- ;; Make sure 'cuirass' can find the 'git' and 'evaluate'
- ;; commands, as well as the relevant Guile modules.
+ (guile (assoc-ref %build-inputs "guile"))
+ (effective (read-line
+ (open-pipe* OPEN_READ
+ (string-append guile "/bin/guile")
+ "-c" "(display (effective-version))")))
+ (mods (string-append json "/share/guile/site/"
+ effective ":"
+ git "/share/guile/site/"
+ effective ":"
+ bytes "/share/guile/site/"
+ effective ":"
+ sqlite "/share/guile/site/"
+ effective ":"
+ guix "/share/guile/site/"
+ effective)))
+ ;; Make sure 'cuirass' can find the 'evaluate' command, as
+ ;; well as the relevant Guile modules.
(wrap-program (string-append out "/bin/cuirass")
- `("PATH" ":" prefix (,(string-append out "/bin")
- ,(string-append git "/bin")))
+ `("PATH" ":" prefix (,(string-append out "/bin")))
`("GUILE_LOAD_PATH" ":" prefix (,mods))
`("GUILE_LOAD_COMPILED_PATH" ":" prefix (,mods)))
#t))))))
(inputs
- `(("guile" ,guile-2.0)
+ `(("guile" ,guile-2.2)
("guile-json" ,guile-json)
("guile-sqlite3" ,guile-sqlite3)
- ("guix" ,guix)
- ("git" ,git)))
+ ("guile-git" ,guile-git)
+ ;; 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)
+ ("guix" ,guix)))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
("pkg-config" ,pkg-config)
("texinfo" ,texinfo)))
+ (native-search-paths
+ ;; For HTTPS access, Cuirass itself honors these variables, with the
+ ;; same semantics as Git and OpenSSL (respectively).
+ (list (search-path-specification
+ (variable "GIT_SSL_CAINFO")
+ (file-type 'regular)
+ (separator #f) ;single entry
+ (files '("etc/ssl/certs/ca-certificates.crt")))
+ (search-path-specification
+ (variable "SSL_CERT_DIR")
+ (files '("etc/ssl/certs")))))
(synopsis "Continuous integration system")
(description
"Cuirass is a continuous integration tool using GNU Guix. It is
intended as a replacement for Hydra.")
- (home-page "https://notabug.org/mthl/cuirass")
+ (home-page "https://www.gnu.org/software/guix/")
(license l:gpl3+))))