gnu: igt-gpu-tools: Don't use NAME in source URI.
[jackhill/guix/guix.git] / gnu / packages / ci.scm
CommitLineData
0061079a
EB
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
365de1e7 3;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
04927b6f 4;;; Copyright © 2016, 2017 Mathieu Lirzin <mthl@gnu.org>
7a9ca44a 5;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
a6d05444 6;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
68a653ab 7;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
0061079a
EB
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages ci)
25 #:use-module ((guix licenses) #:prefix l:)
26 #:use-module (gnu packages)
27 #:use-module (guix packages)
28 #:use-module (guix git-download)
29 #:use-module (gnu packages autotools)
30 #:use-module (gnu packages base)
31 #:use-module (gnu packages docbook)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages databases)
34 #:use-module (gnu packages guile)
0791437f 35 #:use-module (gnu packages guile-xyz)
7903f00a 36 #:use-module (gnu packages gnupg)
0061079a 37 #:use-module (gnu packages mail)
0061079a
EB
38 #:use-module (gnu packages package-management)
39 #:use-module (gnu packages perl)
21b41a79 40 #:use-module (gnu packages perl-compression)
0061079a 41 #:use-module (gnu packages pkg-config)
cc2b77df 42 #:use-module (gnu packages tls)
44ccd962 43 #:use-module (gnu packages texinfo)
0061079a
EB
44 #:use-module (gnu packages version-control)
45 #:use-module (gnu packages web)
46 #:use-module (gnu packages xml)
0061079a
EB
47 #:use-module (guix build-system gnu))
48
49(define-public hydra
253745d7 50 (let ((commit "1ff48da3d3d4a425063f5b7dd0b89d35270f8932"))
0061079a
EB
51 (package
52 (name "hydra")
253745d7 53 (version (string-append "20151030." (string-take commit 7)))
0061079a
EB
54 (source (origin
55 (method git-fetch)
56 (uri (git-reference
57 (url "https://github.com/NixOS/hydra")
58 (commit commit)))
59 (file-name (string-append name "-" version))
fc1adab1 60 (patches (search-patches
fc1adab1 61 ;; TODO: Remove once we have a darcs input
253745d7
JN
62 "hydra-disable-darcs-test.patch"))
63 (sha256
64 (base32
65 "0ni8i8v1nxxfr51rz8m6znwpbm77vr7i05k506hmgmg32r938lap"))))
0061079a
EB
66 (build-system gnu-build-system)
67 (native-inputs
68 `(("unzip" ,unzip)
69 ("pkg-config" ,pkg-config)
70 ;; For documentation
71 ("dblatex" ,dblatex)
72 ("xsltproc" ,libxslt)
73 ("docbook-xsl" ,docbook-xsl)
74 ;; For bootstrap
75 ("autoconf" ,autoconf)
76 ("automake" ,automake)
77 ("libtool" ,libtool)
78 ;; For tests
79 ("git" ,git)
80 ("subversion" ,subversion)
81 ("mercurial" ,mercurial)
82 ("bazaar" ,bazaar)))
83 (inputs
253745d7
JN
84 `(("libpqxx" ,libpqxx)
85 ("perl" ,perl)
0061079a
EB
86 ("guile" ,guile-2.0)
87 ("openssl" ,openssl)
88 ("bzip2" ,bzip2)
89 ("gzip" ,gzip)
90 ("sed" ,sed)
91 ("starman" ,starman)
92 ("git" ,git)
93 ("subversion" ,subversion)
94 ("mercurial" ,mercurial)
95 ("bazaar" ,bazaar)
96 ("nix" ,nix)
97 ;; Lots o' perl modules...
98 ("perl-catalyst-action-rest" ,perl-catalyst-action-rest)
99 ("perl-catalyst-authentication-store-dbix-class"
100 ,perl-catalyst-authentication-store-dbix-class)
101 ("perl-catalyst-devel" ,perl-catalyst-devel)
102 ("perl-catalyst-dispatchtype-regex" ,perl-catalyst-dispatchtype-regex)
103 ("perl-catalyst-plugin-accesslog" ,perl-catalyst-plugin-accesslog)
104 ("perl-catalyst-plugin-authorization-roles"
105 ,perl-catalyst-plugin-authorization-roles)
106 ("perl-catalyst-plugin-captcha" ,perl-catalyst-plugin-captcha)
107 ("perl-catalyst-plugin-session-state-cookie"
108 ,perl-catalyst-plugin-session-state-cookie)
109 ("perl-catalyst-plugin-session-store-fastmmap"
110 ,perl-catalyst-plugin-session-store-fastmmap)
111 ("perl-catalyst-plugin-stacktrace" ,perl-catalyst-plugin-stacktrace)
112 ("perl-catalyst-traitfor-request-proxybase"
113 ,perl-catalyst-traitfor-request-proxybase)
114 ("perl-catalyst-view-download" ,perl-catalyst-view-download)
115 ("perl-catalyst-view-json" ,perl-catalyst-view-json)
116 ("perl-catalyst-view-tt" ,perl-catalyst-view-tt)
117 ("perl-catalystx-roleapplicator" ,perl-catalystx-roleapplicator)
118 ("perl-catalystx-script-server-starman"
119 ,perl-catalystx-script-server-starman)
120 ("perl-crypt-randpasswd" ,perl-crypt-randpasswd)
121 ("perl-data-dump" ,perl-data-dump)
122 ("perl-datetime" ,perl-datetime)
123 ("perl-dbd-pg" ,perl-dbd-pg)
124 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
125 ("perl-digest-sha1" ,perl-digest-sha1)
126 ("perl-email-mime" ,perl-email-mime)
127 ("perl-email-sender" ,perl-email-sender)
128 ("perl-file-slurp" ,perl-file-slurp)
129 ("perl-io-compress" ,perl-io-compress)
130 ("perl-ipc-run" ,perl-ipc-run)
131 ("perl-json-any" ,perl-json-any)
132 ("perl-json-xs" ,perl-json-xs)
133 ("perl-libwww" ,perl-libwww)
134 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
135 ("perl-net-amazon-s3" ,perl-net-amazon-s3)
253745d7 136 ("perl-net-statsd" ,perl-net-statsd)
0061079a
EB
137 ("perl-padwalker" ,perl-padwalker)
138 ("perl-readonly" ,perl-readonly)
139 ("perl-set-scalar" ,perl-set-scalar)
140 ("perl-sql-splitstatement" ,perl-sql-splitstatement)
141 ("perl-sys-hostname-long" ,perl-sys-hostname-long)
142 ("perl-text-diff" ,perl-text-diff)
143 ("perl-text-table" ,perl-text-table)
144 ("perl-xml-simple" ,perl-xml-simple)))
145 (arguments
146 `(#:configure-flags
147 (let ((docbook (assoc-ref %build-inputs "docbook-xsl")))
148 (list (string-append "--with-docbook-xsl="
149 docbook "/xml/xsl/docbook-xsl-"
150 ,(package-version docbook-xsl))
151 (string-append "--docdir=" %output
152 "/doc/hydra-" ,version)))
153 #:phases (modify-phases %standard-phases
0061079a
EB
154 (add-before
155 'check 'check-setup
156 (lambda _ (setenv "LOGNAME" "test.log")))
157 (add-after
158 'install 'wrap-program
159 (lambda* (#:key inputs outputs #:allow-other-keys)
160 (let ((out (assoc-ref outputs "out")))
161 (for-each
162 (lambda (file)
163 (wrap-program file
164 `("PATH" ":" prefix
165 (,(string-append out "/bin")
166 ,@(map (lambda (i)
167 (string-append (assoc-ref inputs i)
168 "/bin"))
169 '("subversion" "git" "bazaar"
170 "mercurial" "coreutils" "gzip"
171 "sed" "unzip" "nix"))))
172 `("PERL5LIB" ":" prefix
173 (,(string-append out "/libexec/hydra/lib")
174 ,@(search-path-as-string->list
175 (getenv "PERL5LIB"))))
176 `("HYDRA_RELEASE" = (,,version))
177 `("HYDRA_HOME" =
178 (,(string-append out "/libexec/hydra")))
179 `("NIX_RELEASE" = (,,(package-version nix)))))
180 (find-files (string-append out "/bin")
181 ".*"))))))))
182 (home-page "https://nixos.org/hydra")
183 (synopsis "Continuous build system")
184 (description
185 "Hydra is a tool for continuous integration testing and software
186release that uses a purely functional language to describe build jobs and
187their dependencies.")
188 (license l:gpl3+))))
365de1e7
ML
189
190(define-public cuirass
08759829
LC
191 (let ((commit "0b40dca734468e8b12b3ff58e3e779679f17d38e")
192 (revision "21"))
365de1e7
ML
193 (package
194 (name "cuirass")
195 (version (string-append "0.0.1-" revision "." (string-take commit 7)))
196 (source (origin
197 (method git-fetch)
198 (uri (git-reference
0d43b12d 199 (url "https://git.savannah.gnu.org/git/guix/guix-cuirass.git")
365de1e7
ML
200 (commit commit)))
201 (file-name (string-append name "-" version))
202 (sha256
203 (base32
08759829 204 "1kdxs8dzdyldfs4wsz5hb64hprkbrnq5ljdll631f3bj8pbvvvc1"))))
365de1e7
ML
205 (build-system gnu-build-system)
206 (arguments
0d43b12d
LC
207 '(#:modules ((guix build utils)
208 (guix build gnu-build-system)
209 (ice-9 rdelim)
210 (ice-9 popen))
211
212 #:phases
365de1e7 213 (modify-phases %standard-phases
04927b6f
ML
214 (add-after 'unpack 'disable-repo-tests
215 (λ _
216 ;; Disable tests that use a connection to the Guix daemon.
217 (substitute* "Makefile.am"
218 (("tests/repo.scm \\\\") "\\"))
219 #t))
4561498e
KK
220 (add-after 'disable-repo-tests 'patch-/bin/sh
221 (lambda _
222 (substitute* "build-aux/git-version-gen"
223 (("#!/bin/sh") (string-append "#!" (which "sh"))))
224 #t))
365de1e7
ML
225 (add-after 'install 'wrap-program
226 (lambda* (#:key inputs outputs #:allow-other-keys)
227 ;; Wrap the 'cuirass' command to refer to the right modules.
228 (let* ((out (assoc-ref outputs "out"))
7903f00a 229 (gcrypt (assoc-ref inputs "guile-gcrypt"))
365de1e7
ML
230 (json (assoc-ref inputs "guile-json"))
231 (sqlite (assoc-ref inputs "guile-sqlite3"))
a6d05444
RW
232 (git (assoc-ref inputs "guile-git"))
233 (bytes (assoc-ref inputs "guile-bytestructures"))
d1688e6a 234 (fibers (assoc-ref inputs "guile-fibers"))
365de1e7 235 (guix (assoc-ref inputs "guix"))
7903f00a 236 (deps (list gcrypt json sqlite git bytes fibers guix))
0d43b12d
LC
237 (guile (assoc-ref %build-inputs "guile"))
238 (effective (read-line
239 (open-pipe* OPEN_READ
240 (string-append guile "/bin/guile")
241 "-c" "(display (effective-version))")))
7903f00a
LC
242 (mods (string-drop-right ;drop trailing colon
243 (string-join deps
244 (string-append "/share/guile/site/"
245 effective ":")
246 'suffix)
247 1))
248 (objs (string-drop-right
249 (string-join deps
250 (string-append "/lib/guile/" effective
251 "/site-ccache:")
252 'suffix)
253 1)))
a6d05444
RW
254 ;; Make sure 'cuirass' can find the 'evaluate' command, as
255 ;; well as the relevant Guile modules.
365de1e7 256 (wrap-program (string-append out "/bin/cuirass")
a6d05444 257 `("PATH" ":" prefix (,(string-append out "/bin")))
365de1e7 258 `("GUILE_LOAD_PATH" ":" prefix (,mods))
7903f00a 259 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,objs)))
2eadd828 260 #t))))))
365de1e7 261 (inputs
0d43b12d 262 `(("guile" ,guile-2.2)
d1688e6a 263 ("guile-fibers" ,guile-fibers)
7903f00a 264 ("guile-gcrypt" ,guile-gcrypt)
2252f087 265 ("guile-json" ,guile-json)
365de1e7 266 ("guile-sqlite3" ,guile-sqlite3)
a6d05444
RW
267 ("guile-git" ,guile-git)
268 ;; FIXME: this is propagated by "guile-git", but it needs to be among
269 ;; the inputs to add it to GUILE_LOAD_PATH.
270 ("guile-bytestructures" ,guile-bytestructures)
271 ("guix" ,guix)))
365de1e7
ML
272 (native-inputs
273 `(("autoconf" ,autoconf)
274 ("automake" ,automake)
44ccd962
ML
275 ("pkg-config" ,pkg-config)
276 ("texinfo" ,texinfo)))
1501cb55
LC
277 (native-search-paths
278 ;; For HTTPS access, Cuirass itself honors these variables, with the
279 ;; same semantics as Git and OpenSSL (respectively).
280 (list (search-path-specification
281 (variable "GIT_SSL_CAINFO")
282 (file-type 'regular)
283 (separator #f) ;single entry
284 (files '("etc/ssl/certs/ca-certificates.crt")))
285 (search-path-specification
286 (variable "SSL_CERT_DIR")
287 (files '("etc/ssl/certs")))))
365de1e7
ML
288 (synopsis "Continuous integration system")
289 (description
290 "Cuirass is a continuous integration tool using GNU Guix. It is
291intended as a replacement for Hydra.")
0d43b12d 292 (home-page "https://www.gnu.org/software/guix/")
365de1e7 293 (license l:gpl3+))))