gnu: libmicrohttpd: Update to 0.9.46.
[jackhill/guix/guix.git] / gnu / packages / package-management.scm
CommitLineData
bbe8d8f0 1;;; GNU Guix --- Functional package management for GNU
2e69dd8c 2;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
8d422e25 3;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
bbe8d8f0
LC
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages package-management)
21 #:use-module (guix packages)
22 #:use-module (guix download)
480af4d6
LC
23 #:use-module (guix git-download)
24 #:use-module (guix utils)
bbe8d8f0 25 #:use-module (guix build-system gnu)
e3e1ecf6
LC
26 #:use-module (guix build-system python)
27 #:use-module ((guix licenses) #:select (gpl2+ gpl3+ lgpl2.1+ asl2.0))
8a43ff10 28 #:use-module (gnu packages)
bbe8d8f0 29 #:use-module (gnu packages guile)
e3e1ecf6
LC
30 #:use-module (gnu packages file)
31 #:use-module (gnu packages backup)
38cf2ba0 32 #:use-module (gnu packages compression)
bbe8d8f0 33 #:use-module (gnu packages gnupg)
5f96f303 34 #:use-module (gnu packages databases)
480af4d6
LC
35 #:use-module (gnu packages graphviz)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages gettext)
fcb0109d 39 #:use-module (gnu packages texinfo)
e3e1ecf6 40 #:use-module (gnu packages nettle)
fcb0109d
LC
41 #:use-module (gnu packages perl)
42 #:use-module (gnu packages curl)
43 #:use-module (gnu packages web)
e21adc76 44 #:use-module (gnu packages man)
b173d0e4 45 #:use-module (gnu packages emacs)
a7fd7b68 46 #:use-module (gnu packages bdw-gc)
e3e1ecf6
LC
47 #:use-module (gnu packages python)
48 #:use-module (gnu packages popt)
49 #:use-module (gnu packages gnuzilla)
50 #:use-module (gnu packages cpio)
a7fd7b68 51 #:use-module (gnu packages tls))
bbe8d8f0 52
39de700c
LC
53(define (boot-guile-uri arch)
54 "Return the URI for the bootstrap Guile tarball for ARCH."
55 (if (string=? "armhf" arch)
56 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
57 arch "-linux"
58 "/20150101/guile-2.0.11.tar.xz")
59 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
60 arch "-linux"
61 "/20131110/guile-2.0.9.tar.xz")))
62
43c082b3 63(define-public guix-0.9.0
bbe8d8f0
LC
64 (package
65 (name "guix")
43c082b3 66 (version "0.9.0")
bbe8d8f0
LC
67 (source (origin
68 (method url-fetch)
69 (uri (string-append "ftp://alpha.gnu.org/gnu/guix/guix-"
70 version ".tar.gz"))
71 (sha256
72 (base32
43c082b3 73 "0h573z2br0bf43sxyzia9xlm03n3y43zg1snds3c2piq2m6kabrn"))))
bbe8d8f0
LC
74 (build-system gnu-build-system)
75 (arguments
76 `(#:configure-flags (list
2d195e67 77 "--localstatedir=/var"
202adef2 78 "--sysconfdir=/etc"
dd3a42e6
MW
79 (string-append "--with-bash-completion-dir="
80 (assoc-ref %outputs "out")
81 "/etc/bash_completion.d")
bbe8d8f0
LC
82 (string-append "--with-libgcrypt-prefix="
83 (assoc-ref %build-inputs
84 "libgcrypt")))
dc57d527 85 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
02c2cf43
LC
86 #:phases (modify-phases %standard-phases
87 (add-before
88 'configure 'copy-bootstrap-guile
89 (lambda* (#:key system inputs #:allow-other-keys)
90 (define (boot-guile-version arch)
91 (if (string=? "armhf" arch)
92 "2.0.11"
93 "2.0.9"))
39de700c 94
02c2cf43
LC
95 (define (copy arch)
96 (let ((guile (assoc-ref inputs
97 (string-append "boot-guile/"
98 arch)))
99 (target (string-append "gnu/packages/bootstrap/"
100 arch "-linux/"
101 "/guile-"
102 (boot-guile-version arch)
103 ".tar.xz")))
104 (copy-file guile target)))
bbe8d8f0 105
02c2cf43
LC
106 (copy "i686")
107 (copy "x86_64")
108 (copy "mips64el")
109 (copy "armhf")
932e7204 110 #t))
5d09263b
LC
111 (add-after
112 'unpack 'disable-container-tests
113 ;; XXX FIXME: These tests fail within the build container.
114 (lambda _
115 (substitute* "tests/syscalls.scm"
116 (("^\\(test-assert \"(clone|setns|pivot-root)\"" all)
117 (string-append "(test-skip 1)\n" all)))
118 (substitute* "tests/containers.scm"
119 (("^\\(test-assert" all)
120 (string-append "(test-skip 1)\n" all)))
dc57d527
LC
121 (when (file-exists? "tests/guix-environment-container.sh")
122 (substitute* "tests/guix-environment-container.sh"
123 (("guix environment --version")
124 "exit 77\n")))
5d09263b 125 #t))
dc57d527
LC
126 (add-before 'check 'set-SHELL
127 (lambda _
128 ;; 'guix environment' tests rely on 'SHELL' having a
129 ;; correct value, so set it.
130 (setenv "SHELL" (which "sh"))
131 #t))
932e7204
LC
132 (add-after
133 'install 'wrap-program
134 (lambda* (#:key inputs outputs #:allow-other-keys)
135 ;; Make sure the 'guix' command finds GnuTLS and
136 ;; Guile-JSON automatically.
137 (let* ((out (assoc-ref outputs "out"))
138 (json (assoc-ref inputs "guile-json"))
139 (gnutls (assoc-ref inputs "gnutls"))
140 (path (string-append
141 json "/share/guile/site/2.0:"
142 gnutls "/share/guile/site/2.0")))
143 (wrap-program (string-append out "/bin/guix")
144 `("GUILE_LOAD_PATH" ":" prefix (,path))
145 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,path)))
146 #t))))))
b173d0e4 147 (native-inputs `(("pkg-config" ,pkg-config)
2d32d153 148 ("emacs" ,emacs-no-x))) ;for guix.el
bbe8d8f0
LC
149 (inputs
150 (let ((boot-guile (lambda (arch hash)
151 (origin
152 (method url-fetch)
39de700c 153 (uri (boot-guile-uri arch))
bbe8d8f0
LC
154 (sha256 hash)))))
155 `(("bzip2" ,bzip2)
2d195e67
LC
156 ("gzip" ,gzip)
157
bbe8d8f0
LC
158 ("sqlite" ,sqlite)
159 ("libgcrypt" ,libgcrypt)
160 ("guile" ,guile-2.0)
bbe8d8f0
LC
161
162 ("boot-guile/i686"
163 ,(boot-guile "i686"
164 (base32
8a43ff10 165 "0im800m30abgh7msh331pcbjvb4n02smz5cfzf1srv0kpx3csmxp")))
bbe8d8f0
LC
166 ("boot-guile/x86_64"
167 ,(boot-guile "x86_64"
168 (base32
8a43ff10
LC
169 "1w2p5zyrglzzniqgvyn1b55vprfzhgk8vzbzkkbdgl5248si0yq3")))
170 ("boot-guile/mips64el"
171 ,(boot-guile "mips64el"
172 (base32
39de700c
LC
173 "0fzp93lvi0hn54acc0fpvhc7bvl0yc853k62l958cihk03q80ilr")))
174 ("boot-guile/armhf"
175 ,(boot-guile "armhf"
176 (base32
177 "1mi3brl7l58aww34rawhvja84xc7l1b4hmwdmc36fp9q9mfx0lg5"))))))
f1082ec1 178 (propagated-inputs
45cbe390
TUBK
179 `(("gnutls" ,gnutls) ;for 'guix download' & co.
180 ("guile-json" ,guile-json)
f1082ec1
LC
181 ("geiser" ,geiser))) ;for guix.el
182
bbe8d8f0 183 (home-page "http://www.gnu.org/software/guix")
79c311b8 184 (synopsis "Functional package manager for installed software packages and versions")
bbe8d8f0 185 (description
79c311b8 186 "GNU Guix is a functional package manager for the GNU system, and is
c5779c93 187also a distribution thereof. It includes a virtual machine image. Besides
79c311b8 188the usual package management features, it also supports transactional
c5779c93
LC
189upgrades and roll-backs, per-user profiles, and much more. It is based on
190the Nix package manager.")
bbe8d8f0 191 (license gpl3+)))
30f25b03 192
3ad9a0b1 193(define guix-devel
480af4d6 194 ;; Development version of Guix.
1dccdb75
LC
195 ;;
196 ;; Note: use a short commit id; when using the long one, the limit on socket
197 ;; file names is exceeded while running the tests.
f8c0c8e4 198 (let ((commit "43c082b"))
43c082b3
LC
199 (package (inherit guix-0.9.0)
200 (version (string-append "0.9.0." commit))
480af4d6
LC
201 (source (origin
202 (method git-fetch)
203 (uri (git-reference
204 (url "git://git.sv.gnu.org/guix.git")
2e69dd8c 205 (commit commit)))
480af4d6
LC
206 (sha256
207 (base32
f8c0c8e4 208 "12ffsyrabsisyf5va4p2csvig6r8g4b7w1dxgsy446l4pjdl7ndh"))
e21adc76 209 (file-name (string-append "guix-" version "-checkout"))))
480af4d6 210 (arguments
43c082b3 211 (substitute-keyword-arguments (package-arguments guix-0.9.0)
c56ab21b
LC
212 ((#:configure-flags flags)
213 ;; Set 'DOT_USER_PROGRAM' to the empty string so we don't keep a
214 ;; reference to Graphviz, whose closure is pretty big (too big for
215 ;; the GuixSD installation image.)
216 `(cons "ac_cv_path_DOT_USER_PROGRAM=dot" ,flags))
480af4d6 217 ((#:phases phases)
b93c1d9d
MW
218 `(modify-phases ,phases
219 (add-after
220 'unpack 'bootstrap
221 (lambda _
222 ;; Make sure 'msgmerge' can modify the PO files.
223 (for-each (lambda (po)
224 (chmod po #o666))
225 (find-files "." "\\.po$"))
480af4d6 226
34582b30 227 (zero? (system* "sh" "bootstrap"))))))))
480af4d6
LC
228 (native-inputs
229 `(("autoconf" ,(autoconf-wrapper))
230 ("automake" ,automake)
231 ("gettext" ,gnu-gettext)
232 ("texinfo" ,texinfo)
233 ("graphviz" ,graphviz)
e21adc76 234 ("help2man" ,help2man)
43c082b3 235 ,@(package-native-inputs guix-0.9.0))))))
3ad9a0b1 236
f8c0c8e4 237(define-public guix guix-devel)
fcb0109d
LC
238
239(define-public nix
240 (package
241 (name "nix")
63c54622 242 (version "1.8")
fcb0109d
LC
243 (source (origin
244 (method url-fetch)
245 (uri (string-append "http://nixos.org/releases/nix/nix-"
246 version "/nix-" version ".tar.xz"))
247 (sha256
248 (base32
63c54622 249 "077hircacgi9y4n6kf48qp4laz1h3ab6sif3rcci1jy13f05w2m3"))))
fcb0109d
LC
250 (build-system gnu-build-system)
251 ;; XXX: Should we pass '--with-store-dir=/gnu/store'? But then we'd also
252 ;; need '--localstatedir=/var'. But then! The thing would use /var/nix
253 ;; instead of /var/guix. So in the end, we do nothing special.
254 (native-inputs `(("perl" ,perl)
255 ("pkg-config" ,pkg-config)))
256 (inputs `(("curl" ,curl)
257 ("openssl" ,openssl)
258 ("libgc" ,libgc)
259 ("sqlite" ,sqlite)
ae6904dc
EB
260 ("bzip2" ,bzip2)))
261 (propagated-inputs `(("perl-www-curl" ,perl-www-curl)
262 ("perl-dbi" ,perl-dbi)
263 ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
fcb0109d
LC
264 (home-page "http://nixos.org/nix/")
265 (synopsis "The Nix package manager")
266 (description
267 "Nix is a purely functional package manager. This means that it treats
268packages like values in purely functional programming languages such as
269Haskell—they are built by functions that don't have side-effects, and they
270never change after they have been built. Nix stores packages in the Nix
271store, usually the directory /nix/store, where each package has its own unique
272sub-directory.")
273 (license lgpl2.1+)))
8d422e25
RW
274
275(define-public stow
276 (package
277 (name "stow")
278 (version "2.2.0")
279 (source (origin
280 (method url-fetch)
281 (uri (string-append "mirror://gnu/stow/stow-"
282 version ".tar.gz"))
283 (sha256
284 (base32
285 "0arw1nsdlcvd7javkbk2bdvnc31d7dmb6fr25xyyi6ng76cxg2cb"))))
286 (build-system gnu-build-system)
287 (inputs
288 `(("perl" ,perl)))
289 (native-inputs
290 `(("perl-test-simple" ,perl-test-simple)
291 ("perl-test-output" ,perl-test-output)
292 ("perl-capture-tiny" ,perl-capture-tiny)))
293 (home-page "https://www.gnu.org/software/stow/")
294 (synopsis "Managing installed software packages")
295 (description
296 "GNU Stow is a symlink manager. It generates symlinks to directories
297of data and makes them appear to be merged into the same directory. It is
298typically used for managing software packages installed from source, by
299letting you install them apart in distinct directories and then create
300symlinks to the files in a common directory such as /usr/local.")
301 (license gpl2+)))
e3e1ecf6
LC
302
303(define-public rpm
304 (package
305 (name "rpm")
306 (version "4.12.0")
307 (source (origin
308 (method url-fetch)
309 (uri (string-append "http://rpm.org/releases/rpm-4.12.x/rpm-"
310 version ".tar.bz2"))
311 (sha256
312 (base32
313 "18hk47hc755nslvb7xkq4jb095z7va0nlcyxdpxayc4lmb8mq3bp"))))
314 (build-system gnu-build-system)
315 (arguments
316 '(#:configure-flags '("--with-external-db" ;use the system's bdb
317 "--enable-python"
318 "--without-lua")
319 #:phases (modify-phases %standard-phases
320 (add-before 'configure 'set-nspr-search-path
321 (lambda* (#:key inputs #:allow-other-keys)
322 ;; nspr.pc contains the right -I flag pointing to
323 ;; 'include/nspr', but unfortunately 'configure' doesn't
324 ;; use 'pkg-config'. Thus, augment CPATH.
325 ;; Likewise for NSS.
326 (let ((nspr (assoc-ref inputs "nspr"))
327 (nss (assoc-ref inputs "nss")))
328 (setenv "CPATH"
329 (string-append (getenv "CPATH") ":"
330 nspr "/include/nspr:"
331 nss "/include/nss"))
332 (setenv "LIBRARY_PATH"
333 (string-append (getenv "LIBRARY_PATH") ":"
334 nss "/lib/nss"))
335 #t)))
336 (add-after 'install 'fix-rpm-symlinks
337 (lambda* (#:key outputs #:allow-other-keys)
338 ;; 'make install' gets these symlinks wrong. Fix them.
339 (let* ((out (assoc-ref outputs "out"))
340 (bin (string-append out "/bin")))
341 (with-directory-excursion bin
342 (for-each (lambda (file)
343 (delete-file file)
344 (symlink "rpm" file))
345 '("rpmquery" "rpmverify"))
346 #t)))))))
347 (native-inputs
348 `(("pkg-config" ,pkg-config)))
349 (inputs
350 `(("python" ,python-2)
351 ("xz" ,xz)
352 ("bdb" ,bdb)
353 ("popt" ,popt)
354 ("nss" ,nss)
355 ("nspr" ,nspr)
356 ("libarchive" ,libarchive)
357 ("nettle" ,nettle) ;XXX: actually a dependency of libarchive
358 ("file" ,file)
359 ("bzip2" ,bzip2)
360 ("zlib" ,zlib)
361 ("cpio" ,cpio)))
362 (home-page "http://www.rpm.org/")
363 (synopsis "The RPM Package Manager")
364 (description
365 "The RPM Package Manager (RPM) is a command-line driven package
366management system capable of installing, uninstalling, verifying, querying,
367and updating computer software packages. Each software package consists of an
368archive of files along with information about the package like its version, a
369description. There is also a library permitting developers to manage such
370transactions from C or Python.")
371
372 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
373 (license gpl2+)))
374
08dcff47
LC
375(define-public diffoscope
376 (package
377 (name "diffoscope")
378 (version "34")
379 (source (origin
380 (method git-fetch)
381 (uri (git-reference
382 (url
383 "https://anonscm.debian.org/cgit/reproducible/diffoscope.git")
384 (commit version)))
385 (sha256
386 (base32
387 "1g8b7bpkmns0355gkr3a244affwx4xzqwahwsl6ivw4z0qv7dih8"))
388 (file-name (string-append name "-" version "-checkout"))))
389 (build-system python-build-system)
390 (arguments
391 `(#:python ,python-2
392 #:phases (modify-phases %standard-phases
393 (add-before 'build 'disable-egg-zipping
394 (lambda _
395 ;; Leave the .egg file uncompressed.
396 (let ((port (open-file "setup.cfg" "a")))
397 (display "\n[easy_install]\nzip_ok = 0\n"
398 port)
399 (close-port port)
400 #t)))
401 (add-before 'build 'dependency-on-rpm
402 (lambda _
403 (substitute* "setup.py"
404 ;; Somehow this requirement is reported as not met,
405 ;; even though rpm.py is in the search path. So
406 ;; delete it.
407 (("'rpm-python',") ""))
408 #t)))
409 ;; FIXME: Some obscure test failures.
410 #:tests? #f))
411 (inputs `(("rpm" ,rpm) ;for rpm-python
412 ("python-file" ,python2-file)
413 ("python-debian" ,python2-debian)
414 ("python-libarchive-c" ,python2-libarchive-c)
415 ("python-tlsh" ,python2-tlsh)
416
417 ;; Below are modules used for tests.
418 ("python-pytest" ,python2-pytest)
419 ("python-chardet" ,python2-chardet)))
420 (native-inputs `(("python-setuptools" ,python2-setuptools)))
421 (home-page "http://diffoscope.org/")
422 (synopsis "Compare files, archives, and directories in depth")
423 (description
424 "Diffoscope tries to get to the bottom of what makes files or directories
425different. It recursively unpacks archives of many kinds and transforms
426various binary formats into more human readable forms to compare them. It can
427compare two tarballs, ISO images, or PDFs just as easily.")
428 (license gpl3+)))