gnu: r-fields: Update to 11.4.
[jackhill/guix/guix.git] / gnu / packages / ci.scm
index e26983d..5f7baeb 100644 (file)
@@ -2,8 +2,8 @@
 ;;; 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 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
 ;;;
 ;;; This file is part of GNU Guix.
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages guile-xyz)
+  #:use-module (gnu packages gnupg)
   #:use-module (gnu packages mail)
   #:use-module (gnu packages package-management)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages perl-compression)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages xml)
   #:use-module (guix build-system gnu))
 
-(define-public hydra
-  (let ((commit "1ff48da3d3d4a425063f5b7dd0b89d35270f8932"))
-    (package
-      (name "hydra")
-      (version (string-append "20151030." (string-take commit 7)))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://github.com/NixOS/hydra")
-                      (commit commit)))
-                (file-name (string-append name "-" version))
-                (patches (search-patches
-                          ;; TODO: Remove once we have a darcs input
-                          "hydra-disable-darcs-test.patch"))
-                (sha256
-                 (base32
-                  "0ni8i8v1nxxfr51rz8m6znwpbm77vr7i05k506hmgmg32r938lap"))))
-      (build-system gnu-build-system)
-      (native-inputs
-       `(("unzip" ,unzip)
-         ("pkg-config" ,pkg-config)
-         ;; For documentation
-         ("dblatex" ,dblatex)
-         ("xsltproc" ,libxslt)
-         ("docbook-xsl" ,docbook-xsl)
-         ;; For bootstrap
-         ("autoconf" ,autoconf)
-         ("automake" ,automake)
-         ("libtool" ,libtool)
-         ;; For tests
-         ("git" ,git)
-         ("subversion" ,subversion)
-         ("mercurial" ,mercurial)
-         ("bazaar" ,bazaar)))
-      (inputs
-       `(("libpqxx" ,libpqxx)
-         ("perl" ,perl)
-         ("guile" ,guile-2.0)
-         ("openssl" ,openssl)
-         ("bzip2" ,bzip2)
-         ("gzip" ,gzip)
-         ("sed" ,sed)
-         ("starman" ,starman)
-         ("git" ,git)
-         ("subversion" ,subversion)
-         ("mercurial" ,mercurial)
-         ("bazaar" ,bazaar)
-         ("nix" ,nix)
-         ;; Lots o' perl modules...
-         ("perl-catalyst-action-rest" ,perl-catalyst-action-rest)
-         ("perl-catalyst-authentication-store-dbix-class"
-          ,perl-catalyst-authentication-store-dbix-class)
-         ("perl-catalyst-devel" ,perl-catalyst-devel)
-         ("perl-catalyst-dispatchtype-regex" ,perl-catalyst-dispatchtype-regex)
-         ("perl-catalyst-plugin-accesslog" ,perl-catalyst-plugin-accesslog)
-         ("perl-catalyst-plugin-authorization-roles"
-          ,perl-catalyst-plugin-authorization-roles)
-         ("perl-catalyst-plugin-captcha" ,perl-catalyst-plugin-captcha)
-         ("perl-catalyst-plugin-session-state-cookie"
-          ,perl-catalyst-plugin-session-state-cookie)
-         ("perl-catalyst-plugin-session-store-fastmmap"
-          ,perl-catalyst-plugin-session-store-fastmmap)
-         ("perl-catalyst-plugin-stacktrace" ,perl-catalyst-plugin-stacktrace)
-         ("perl-catalyst-traitfor-request-proxybase"
-          ,perl-catalyst-traitfor-request-proxybase)
-         ("perl-catalyst-view-download" ,perl-catalyst-view-download)
-         ("perl-catalyst-view-json" ,perl-catalyst-view-json)
-         ("perl-catalyst-view-tt" ,perl-catalyst-view-tt)
-         ("perl-catalystx-roleapplicator" ,perl-catalystx-roleapplicator)
-         ("perl-catalystx-script-server-starman"
-          ,perl-catalystx-script-server-starman)
-         ("perl-crypt-randpasswd" ,perl-crypt-randpasswd)
-         ("perl-data-dump" ,perl-data-dump)
-         ("perl-datetime" ,perl-datetime)
-         ("perl-dbd-pg" ,perl-dbd-pg)
-         ("perl-dbd-sqlite" ,perl-dbd-sqlite)
-         ("perl-digest-sha1" ,perl-digest-sha1)
-         ("perl-email-mime" ,perl-email-mime)
-         ("perl-email-sender" ,perl-email-sender)
-         ("perl-file-slurp" ,perl-file-slurp)
-         ("perl-io-compress" ,perl-io-compress)
-         ("perl-ipc-run" ,perl-ipc-run)
-         ("perl-json-any" ,perl-json-any)
-         ("perl-json-xs" ,perl-json-xs)
-         ("perl-libwww" ,perl-libwww)
-         ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
-         ("perl-net-amazon-s3" ,perl-net-amazon-s3)
-         ("perl-net-statsd" ,perl-net-statsd)
-         ("perl-padwalker" ,perl-padwalker)
-         ("perl-readonly" ,perl-readonly)
-         ("perl-set-scalar" ,perl-set-scalar)
-         ("perl-sql-splitstatement" ,perl-sql-splitstatement)
-         ("perl-sys-hostname-long" ,perl-sys-hostname-long)
-         ("perl-text-diff" ,perl-text-diff)
-         ("perl-text-table" ,perl-text-table)
-         ("perl-xml-simple" ,perl-xml-simple)))
-      (arguments
-       `(#:configure-flags
-         (let ((docbook (assoc-ref %build-inputs "docbook-xsl")))
-           (list (string-append "--with-docbook-xsl="
-                                docbook "/xml/xsl/docbook-xsl-"
-                                ,(package-version docbook-xsl))
-                 (string-append "--docdir=" %output
-                                "/doc/hydra-" ,version)))
-         #:phases (modify-phases %standard-phases
-                    (add-before
-                     'check 'check-setup
-                     (lambda _ (setenv "LOGNAME" "test.log")))
-                    (add-after
-                     'install 'wrap-program
-                     (lambda* (#:key inputs outputs #:allow-other-keys)
-                       (let ((out (assoc-ref outputs "out")))
-                         (for-each
-                          (lambda (file)
-                            (wrap-program file
-                              `("PATH" ":" prefix
-                                (,(string-append out "/bin")
-                                 ,@(map (lambda (i)
-                                          (string-append (assoc-ref inputs i)
-                                                         "/bin"))
-                                        '("subversion" "git" "bazaar"
-                                          "mercurial" "coreutils" "gzip"
-                                          "sed" "unzip" "nix"))))
-                              `("PERL5LIB" ":" prefix
-                                (,(string-append out "/libexec/hydra/lib")
-                                 ,@(search-path-as-string->list
-                                    (getenv "PERL5LIB"))))
-                              `("HYDRA_RELEASE" = (,,version))
-                              `("HYDRA_HOME" =
-                                (,(string-append out "/libexec/hydra")))
-                              `("NIX_RELEASE" = (,,(package-version nix)))))
-                          (find-files (string-append out "/bin")
-                                      ".*"))))))))
-      (home-page "https://nixos.org/hydra")
-      (synopsis "Continuous build system")
-      (description
-       "Hydra is a tool for continuous integration testing and software
-release that uses a purely functional language to describe build jobs and
-their dependencies.")
-      (license l:gpl3+))))
-
 (define-public cuirass
-  (let ((commit "8d40c49170971ad7bbf8b97336934dbb3d949fc1")
-        (revision "19"))
+  (let ((commit "cf11b73db00678b45b70108768138d0fb74d9506")
+        (revision "45"))
     (package
       (name "cuirass")
-      (version (string-append "0.0.1-" revision "." (string-take commit 7)))
+      (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 (string-append name "-" version))
+                (file-name (git-file-name name version))
                 (sha256
                  (base32
-                  "0xxcapf9ag3zx6131v128vhin5m2j3w2gjbjbpdwr0qkaysh0gvf"))))
+                  "1f7jqnscy8vjqrpgl4cyynrvbx6zp3slsd82fykap6qvvwwn7xj8"))))
       (build-system gnu-build-system)
       (arguments
        '(#:modules ((guix build utils)
@@ -206,6 +68,8 @@ their dependencies.")
                     (ice-9 rdelim)
                     (ice-9 popen))
 
+         #:configure-flags '("--localstatedir=/var") ;for /var/log/cuirass
+
          #:phases
          (modify-phases %standard-phases
            (add-after 'unpack 'disable-repo-tests
@@ -223,42 +87,48 @@ their dependencies.")
              (lambda* (#:key inputs outputs #:allow-other-keys)
                ;; Wrap the 'cuirass' command to refer to the right modules.
                (let* ((out    (assoc-ref outputs "out"))
+                      (gcrypt (assoc-ref inputs "guile-gcrypt"))
                       (json   (assoc-ref inputs "guile-json"))
                       (sqlite (assoc-ref inputs "guile-sqlite3"))
                       (git    (assoc-ref inputs "guile-git"))
                       (bytes  (assoc-ref inputs "guile-bytestructures"))
                       (fibers (assoc-ref inputs "guile-fibers"))
+                      (zlib   (assoc-ref inputs "guile-zlib"))
                       (guix   (assoc-ref inputs "guix"))
+                      (deps   (list gcrypt json sqlite git bytes fibers
+                                    zlib 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-append json "/share/guile/site/"
-                                             effective ":"
-                                             git "/share/guile/site/"
-                                             effective ":"
-                                             bytes "/share/guile/site/"
-                                             effective ":"
-                                             sqlite "/share/guile/site/"
-                                             effective ":"
-                                             fibers "/share/guile/site/"
-                                             effective ":"
-                                             guix "/share/guile/site/"
-                                             effective)))
+                      (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.
                  (wrap-program (string-append out "/bin/cuirass")
                    `("PATH" ":" prefix (,(string-append out "/bin")))
                    `("GUILE_LOAD_PATH" ":" prefix (,mods))
-                   `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,mods)))
+                   `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,objs)))
                  #t))))))
       (inputs
-       `(("guile" ,guile-2.2)
+       `(("guile" ,@(assoc-ref (package-native-inputs guix) "guile"))
          ("guile-fibers" ,guile-fibers)
-         ("guile-json" ,guile-json)
+         ("guile-gcrypt" ,guile-gcrypt)
+         ("guile-json" ,guile-json-4)
          ("guile-sqlite3" ,guile-sqlite3)
          ("guile-git" ,guile-git)
+         ("guile-zlib" ,guile-zlib)
          ;; 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)