Merge branch 'master' into core-updates
[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 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages ci)
20 #:use-module ((guix licenses) #:prefix l:)
21 #:use-module (gnu packages)
22 #:use-module (guix packages)
23 #:use-module (guix git-download)
24 #:use-module (gnu packages autotools)
25 #:use-module (gnu packages base)
26 #:use-module (gnu packages docbook)
27 #:use-module (gnu packages compression)
28 #:use-module (gnu packages databases)
29 #:use-module (gnu packages guile)
30 #:use-module (gnu packages mail)
31 #:use-module (gnu packages package-management)
32 #:use-module (gnu packages perl)
33 #:use-module (gnu packages pkg-config)
34 #:use-module (gnu packages tls)
35 #:use-module (gnu packages version-control)
36 #:use-module (gnu packages web)
37 #:use-module (gnu packages xml)
38 #:use-module (gnu packages zip)
39 #:use-module (guix build-system gnu))
40
41 (define-public hydra
42 (let ((commit "4c0e3e47034545ad3e9e86dd069138bcebb8ccee"))
43 (package
44 (name "hydra")
45 (version (string-append "20150407." (string-take commit 7)))
46 (source (origin
47 (method git-fetch)
48 (uri (git-reference
49 (url "https://github.com/NixOS/hydra")
50 (commit commit)))
51 (file-name (string-append name "-" version))
52 (sha256
53 (base32
54 "08vc76xb7f42hh65j7qvjf58hw36aki5ml343170pq94vk75b1nh"))
55 (patches (search-patches
56 "hydra-automake-1.15.patch"
57 ;; TODO: Remove once we have a darcs input
58 "hydra-disable-darcs-test.patch"))))
59 (build-system gnu-build-system)
60 (native-inputs
61 `(("unzip" ,unzip)
62 ("pkg-config" ,pkg-config)
63 ;; For documentation
64 ("dblatex" ,dblatex)
65 ("xsltproc" ,libxslt)
66 ("docbook-xsl" ,docbook-xsl)
67 ;; For bootstrap
68 ("autoconf" ,autoconf)
69 ("automake" ,automake)
70 ("libtool" ,libtool)
71 ;; For tests
72 ("git" ,git)
73 ("subversion" ,subversion)
74 ("mercurial" ,mercurial)
75 ("bazaar" ,bazaar)))
76 (inputs
77 `(("perl" ,perl)
78 ("guile" ,guile-2.0)
79 ("openssl" ,openssl)
80 ("bzip2" ,bzip2)
81 ("gzip" ,gzip)
82 ("sed" ,sed)
83 ("starman" ,starman)
84 ("git" ,git)
85 ("subversion" ,subversion)
86 ("mercurial" ,mercurial)
87 ("bazaar" ,bazaar)
88 ("nix" ,nix)
89 ;; Lots o' perl modules...
90 ("perl-catalyst-action-rest" ,perl-catalyst-action-rest)
91 ("perl-catalyst-authentication-store-dbix-class"
92 ,perl-catalyst-authentication-store-dbix-class)
93 ("perl-catalyst-devel" ,perl-catalyst-devel)
94 ("perl-catalyst-dispatchtype-regex" ,perl-catalyst-dispatchtype-regex)
95 ("perl-catalyst-plugin-accesslog" ,perl-catalyst-plugin-accesslog)
96 ("perl-catalyst-plugin-authorization-roles"
97 ,perl-catalyst-plugin-authorization-roles)
98 ("perl-catalyst-plugin-captcha" ,perl-catalyst-plugin-captcha)
99 ("perl-catalyst-plugin-session-state-cookie"
100 ,perl-catalyst-plugin-session-state-cookie)
101 ("perl-catalyst-plugin-session-store-fastmmap"
102 ,perl-catalyst-plugin-session-store-fastmmap)
103 ("perl-catalyst-plugin-stacktrace" ,perl-catalyst-plugin-stacktrace)
104 ("perl-catalyst-traitfor-request-proxybase"
105 ,perl-catalyst-traitfor-request-proxybase)
106 ("perl-catalyst-view-download" ,perl-catalyst-view-download)
107 ("perl-catalyst-view-json" ,perl-catalyst-view-json)
108 ("perl-catalyst-view-tt" ,perl-catalyst-view-tt)
109 ("perl-catalystx-roleapplicator" ,perl-catalystx-roleapplicator)
110 ("perl-catalystx-script-server-starman"
111 ,perl-catalystx-script-server-starman)
112 ("perl-crypt-randpasswd" ,perl-crypt-randpasswd)
113 ("perl-data-dump" ,perl-data-dump)
114 ("perl-datetime" ,perl-datetime)
115 ("perl-dbd-pg" ,perl-dbd-pg)
116 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
117 ("perl-digest-sha1" ,perl-digest-sha1)
118 ("perl-email-mime" ,perl-email-mime)
119 ("perl-email-sender" ,perl-email-sender)
120 ("perl-file-slurp" ,perl-file-slurp)
121 ("perl-io-compress" ,perl-io-compress)
122 ("perl-ipc-run" ,perl-ipc-run)
123 ("perl-json-any" ,perl-json-any)
124 ("perl-json-xs" ,perl-json-xs)
125 ("perl-libwww" ,perl-libwww)
126 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
127 ("perl-net-amazon-s3" ,perl-net-amazon-s3)
128 ("perl-padwalker" ,perl-padwalker)
129 ("perl-readonly" ,perl-readonly)
130 ("perl-set-scalar" ,perl-set-scalar)
131 ("perl-sql-splitstatement" ,perl-sql-splitstatement)
132 ("perl-sys-hostname-long" ,perl-sys-hostname-long)
133 ("perl-text-diff" ,perl-text-diff)
134 ("perl-text-table" ,perl-text-table)
135 ("perl-xml-simple" ,perl-xml-simple)))
136 (arguments
137 `(#:configure-flags
138 (let ((docbook (assoc-ref %build-inputs "docbook-xsl")))
139 (list (string-append "--with-docbook-xsl="
140 docbook "/xml/xsl/docbook-xsl-"
141 ,(package-version docbook-xsl))
142 (string-append "--docdir=" %output
143 "/doc/hydra-" ,version)))
144 #:phases (modify-phases %standard-phases
145 (add-after
146 'unpack 'bootstrap
147 (lambda _ (zero? (system* "autoreconf" "-vfi"))))
148 (add-before
149 'check 'check-setup
150 (lambda _ (setenv "LOGNAME" "test.log")))
151 (add-after
152 'install 'wrap-program
153 (lambda* (#:key inputs outputs #:allow-other-keys)
154 (let ((out (assoc-ref outputs "out")))
155 (for-each
156 (lambda (file)
157 (wrap-program file
158 `("PATH" ":" prefix
159 (,(string-append out "/bin")
160 ,@(map (lambda (i)
161 (string-append (assoc-ref inputs i)
162 "/bin"))
163 '("subversion" "git" "bazaar"
164 "mercurial" "coreutils" "gzip"
165 "sed" "unzip" "nix"))))
166 `("PERL5LIB" ":" prefix
167 (,(string-append out "/libexec/hydra/lib")
168 ,@(search-path-as-string->list
169 (getenv "PERL5LIB"))))
170 `("HYDRA_RELEASE" = (,,version))
171 `("HYDRA_HOME" =
172 (,(string-append out "/libexec/hydra")))
173 `("NIX_RELEASE" = (,,(package-version nix)))))
174 (find-files (string-append out "/bin")
175 ".*"))))))))
176 (home-page "https://nixos.org/hydra")
177 (synopsis "Continuous build system")
178 (description
179 "Hydra is a tool for continuous integration testing and software
180 release that uses a purely functional language to describe build jobs and
181 their dependencies.")
182 (license l:gpl3+))))