gnu: python-pandas: Fix build on 32-bit.
[jackhill/guix/guix.git] / gnu / packages / ci.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
3 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
4 ;;; Copyright © 2016, 2017 Mathieu Lirzin <mthl@gnu.org>
5 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages ci)
23 #:use-module ((guix licenses) #:prefix l:)
24 #:use-module (gnu packages)
25 #:use-module (guix packages)
26 #:use-module (guix git-download)
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages base)
29 #:use-module (gnu packages docbook)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages databases)
32 #:use-module (gnu packages guile)
33 #:use-module (gnu packages mail)
34 #:use-module (gnu packages package-management)
35 #:use-module (gnu packages perl)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages tls)
38 #:use-module (gnu packages texinfo)
39 #:use-module (gnu packages version-control)
40 #:use-module (gnu packages web)
41 #:use-module (gnu packages xml)
42 #:use-module (gnu packages zip)
43 #:use-module (guix build-system gnu))
44
45 (define-public hydra
46 (let ((commit "1ff48da3d3d4a425063f5b7dd0b89d35270f8932"))
47 (package
48 (name "hydra")
49 (version (string-append "20151030." (string-take commit 7)))
50 (source (origin
51 (method git-fetch)
52 (uri (git-reference
53 (url "https://github.com/NixOS/hydra")
54 (commit commit)))
55 (file-name (string-append name "-" version))
56 (patches (search-patches
57 ;; TODO: Remove once we have a darcs input
58 "hydra-disable-darcs-test.patch"))
59 (sha256
60 (base32
61 "0ni8i8v1nxxfr51rz8m6znwpbm77vr7i05k506hmgmg32r938lap"))))
62 (build-system gnu-build-system)
63 (native-inputs
64 `(("unzip" ,unzip)
65 ("pkg-config" ,pkg-config)
66 ;; For documentation
67 ("dblatex" ,dblatex)
68 ("xsltproc" ,libxslt)
69 ("docbook-xsl" ,docbook-xsl)
70 ;; For bootstrap
71 ("autoconf" ,autoconf)
72 ("automake" ,automake)
73 ("libtool" ,libtool)
74 ;; For tests
75 ("git" ,git)
76 ("subversion" ,subversion)
77 ("mercurial" ,mercurial)
78 ("bazaar" ,bazaar)))
79 (inputs
80 `(("libpqxx" ,libpqxx)
81 ("perl" ,perl)
82 ("guile" ,guile-2.0)
83 ("openssl" ,openssl)
84 ("bzip2" ,bzip2)
85 ("gzip" ,gzip)
86 ("sed" ,sed)
87 ("starman" ,starman)
88 ("git" ,git)
89 ("subversion" ,subversion)
90 ("mercurial" ,mercurial)
91 ("bazaar" ,bazaar)
92 ("nix" ,nix)
93 ;; Lots o' perl modules...
94 ("perl-catalyst-action-rest" ,perl-catalyst-action-rest)
95 ("perl-catalyst-authentication-store-dbix-class"
96 ,perl-catalyst-authentication-store-dbix-class)
97 ("perl-catalyst-devel" ,perl-catalyst-devel)
98 ("perl-catalyst-dispatchtype-regex" ,perl-catalyst-dispatchtype-regex)
99 ("perl-catalyst-plugin-accesslog" ,perl-catalyst-plugin-accesslog)
100 ("perl-catalyst-plugin-authorization-roles"
101 ,perl-catalyst-plugin-authorization-roles)
102 ("perl-catalyst-plugin-captcha" ,perl-catalyst-plugin-captcha)
103 ("perl-catalyst-plugin-session-state-cookie"
104 ,perl-catalyst-plugin-session-state-cookie)
105 ("perl-catalyst-plugin-session-store-fastmmap"
106 ,perl-catalyst-plugin-session-store-fastmmap)
107 ("perl-catalyst-plugin-stacktrace" ,perl-catalyst-plugin-stacktrace)
108 ("perl-catalyst-traitfor-request-proxybase"
109 ,perl-catalyst-traitfor-request-proxybase)
110 ("perl-catalyst-view-download" ,perl-catalyst-view-download)
111 ("perl-catalyst-view-json" ,perl-catalyst-view-json)
112 ("perl-catalyst-view-tt" ,perl-catalyst-view-tt)
113 ("perl-catalystx-roleapplicator" ,perl-catalystx-roleapplicator)
114 ("perl-catalystx-script-server-starman"
115 ,perl-catalystx-script-server-starman)
116 ("perl-crypt-randpasswd" ,perl-crypt-randpasswd)
117 ("perl-data-dump" ,perl-data-dump)
118 ("perl-datetime" ,perl-datetime)
119 ("perl-dbd-pg" ,perl-dbd-pg)
120 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
121 ("perl-digest-sha1" ,perl-digest-sha1)
122 ("perl-email-mime" ,perl-email-mime)
123 ("perl-email-sender" ,perl-email-sender)
124 ("perl-file-slurp" ,perl-file-slurp)
125 ("perl-io-compress" ,perl-io-compress)
126 ("perl-ipc-run" ,perl-ipc-run)
127 ("perl-json-any" ,perl-json-any)
128 ("perl-json-xs" ,perl-json-xs)
129 ("perl-libwww" ,perl-libwww)
130 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
131 ("perl-net-amazon-s3" ,perl-net-amazon-s3)
132 ("perl-net-statsd" ,perl-net-statsd)
133 ("perl-padwalker" ,perl-padwalker)
134 ("perl-readonly" ,perl-readonly)
135 ("perl-set-scalar" ,perl-set-scalar)
136 ("perl-sql-splitstatement" ,perl-sql-splitstatement)
137 ("perl-sys-hostname-long" ,perl-sys-hostname-long)
138 ("perl-text-diff" ,perl-text-diff)
139 ("perl-text-table" ,perl-text-table)
140 ("perl-xml-simple" ,perl-xml-simple)))
141 (arguments
142 `(#:configure-flags
143 (let ((docbook (assoc-ref %build-inputs "docbook-xsl")))
144 (list (string-append "--with-docbook-xsl="
145 docbook "/xml/xsl/docbook-xsl-"
146 ,(package-version docbook-xsl))
147 (string-append "--docdir=" %output
148 "/doc/hydra-" ,version)))
149 #:phases (modify-phases %standard-phases
150 (add-after
151 'unpack 'bootstrap
152 (lambda _ (zero? (system* "autoreconf" "-vfi"))))
153 (add-before
154 'check 'check-setup
155 (lambda _ (setenv "LOGNAME" "test.log")))
156 (add-after
157 'install 'wrap-program
158 (lambda* (#:key inputs outputs #:allow-other-keys)
159 (let ((out (assoc-ref outputs "out")))
160 (for-each
161 (lambda (file)
162 (wrap-program file
163 `("PATH" ":" prefix
164 (,(string-append out "/bin")
165 ,@(map (lambda (i)
166 (string-append (assoc-ref inputs i)
167 "/bin"))
168 '("subversion" "git" "bazaar"
169 "mercurial" "coreutils" "gzip"
170 "sed" "unzip" "nix"))))
171 `("PERL5LIB" ":" prefix
172 (,(string-append out "/libexec/hydra/lib")
173 ,@(search-path-as-string->list
174 (getenv "PERL5LIB"))))
175 `("HYDRA_RELEASE" = (,,version))
176 `("HYDRA_HOME" =
177 (,(string-append out "/libexec/hydra")))
178 `("NIX_RELEASE" = (,,(package-version nix)))))
179 (find-files (string-append out "/bin")
180 ".*"))))))))
181 (home-page "https://nixos.org/hydra")
182 (synopsis "Continuous build system")
183 (description
184 "Hydra is a tool for continuous integration testing and software
185 release that uses a purely functional language to describe build jobs and
186 their dependencies.")
187 (license l:gpl3+))))
188
189 (define-public cuirass
190 (let ((commit "f695c79eb3b93a0432901844c8ede16de39b8d07")
191 (revision "4"))
192 (package
193 (name "cuirass")
194 (version (string-append "0.0.1-" revision "." (string-take commit 7)))
195 (source (origin
196 (method git-fetch)
197 (uri (git-reference
198 (url "https://notabug.org/mthl/cuirass")
199 (commit commit)))
200 (file-name (string-append name "-" version))
201 (sha256
202 (base32
203 "1zsj3l85d8jq7h9a0zfb2w5pyvlwkirgvis4bv60syhbpblfvmri"))))
204 (build-system gnu-build-system)
205 (arguments
206 '(#:phases
207 (modify-phases %standard-phases
208 (add-after 'unpack 'disable-repo-tests
209 (λ _
210 ;; Disable tests that use a connection to the Guix daemon.
211 (substitute* "Makefile.am"
212 (("tests/repo.scm \\\\") "\\"))
213 #t))
214 (add-before 'configure 'bootstrap
215 (lambda _ (zero? (system* "sh" "bootstrap"))))
216 (add-after 'install 'wrap-program
217 (lambda* (#:key inputs outputs #:allow-other-keys)
218 ;; Wrap the 'cuirass' command to refer to the right modules.
219 (let* ((out (assoc-ref outputs "out"))
220 (json (assoc-ref inputs "guile-json"))
221 (sqlite (assoc-ref inputs "guile-sqlite3"))
222 (git (assoc-ref inputs "git"))
223 (guix (assoc-ref inputs "guix"))
224 (mods (string-append json "/share/guile/site/2.0:"
225 sqlite "/share/guile/site/2.0:"
226 guix "/share/guile/site/2.0")))
227 ;; Make sure 'cuirass' can find the 'git' and 'evaluate'
228 ;; commands, as well as the relevant Guile modules.
229 (wrap-program (string-append out "/bin/cuirass")
230 `("PATH" ":" prefix (,(string-append out "/bin")
231 ,(string-append git "/bin")))
232 `("GUILE_LOAD_PATH" ":" prefix (,mods))
233 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,mods)))
234 #t))))))
235 (inputs
236 `(("guile" ,guile-2.0)
237 ("guile-json" ,guile-json)
238 ("guile-sqlite3" ,guile-sqlite3)
239 ("guix" ,guix)
240 ("git" ,git)))
241 (native-inputs
242 `(("autoconf" ,autoconf)
243 ("automake" ,automake)
244 ("pkg-config" ,pkg-config)
245 ("texinfo" ,texinfo)))
246 (synopsis "Continuous integration system")
247 (description
248 "Cuirass is a continuous integration tool using GNU Guix. It is
249 intended as a replacement for Hydra.")
250 (home-page "https://notabug.org/mthl/cuirass")
251 (license l:gpl3+))))