gnu: r-genelendatabase: Update to 1.18.0.
[jackhill/guix/guix.git] / gnu / packages / package-management.scm
CommitLineData
bbe8d8f0 1;;; GNU Guix --- Functional package management for GNU
0991fd53 2;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
5dbeccf5 3;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
513d35f1 4;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
49d9fce8 5;;; Copyright © 2017, 2018 Oleg Pykhalov <go.wigust@gmail.com>
58a308e0 6;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
a1785cfb 7;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
76fa5e04 8;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
89ea6252 9;;; Copyright © 2018, 2019 Rutger Helling <rhelling@mykolab.com>
3d391309 10;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
6f1ce09d 11;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
e227f248 12;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
706460a3 13;;; Copyright © 2019 Vagrant Cascadian <vagrant@reproducible-builds.org>
bbe8d8f0
LC
14;;;
15;;; This file is part of GNU Guix.
16;;;
17;;; GNU Guix is free software; you can redistribute it and/or modify it
18;;; under the terms of the GNU General Public License as published by
19;;; the Free Software Foundation; either version 3 of the License, or (at
20;;; your option) any later version.
21;;;
22;;; GNU Guix is distributed in the hope that it will be useful, but
23;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25;;; GNU General Public License for more details.
26;;;
27;;; You should have received a copy of the GNU General Public License
28;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30(define-module (gnu packages package-management)
8a43ff10 31 #:use-module (gnu packages)
37756a13 32 #:use-module (gnu packages acl)
3d391309
SB
33 #:use-module (gnu packages attr)
34 #:use-module (gnu packages avahi)
37756a13 35 #:use-module (gnu packages autotools)
e3e1ecf6 36 #:use-module (gnu packages backup)
8a973abc 37 #:use-module (gnu packages base)
37756a13 38 #:use-module (gnu packages bdw-gc)
3d391309 39 #:use-module (gnu packages bison)
3e5750af 40 #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
ac257f12 41 #:use-module (gnu packages check)
38cf2ba0 42 #:use-module (gnu packages compression)
37756a13 43 #:use-module (gnu packages cpio)
e6c8199b 44 #:use-module (gnu packages crypto)
37756a13 45 #:use-module (gnu packages curl)
255d1bbe 46 #:use-module (gnu packages dbm)
3d391309 47 #:use-module (gnu packages docbook)
37756a13 48 #:use-module (gnu packages file)
480af4d6 49 #:use-module (gnu packages gettext)
98a11b7f 50 #:use-module (gnu packages glib)
cb390925 51 #:use-module (gnu packages gnome)
37756a13
TGR
52 #:use-module (gnu packages gnupg)
53 #:use-module (gnu packages gnuzilla)
54 #:use-module (gnu packages graphviz)
36e1ab84 55 #:use-module (gnu packages gtk)
37756a13 56 #:use-module (gnu packages guile)
0791437f 57 #:use-module (gnu packages guile-xyz)
cb390925 58 #:use-module (gnu packages linux)
58a308e0 59 #:use-module (gnu packages lisp)
37756a13 60 #:use-module (gnu packages man)
e3e1ecf6 61 #:use-module (gnu packages nettle)
37756a13 62 #:use-module (gnu packages patchutils)
fcb0109d 63 #:use-module (gnu packages perl)
5ccde207 64 #:use-module (gnu packages perl-check)
37756a13
TGR
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages popt)
e3e1ecf6 67 #:use-module (gnu packages python)
1b2f753d 68 #:use-module (gnu packages python-web)
44d10b1f 69 #:use-module (gnu packages python-xyz)
37756a13 70 #:use-module (gnu packages serialization)
cd0322a3 71 #:use-module (gnu packages sqlite)
37756a13
TGR
72 #:use-module (gnu packages ssh)
73 #:use-module (gnu packages texinfo)
33dc54b0 74 #:use-module (gnu packages time)
04eb0fab 75 #:use-module (gnu packages tls)
5dbeccf5 76 #:use-module (gnu packages vim)
36e1ab84 77 #:use-module (gnu packages virtualization)
37756a13 78 #:use-module (gnu packages web)
cb390925 79 #:use-module (gnu packages xml)
36e1ab84 80 #:use-module (gnu packages xorg)
37756a13 81 #:use-module (guix build-system gnu)
44118720 82 #:use-module (guix build-system meson)
37756a13
TGR
83 #:use-module (guix build-system python)
84 #:use-module (guix download)
85 #:use-module (guix gexp)
86 #:use-module (guix git-download)
7ed6343f 87 #:use-module ((guix licenses) #:prefix license:)
37756a13
TGR
88 #:use-module (guix packages)
89 #:use-module (guix utils)
90 #:use-module (ice-9 match)
91 #:use-module (srfi srfi-1))
bbe8d8f0 92
39de700c
LC
93(define (boot-guile-uri arch)
94 "Return the URI for the bootstrap Guile tarball for ARCH."
aef81a81
LC
95 (cond ((string=? "armhf" arch)
96 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
97 arch "-linux"
98 "/20150101/guile-2.0.11.tar.xz"))
99 ((string=? "aarch64" arch)
b31b0155
LC
100 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
101 arch "-linux/20170217/guile-2.0.14.tar.xz"))
aef81a81
LC
102 (else
103 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
104 arch "-linux"
105 "/20131110/guile-2.0.9.tar.xz"))))
39de700c 106
994a1494
LC
107(define-public guix
108 ;; Latest version of Guix, which may or may not correspond to a release.
94fa8d76
LC
109 ;; Note: the 'update-guix-package.scm' script expects this definition to
110 ;; start precisely like this.
c845323d 111 (let ((version "0.16.0")
95c910f4
LF
112 (commit "2637cfd7a4894ef2a2a7da3bb46d8815c43d7e75")
113 (revision 10))
994a1494
LC
114 (package
115 (name "guix")
ab2419e5 116
994a1494
LC
117 (version (if (zero? revision)
118 version
119 (string-append version "-"
120 (number->string revision)
4b7917f2 121 "." (string-take commit 7))))
994a1494
LC
122 (source (origin
123 (method git-fetch)
124 (uri (git-reference
125 (url "https://git.savannah.gnu.org/r/guix.git")
126 (commit commit)))
127 (sha256
128 (base32
95c910f4 129 "1m734gm45x9czqspsagdfxfgw5wiiinyq1s6zc9gfv7d3b2w472k"))
994a1494
LC
130 (file-name (string-append "guix-" version "-checkout"))))
131 (build-system gnu-build-system)
132 (arguments
133 `(#:configure-flags (list
134 "--localstatedir=/var"
135 "--sysconfdir=/etc"
136 (string-append "--with-bash-completion-dir="
137 (assoc-ref %outputs "out")
138 "/etc/bash_completion.d")
139 (string-append "--with-libgcrypt-prefix="
140 (assoc-ref %build-inputs
141 "libgcrypt"))
142
143 ;; Set 'DOT_USER_PROGRAM' to the empty string so
144 ;; we don't keep a reference to Graphviz, whose
145 ;; closure is pretty big (too big for the GuixSD
146 ;; installation image.)
4b7917f2
LC
147 "ac_cv_path_DOT_USER_PROGRAM=dot"
148
149 ;; To avoid problems with the length of shebangs,
150 ;; choose a fixed-width and short directory name
151 ;; for tests.
152 "ac_cv_guix_test_root=/tmp/guix-tests")
994a1494
LC
153 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
154
155 #:modules ((guix build gnu-build-system)
156 (guix build utils)
c9117162 157 (srfi srfi-26)
994a1494
LC
158 (ice-9 popen)
159 (ice-9 rdelim))
160
161 #:phases (modify-phases %standard-phases
189be331 162 (replace 'bootstrap
994a1494
LC
163 (lambda _
164 ;; Make sure 'msgmerge' can modify the PO files.
165 (for-each (lambda (po)
166 (chmod po #o666))
167 (find-files "." "\\.po$"))
ab2419e5 168
8833a647
LC
169 (patch-shebang "build-aux/git-version-gen")
170
91c619eb
LC
171 (call-with-output-file ".tarball-version"
172 (lambda (port)
173 (display ,version port)))
174
92fcb831 175 (invoke "sh" "bootstrap")))
59127916 176 (add-before 'check 'copy-bootstrap-guile
994a1494 177 (lambda* (#:key system inputs #:allow-other-keys)
59127916
LC
178 ;; Copy the bootstrap guile tarball in the store used
179 ;; by the test suite.
180 (define (intern tarball)
181 (let ((base (strip-store-file-name tarball)))
182 (copy-file tarball base)
183 (invoke "./test-env" "guix" "download"
184 (string-append "file://" (getcwd)
185 "/" base))
186 (delete-file base)))
39de700c 187
bbe8d8f0 188
59127916
LC
189 (intern (assoc-ref inputs "boot-guile"))
190
191 ;; On x86_64 some tests need the i686 Guile.
192 ,@(if (and (not (%current-target-system))
193 (string=? (%current-system)
194 "x86_64-linux"))
195 '((intern (assoc-ref inputs "boot-guile/i686")))
196 '())
994a1494 197 #t))
40e89f5b 198 (add-after 'unpack 'disable-failing-tests
994a1494
LC
199 ;; XXX FIXME: These tests fail within the build container.
200 (lambda _
201 (substitute* "tests/syscalls.scm"
202 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
203 (string-append "(test-skip 1)\n" all)))
204 (substitute* "tests/containers.scm"
205 (("^\\(test-(assert|equal)" all)
206 (string-append "(test-skip 1)\n" all)))
207 (when (file-exists? "tests/guix-environment-container.sh")
208 (substitute* "tests/guix-environment-container.sh"
209 (("guix environment --version")
210 "exit 77\n")))
211 #t))
212 (add-before 'check 'set-SHELL
213 (lambda _
214 ;; 'guix environment' tests rely on 'SHELL' having a
215 ;; correct value, so set it.
216 (setenv "SHELL" (which "sh"))
217 #t))
218 (add-after 'install 'wrap-program
219 (lambda* (#:key inputs outputs #:allow-other-keys)
dd1640ee
LC
220 ;; Make sure the 'guix' command finds GnuTLS,
221 ;; Guile-JSON, and Guile-Git automatically.
994a1494
LC
222 (let* ((out (assoc-ref outputs "out"))
223 (guile (assoc-ref inputs "guile"))
ca719424 224 (gcrypt (assoc-ref inputs "guile-gcrypt"))
994a1494 225 (json (assoc-ref inputs "guile-json"))
c5a2e1ff 226 (sqlite (assoc-ref inputs "guile-sqlite3"))
9ca8aa38 227 (git (assoc-ref inputs "guile-git"))
dd1640ee
LC
228 (bs (assoc-ref inputs
229 "guile-bytestructures"))
994a1494
LC
230 (ssh (assoc-ref inputs "guile-ssh"))
231 (gnutls (assoc-ref inputs "gnutls"))
8a973abc 232 (locales (assoc-ref inputs "glibc-utf8-locales"))
ca719424
LC
233 (deps (list gcrypt json sqlite gnutls
234 git bs ssh))
994a1494
LC
235 (effective
236 (read-line
237 (open-pipe* OPEN_READ
238 (string-append guile "/bin/guile")
239 "-c" "(display (effective-version))")))
c9117162
LC
240 (path (string-join
241 (map (cut string-append <>
242 "/share/guile/site/"
243 effective)
6f1ce09d 244 (delete #f deps))
c9117162
LC
245 ":"))
246 (gopath (string-join
247 (map (cut string-append <>
248 "/lib/guile/" effective
249 "/site-ccache")
6f1ce09d 250 (delete #f deps))
8a973abc
LC
251 ":"))
252 (locpath (string-append locales "/lib/locale")))
61cdad35 253
994a1494
LC
254 (wrap-program (string-append out "/bin/guix")
255 `("GUILE_LOAD_PATH" ":" prefix (,path))
8a973abc
LC
256 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
257 `("GUIX_LOCPATH" ":" suffix (,locpath)))
61cdad35 258
994a1494
LC
259 #t))))))
260 (native-inputs `(("pkg-config" ,pkg-config)
a7db8540 261
994a1494
LC
262 ;; XXX: Keep the development inputs here even though
263 ;; they're unnecessary, just so that 'guix environment
264 ;; guix' always contains them.
464f5447 265 ("autoconf" ,autoconf-wrapper)
994a1494
LC
266 ("automake" ,automake)
267 ("gettext" ,gettext-minimal)
268 ("texinfo" ,texinfo)
269 ("graphviz" ,graphviz)
76fa5e04
JL
270 ("help2man" ,help2man)
271 ("po4a" ,po4a)))
994a1494 272 (inputs
3e5750af
LC
273 `(("bzip2" ,bzip2)
274 ("gzip" ,gzip)
275 ("zlib" ,zlib) ;for 'guix publish'
2d195e67 276
3e5750af
LC
277 ("sqlite" ,sqlite)
278 ("libgcrypt" ,libgcrypt)
4e80516c 279
2abd76e8 280 ("guile" ,guile-2.2)
bbe8d8f0 281
59127916
LC
282 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
283 ;; have it here.
284 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
272c0709
CM
285 ;; Some of the tests use "unshare" when it is available.
286 ("util-linux" ,util-linux)
59127916
LC
287 ,@(if (and (not (%current-target-system))
288 (string=? (%current-system) "x86_64-linux"))
289 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
8a973abc
LC
290 '())
291
292 ("glibc-utf8-locales" ,glibc-utf8-locales)))
994a1494 293 (propagated-inputs
52cabc6f 294 `(("gnutls" ,gnutls)
ca719424 295 ("guile-gcrypt" ,guile-gcrypt)
2252f087 296 ("guile-json" ,guile-json)
c5a2e1ff 297 ("guile-sqlite3" ,guile-sqlite3)
9ca8aa38
LC
298 ("guile-ssh" ,guile-ssh)
299 ("guile-git" ,guile-git)))
f1082ec1 300
994a1494
LC
301 (home-page "https://www.gnu.org/software/guix/")
302 (synopsis "Functional package manager for installed software packages and versions")
303 (description
304 "GNU Guix is a functional package manager for the GNU system, and is
c5779c93 305also a distribution thereof. It includes a virtual machine image. Besides
79c311b8 306the usual package management features, it also supports transactional
c5779c93
LC
307upgrades and roll-backs, per-user profiles, and much more. It is based on
308the Nix package manager.")
7ed6343f 309 (license license:gpl3+)
994a1494 310 (properties '((ftp-server . "alpha.gnu.org"))))))
3ad9a0b1 311
baed9236
LC
312(define-public guix-daemon
313 ;; This package is for internal consumption: it allows us to quickly build
314 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
315 ;; pull'.
316 (package
317 (inherit guix)
318 (properties `((hidden? . #t)))
319 (name "guix-daemon")
320
321 ;; Use a minimum set of dependencies.
322 (native-inputs
323 (fold alist-delete (package-native-inputs guix)
324 '("po4a" "graphviz" "help2man")))
325 (inputs
326 `(("gnutls" ,gnutls)
327 ("guile-git" ,guile-git)
5118e26f 328 ("guile-json" ,guile-json)
3b0153bd 329 ("guile-gcrypt" ,guile-gcrypt)
1fb947f6
LC
330 ,@(fold alist-delete (package-inputs guix)
331 '("boot-guile" "boot-guile/i686" "util-linux"))))
332
baed9236
LC
333 (propagated-inputs '())
334
335 (arguments
336 (substitute-keyword-arguments (package-arguments guix)
1fb947f6
LC
337 ((#:configure-flags flags '())
338 ;; Pretend we have those libraries; we don't actually need them.
339 `(append ,flags
340 '("guix_cv_have_recent_guile_sqlite3=yes"
341 "guix_cv_have_recent_guile_ssh=yes")))
baed9236
LC
342 ((#:tests? #f #f)
343 #f)
344 ((#:phases phases '%standard-phases)
345 `(modify-phases ,phases
346 (replace 'build
347 (lambda _
348 (invoke "make" "nix/libstore/schema.sql.hh")
349 (invoke "make" "-j" (number->string
350 (parallel-job-count))
351 "guix-daemon")))
352 (delete 'copy-bootstrap-guile)
353 (replace 'install
354 (lambda* (#:key outputs #:allow-other-keys)
355 (invoke "make" "install-binPROGRAMS"
0a9d1c5a 356 "install-nodist_pkglibexecSCRIPTS")
baed9236
LC
357
358 ;; We need to tell 'guix-daemon' which 'guix' command to use.
ed9d7cb4
LC
359 ;; Here we use a questionable hack where we hard-code root's
360 ;; current guix, which could be wrong (XXX). Note that scripts
361 ;; like 'guix perform-download' do not run as root so we assume
362 ;; that they have access to /var/guix/profiles/per-user/root.
baed9236
LC
363 (let ((out (assoc-ref outputs "out")))
364 (substitute* (find-files (string-append out "/libexec"))
365 (("exec \".*/bin/guix\"")
765a5bf1 366 "exec \"${GUIX:-/var/guix/profiles/per-user/root/current-guix/bin/guix}\""))
baed9236
LC
367 #t)))
368 (delete 'wrap-program)))))))
369
82ce81ba 370(define-public guile2.0-guix
0991fd53 371 (deprecated-package "guile2.0-guix" guix))
82ce81ba 372
6f1ce09d
EB
373(define-public guix-minimal
374 ;; A version of Guix which is built with the minimal set of dependencies, as
375 ;; outlined in the README "Requirements" section. Intended as a CI job, so
376 ;; marked as hidden.
0991fd53
LC
377 (hidden-package
378 (package
379 (inherit guix)
380 (name "guix-minimal")
381 (inputs
382 `(("guile" ,guile-2.2)
383 ,@(alist-delete "guile" (package-inputs guix))))
384 (propagated-inputs
385 (fold alist-delete
386 (package-propagated-inputs guix)
387 '("guile-ssh"))))))
6f1ce09d 388
04eb0fab
LC
389(define (source-file? file stat)
390 "Return true if FILE is likely a source file, false if it is a typical
391generated file."
392 (define (wrong-extension? file)
393 (or (string-suffix? "~" file)
394 (member (file-extension file)
395 '("o" "a" "lo" "so" "go"))))
396
397 (match (basename file)
398 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
399 #f)
400 ((? wrong-extension?)
401 #f)
402 (_
403 #t)))
404
7e6d8d36
LC
405(define-public current-guix-package
406 ;; This parameter allows callers to override the package that 'current-guix'
407 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
408 ;; for instance because it's not running from a source code checkout.
409 (make-parameter #f))
410
04eb0fab 411(define-public current-guix
a9d5e4be
CB
412 (let* ((repository-root (canonicalize-path
413 (string-append (current-source-directory)
414 "/../..")))
415 (select? (delay (or (git-predicate repository-root)
416 source-file?))))
04eb0fab
LC
417 (lambda ()
418 "Return a package representing Guix built from the current source tree.
419This works by adding the current source tree to the store (after filtering it
420out) and returning a package that uses that as its 'source'."
7e6d8d36
LC
421 (or (current-guix-package)
422 (package
423 (inherit guix)
424 (version (string-append (package-version guix) "+"))
425 (source (local-file repository-root "guix-current"
426 #:recursive? #t
427 #:select? (force select?))))))))
04eb0fab
LC
428
429\f
430;;;
431;;; Other tools.
432;;;
433
fcb0109d
LC
434(define-public nix
435 (package
436 (name "nix")
e6c8199b 437 (version "2.0.4")
fcb0109d
LC
438 (source (origin
439 (method url-fetch)
440 (uri (string-append "http://nixos.org/releases/nix/nix-"
441 version "/nix-" version ".tar.xz"))
442 (sha256
443 (base32
e6c8199b 444 "0ss9svxlh1pvrdmnqjvjyqjmbqmrdbyfarvbb14i9d4bggzl0r8n"))))
fcb0109d 445 (build-system gnu-build-system)
e6c8199b 446 (native-inputs `(("pkg-config" ,pkg-config)))
fcb0109d 447 (inputs `(("curl" ,curl)
e6c8199b 448 ("bzip2" ,bzip2)
fcb0109d 449 ("libgc" ,libgc)
e6c8199b
SB
450 ("libseccomp" ,libseccomp)
451 ("libsodium" ,libsodium)
452 ("openssl" ,openssl)
fcb0109d 453 ("sqlite" ,sqlite)
e6c8199b 454 ("xz" ,xz)))
775989c7 455 (home-page "https://nixos.org/nix/")
fcb0109d
LC
456 (synopsis "The Nix package manager")
457 (description
458 "Nix is a purely functional package manager. This means that it treats
459packages like values in purely functional programming languages such as
460Haskell—they are built by functions that don't have side-effects, and they
461never change after they have been built. Nix stores packages in the Nix
462store, usually the directory /nix/store, where each package has its own unique
463sub-directory.")
7ed6343f 464 (license license:lgpl2.1+)))
a881a40c 465
8d422e25
RW
466(define-public stow
467 (package
468 (name "stow")
ddfd70da 469 (version "2.2.2")
8d422e25
RW
470 (source (origin
471 (method url-fetch)
472 (uri (string-append "mirror://gnu/stow/stow-"
473 version ".tar.gz"))
474 (sha256
475 (base32
ddfd70da 476 "1pvky9fayms4r6fhns8jd0vavszd7d979w62vfd5n88v614pdxz2"))))
8d422e25
RW
477 (build-system gnu-build-system)
478 (inputs
479 `(("perl" ,perl)))
480 (native-inputs
481 `(("perl-test-simple" ,perl-test-simple)
482 ("perl-test-output" ,perl-test-output)
ddfd70da
LC
483 ("perl-capture-tiny" ,perl-capture-tiny)
484 ("perl-io-stringy" ,perl-io-stringy)))
8d422e25
RW
485 (home-page "https://www.gnu.org/software/stow/")
486 (synopsis "Managing installed software packages")
487 (description
488 "GNU Stow is a symlink manager. It generates symlinks to directories
489of data and makes them appear to be merged into the same directory. It is
490typically used for managing software packages installed from source, by
491letting you install them apart in distinct directories and then create
492symlinks to the files in a common directory such as /usr/local.")
7ed6343f 493 (license license:gpl2+)))
e3e1ecf6
LC
494
495(define-public rpm
496 (package
497 (name "rpm")
91a3c800 498 (version "4.14.2")
e3e1ecf6
LC
499 (source (origin
500 (method url-fetch)
623cc34c
EB
501 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
502 (version-major+minor version) ".x/rpm-"
e3e1ecf6
LC
503 version ".tar.bz2"))
504 (sha256
505 (base32
91a3c800 506 "0armd7dqr8bl0isx8l4xlylm7dikasmxhhcbz336fkp2x30w5jw0"))))
e3e1ecf6
LC
507 (build-system gnu-build-system)
508 (arguments
509 '(#:configure-flags '("--with-external-db" ;use the system's bdb
510 "--enable-python"
511 "--without-lua")
512 #:phases (modify-phases %standard-phases
91a3c800 513 (add-before 'configure 'set-nss-library-path
e3e1ecf6 514 (lambda* (#:key inputs #:allow-other-keys)
91a3c800 515 (let ((nss (assoc-ref inputs "nss")))
e3e1ecf6
LC
516 (setenv "LIBRARY_PATH"
517 (string-append (getenv "LIBRARY_PATH") ":"
518 nss "/lib/nss"))
91a3c800 519 #t))))))
e3e1ecf6
LC
520 (native-inputs
521 `(("pkg-config" ,pkg-config)))
522 (inputs
523 `(("python" ,python-2)
524 ("xz" ,xz)
525 ("bdb" ,bdb)
526 ("popt" ,popt)
527 ("nss" ,nss)
528 ("nspr" ,nspr)
529 ("libarchive" ,libarchive)
530 ("nettle" ,nettle) ;XXX: actually a dependency of libarchive
531 ("file" ,file)
532 ("bzip2" ,bzip2)
533 ("zlib" ,zlib)
534 ("cpio" ,cpio)))
91a3c800 535 (home-page "http://rpm.org/")
e3e1ecf6
LC
536 (synopsis "The RPM Package Manager")
537 (description
538 "The RPM Package Manager (RPM) is a command-line driven package
539management system capable of installing, uninstalling, verifying, querying,
540and updating computer software packages. Each software package consists of an
541archive of files along with information about the package like its version, a
542description. There is also a library permitting developers to manage such
543transactions from C or Python.")
544
545 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
7ed6343f 546 (license license:gpl2+)))
e3e1ecf6 547
08dcff47
LC
548(define-public diffoscope
549 (package
550 (name "diffoscope")
11599cff 551 (version "113")
08dcff47 552 (source (origin
7dd21101
LF
553 (method url-fetch)
554 (uri (pypi-uri name version))
08dcff47
LC
555 (sha256
556 (base32
11599cff 557 "10wjri6vsqxf2nb7jjhsq38qlpf407b4qrdczrk696aa1v71i44w"))))
08dcff47
LC
558 (build-system python-build-system)
559 (arguments
7dd21101
LF
560 `(#:phases (modify-phases %standard-phases
561 ;; setup.py mistakenly requires python-magic from PyPi, even
562 ;; though the Python bindings of `file` are sufficient.
563 ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844
564 (add-after 'unpack 'dependency-on-python-magic
565 (lambda _
566 (substitute* "setup.py"
5dbeccf5 567 (("'python-magic',") ""))))
c1d80c7a
JL
568 ;; This test is broken because our `file` package has a
569 ;; bug in berkeley-db file type detection.
570 (add-after 'unpack 'remove-berkeley-test
571 (lambda _
572 (delete-file "tests/comparators/test_berkeley_db.py")
573 #t))
5dbeccf5
RW
574 (add-after 'unpack 'embed-tool-references
575 (lambda* (#:key inputs #:allow-other-keys)
025519fa 576 (substitute* "diffoscope/comparators/utils/compare.py"
5dbeccf5
RW
577 (("\\['xxd',")
578 (string-append "['" (which "xxd") "',")))
579 (substitute* "diffoscope/comparators/elf.py"
580 (("@tool_required\\('readelf'\\)") "")
2af6be91
KK
581 (("get_tool_name\\('readelf'\\)")
582 (string-append "'" (which "readelf") "'")))
583 (substitute* "diffoscope/comparators/directory.py"
584 (("@tool_required\\('stat'\\)") "")
585 (("@tool_required\\('getfacl'\\)") "")
586 (("\\['stat',")
587 (string-append "['" (which "stat") "',"))
588 (("\\['getfacl',")
589 (string-append "['" (which "getfacl") "',")))
63b7fbe1
GB
590 #t))
591 (add-before 'check 'delete-failing-test
592 (lambda _
593 (delete-file "tests/test_tools.py") ;this requires /sbin to be on the path
5dbeccf5 594 #t)))))
08dcff47 595 (inputs `(("rpm" ,rpm) ;for rpm-python
7dd21101
LF
596 ("python-file" ,python-file)
597 ("python-debian" ,python-debian)
598 ("python-libarchive-c" ,python-libarchive-c)
599 ("python-tlsh" ,python-tlsh)
2af6be91 600 ("acl" ,acl) ;for getfacl
5dbeccf5 601 ("colordiff" ,colordiff)
9fc513ad 602 ("xxd" ,xxd)
08dcff47
LC
603
604 ;; Below are modules used for tests.
7dd21101
LF
605 ("python-pytest" ,python-pytest)
606 ("python-chardet" ,python-chardet)))
54360c91 607 (home-page "https://diffoscope.org/")
08dcff47
LC
608 (synopsis "Compare files, archives, and directories in depth")
609 (description
610 "Diffoscope tries to get to the bottom of what makes files or directories
611different. It recursively unpacks archives of many kinds and transforms
612various binary formats into more human readable forms to compare them. It can
613compare two tarballs, ISO images, or PDFs just as easily.")
7ed6343f 614 (license license:gpl3+)))
513d35f1 615
706460a3
VC
616(define-public trydiffoscope
617 (package
618 (name "trydiffoscope")
619 (version "67.0.1")
620 (source
621 (origin
622 (method git-fetch)
623 (uri (git-reference
624 (url "https://salsa.debian.org/reproducible-builds/trydiffoscope.git")
625 (commit version)))
626 (file-name (git-file-name name version))
627 (sha256
628 (base32
629 "03b66cjii7l2yiwffj6ym6mycd5drx7prfp4j2550281pias6mjh"))))
630 (arguments
631 `(#:phases
632 (modify-phases %standard-phases
633 (add-after 'install 'install-doc
634 (lambda* (#:key outputs #:allow-other-keys)
635 (let* ((share (string-append (assoc-ref outputs "out") "/share/")))
636 (mkdir-p (string-append share "/man/man1/" ))
637 (invoke "rst2man.py"
638 "trydiffoscope.1.rst"
639 (string-append share "/man/man1/trydiffoscope.1"))
640 (mkdir-p (string-append share "/doc/" ,name "-" ,version))
641 (install-file "./README.rst"
642 (string-append share "/doc/" ,name "-" ,version)))
643 #t)))))
644 (propagated-inputs
645 `(("python-requests" ,python-requests)))
646 (native-inputs
647 `(("gzip" ,gzip)
648 ("python-docutils" ,python-docutils)))
649 (build-system python-build-system)
650 (home-page "https://try.diffoscope.org")
651 (synopsis "Client for remote diffoscope service")
652 (description "This is a client for the @url{https://try.diffoscope.org,
653remote diffoscope service}.
654
655Diffoscope tries to get to the bottom of what makes files or directories
656different. It recursively unpacks archives of many kinds and transforms
657various binary formats into more human readable forms to compare them. It can
658compare two tarballs, ISO images, or PDFs just as easily.
659
660Results are displayed by default, stored as local text or html files, or made
661available via a URL on @url{https://try.diffoscope.org}. Results stored on the
662server are purged after 30 days.")
663 (license license:gpl3+)))
664
513d35f1
MFM
665(define-public python-anaconda-client
666 (package
667 (name "python-anaconda-client")
668 (version "1.6.3")
669 (source
670 (origin
671 (method url-fetch)
672 (uri (string-append "https://github.com/Anaconda-Platform/"
673 "anaconda-client/archive/" version ".tar.gz"))
674 (file-name (string-append name "-" version ".tar.gz"))
675 (sha256
676 (base32
677 "1wv4wi6k5jz7rlwfgvgfdizv77x3cr1wa2aj0k1595g7fbhkjhz2"))))
678 (build-system python-build-system)
679 (propagated-inputs
680 `(("python-pyyaml" ,python-pyyaml)
681 ("python-requests" ,python-requests)
682 ("python-clyent" ,python-clyent)))
683 (native-inputs
684 `(("python-pytz" ,python-pytz)
685 ("python-dateutil" ,python-dateutil)
686 ("python-mock" ,python-mock)
687 ("python-coverage" ,python-coverage)
688 ("python-pillow" ,python-pillow)))
689 (arguments
690 `(#:phases
691 (modify-phases %standard-phases
692 ;; This is needed for some tests.
693 (add-before 'check 'set-up-home
694 (lambda* _ (setenv "HOME" "/tmp") #t))
695 (add-before 'check 'remove-network-tests
696 (lambda* _
697 ;; Remove tests requiring a network connection
698 (let ((network-tests '("tests/test_upload.py"
699 "tests/test_authorizations.py"
700 "tests/test_login.py"
701 "tests/test_whoami.py"
702 "utils/notebook/tests/test_data_uri.py"
703 "utils/notebook/tests/test_base.py"
704 "utils/notebook/tests/test_downloader.py"
705 "inspect_package/tests/test_conda.py")))
706 (with-directory-excursion "binstar_client"
707 (for-each delete-file network-tests)))
708 #t)))))
709 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
710 (synopsis "Anaconda Cloud command line client library")
711 (description
712 "Anaconda Cloud command line client library provides an interface to
713Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
714environments.")
7ed6343f 715 (license license:bsd-3)))
513d35f1
MFM
716
717(define-public python2-anaconda-client
718 (package-with-python2 python-anaconda-client))
4bc08b6e
MFM
719
720(define-public python-conda
721 (package
722 (name "python-conda")
723 (version "4.3.16")
724 (source
725 (origin
726 (method url-fetch)
727 (uri (string-append "https://github.com/conda/conda/archive/"
728 version ".tar.gz"))
729 (file-name (string-append name "-" version ".tar.gz"))
730 (sha256
731 (base32
732 "1jq8hyrc5npb5sf4vw6s6by4602yj8f79vzpbwdfgpkn02nfk1dv"))))
733 (build-system python-build-system)
734 (arguments
735 `(#:phases
736 (modify-phases %standard-phases
737 (add-before 'build 'create-version-file
738 (lambda _
739 (with-output-to-file "conda/.version"
740 (lambda () (display ,version)))
741 #t))
742 (add-before 'check 'remove-failing-tests
743 (lambda _
744 ;; These tests require internet/network access
745 (let ((network-tests '("test_cli.py"
746 "test_create.py"
747 "test_export.py"
748 "test_fetch.py"
749 "test_history.py"
750 "test_info.py"
751 "test_install.py"
752 "test_priority.py"
753 "conda_env/test_cli.py"
754 "conda_env/test_create.py"
755 "conda_env/specs/test_notebook.py"
756 "conda_env/utils/test_notebooks.py"
757 "core/test_index.py"
758 "core/test_repodata.py")))
759 (with-directory-excursion "tests"
760 (for-each delete-file network-tests)
761
762 ;; FIXME: This test creates a file, then deletes it and tests
763 ;; that the file was deleted. For some reason it fails when
764 ;; building with guix, but does not when you run it in the
765 ;; directory left when you build with the --keep-failed
766 ;; option
767 (delete-file "gateways/disk/test_delete.py")
768 #t))))
769 (replace 'check
770 (lambda _
771 (setenv "HOME" "/tmp")
675e7bba 772 (invoke "py.test"))))))
4bc08b6e 773 (native-inputs
e227f248
EF
774 `(("python-cytoolz" ,python-cytoolz)
775 ("python-ruamel.yaml" ,python-ruamel.yaml)
4bc08b6e
MFM
776 ("python-requests" ,python-requests)
777 ("python-pycosat" ,python-pycosat)
778 ("python-pytest" ,python-pytest)
779 ("python-responses" ,python-responses)
780 ("python-pyyaml" ,python-pyyaml)
781 ("python-anaconda-client" ,python-anaconda-client)))
782 (home-page "https://github.com/conda/conda")
783 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
784 (description
785 "Conda is a cross-platform, Python-agnostic binary package manager. It
786is the package manager used by Anaconda installations, but it may be used for
787other systems as well. Conda makes environments first-class citizens, making
788it easy to create independent environments even for C libraries. Conda is
789written entirely in Python.
790
791This package provides Conda as a library.")
7ed6343f 792 (license license:bsd-3)))
4bc08b6e
MFM
793
794(define-public python2-conda
2c5cf844
LF
795 (let ((base (package-with-python2
796 (strip-python2-variant python-conda))))
797 (package (inherit base)
798 (native-inputs
799 `(("python2-enum34" ,python2-enum34)
800 ,@(package-native-inputs base))))))
84fcb580
MFM
801
802(define-public conda
803 (package (inherit python-conda)
804 (name "conda")
805 (arguments
806 (substitute-keyword-arguments (package-arguments python-conda)
807 ((#:phases phases)
808 `(modify-phases ,phases
809 (replace 'build
810 (lambda* (#:key outputs #:allow-other-keys)
811 ;; This test fails when run before installation.
812 (delete-file "tests/test_activate.py")
813
814 ;; Fix broken defaults
815 (substitute* "conda/base/context.py"
816 (("return sys.prefix")
817 (string-append "return \"" (assoc-ref outputs "out") "\""))
818 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
819 (string-append "return False if self.root_prefix == self.conda_prefix else "
820 match)))
821
822 ;; The util/setup-testing.py is used to build conda in
823 ;; application form, rather than the default, library form.
824 ;; With this, we are able to run commands like `conda --help`
825 ;; directly on the command line
d691e966 826 (invoke "python" "utils/setup-testing.py" "build_py")))
84fcb580
MFM
827 (replace 'install
828 (lambda* (#:key inputs outputs #:allow-other-keys)
829 (let* ((out (assoc-ref outputs "out"))
830 (target (string-append out "/lib/python"
831 ((@@ (guix build python-build-system)
832 get-python-version)
833 (assoc-ref inputs "python"))
834 "/site-packages/")))
835 ;; The installer aborts if the target directory is not on
836 ;; PYTHONPATH.
837 (setenv "PYTHONPATH"
838 (string-append target ":" (getenv "PYTHONPATH")))
839
840 ;; And it aborts if the directory doesn't exist.
841 (mkdir-p target)
d691e966
EF
842 (invoke "python" "utils/setup-testing.py" "install"
843 (string-append "--prefix=" out)))))
1d84500a
RW
844 ;; The "activate" and "deactivate" scripts don't need wrapping.
845 ;; They also break when they are renamed.
846 (add-after 'wrap 'undo-wrap
847 (lambda* (#:key outputs #:allow-other-keys)
848 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
849 (delete-file "deactivate")
850 (rename-file ".deactivate-real" "deactivate")
851 (delete-file "activate")
852 (rename-file ".activate-real" "activate")
853 #t)))))))
84fcb580
MFM
854 (description
855 "Conda is a cross-platform, Python-agnostic binary package manager. It
856is the package manager used by Anaconda installations, but it may be used for
857other systems as well. Conda makes environments first-class citizens, making
858it easy to create independent environments even for C libraries. Conda is
859written entirely in Python.")))
58a308e0
RJ
860
861(define-public gwl
862 (package
863 (name "gwl")
fb6ca493 864 (version "0.1.1")
58a308e0
RJ
865 (source (origin
866 (method url-fetch)
867 (uri (string-append "https://www.guixwl.org/releases/gwl-"
868 version ".tar.gz"))
869 (sha256
870 (base32
fb6ca493 871 "06pm967mq1wyggx7l0nfapw5s0k5qc5r9lawk2v3db868br779a7"))))
58a308e0
RJ
872 (build-system gnu-build-system)
873 (native-inputs
874 `(("autoconf" ,autoconf)
875 ("automake" ,automake)
876 ("pkg-config" ,pkg-config)))
877 (inputs
878 `(("guile" ,guile-2.2)))
879 (propagated-inputs
880 `(("guix" ,guix)
881 ("guile-commonmark" ,guile-commonmark)))
882 (home-page "https://www.guixwl.org")
883 (synopsis "Workflow management extension for GNU Guix")
884 (description "This project provides two subcommands to GNU Guix and
885introduces two record types that provide a workflow management extension built
886on top of GNU Guix.")
887 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
888 ;; the web interface modules in gwl/ are licensed AGPL3+,
889 ;; and the fonts included in this package are licensed OFL1.1.
7ed6343f 890 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
98a11b7f
TGR
891
892(define-public gcab
893 (package
894 (name "gcab")
a1785cfb 895 (version "1.2")
98a11b7f
TGR
896 (source (origin
897 (method url-fetch)
41eac186
TGR
898 (uri (string-append "mirror://gnome/sources/gcab/"
899 version "/gcab-" version ".tar.xz"))
98a11b7f
TGR
900 (sha256
901 (base32
a1785cfb 902 "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"))))
44118720 903 (build-system meson-build-system)
98a11b7f 904 (native-inputs
44118720
TGR
905 `(("glib:bin" ,glib "bin") ; for glib-mkenums
906 ("intltool" ,intltool)
907 ("pkg-config" ,pkg-config)
908 ("vala" ,vala)))
98a11b7f
TGR
909 (inputs
910 `(("glib" ,glib)
911 ("zlib" ,zlib)))
44118720
TGR
912 (arguments
913 `(#:configure-flags
914 ;; XXX This ‘documentation’ is for developers, and fails informatively:
915 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
916 (list "-Ddocs=false"
917 "-Dintrospection=false")))
98a11b7f
TGR
918 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
919 (synopsis "Microsoft Cabinet file manipulation library")
920 (description
921 "The libgcab library provides GObject functions to read, write, and modify
922Microsoft cabinet (.@dfn{CAB}) files.")
923 (license (list license:gpl2+ ; tests/testsuite.at
924 license:lgpl2.1+)))) ; the rest
cb390925
TGR
925
926(define-public msitools
927 (package
928 (name "msitools")
9e4da9f2 929 (version "0.99")
cb390925
TGR
930 (source (origin
931 (method url-fetch)
a4469936
TGR
932 (uri (string-append "mirror://gnome/sources/msitools/"
933 version "/msitools-" version ".tar.xz"))
cb390925
TGR
934 (sha256
935 (base32
9e4da9f2 936 "0d9nidn5zc81bc30w119933rn2g87mrsqyqkndg20srkbsd96xfl"))))
cb390925
TGR
937 (build-system gnu-build-system)
938 (native-inputs
9e4da9f2
TGR
939 `(("bison" ,bison)
940 ("pkg-config" ,pkg-config)))
cb390925
TGR
941 (inputs
942 `(("gcab" ,gcab)
943 ("glib" ,glib)
944 ("libgsf" ,libgsf)
945 ("libxml2" ,libxml2)
946 ("uuid" ,util-linux)))
947 (home-page "https://wiki.gnome.org/msitools")
948 (synopsis "Windows Installer file manipulation tool")
949 (description
950 "msitools is a collection of command-line tools to inspect, extract, build,
951and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
952for packaging and deployment of cross-compiled Windows applications.")
953 (license license:lgpl2.1+)))
3d391309
SB
954
955(define-public libostree
956 (package
957 (name "libostree")
83d4da12 958 (version "2018.9.1")
3d391309
SB
959 (source (origin
960 (method url-fetch)
961 (uri (string-append
962 "https://github.com/ostreedev/ostree/releases/download/v"
83d4da12 963 (version-major+minor version) "/libostree-" version ".tar.xz"))
3d391309
SB
964 (sha256
965 (base32
83d4da12 966 "01mygpkbl9sk2vr3hjbpih6qlg8lwx0q5lklm09f7jfwfpnwyqzj"))))
3d391309
SB
967 (build-system gnu-build-system)
968 (arguments
969 '(#:phases
970 (modify-phases %standard-phases
971 (add-before 'check 'pre-check
972 (lambda _
973 ;; Don't try to use the non-existing '/var/tmp' as test
974 ;; directory.
975 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
976 #t)))
977 ;; XXX: fails with:
978 ;; tap-driver.sh: internal error getting exit status
979 ;; tap-driver.sh: fatal: I/O or internal error
980 #:tests? #f))
981 (native-inputs
982 `(("attr" ,attr) ; for tests
983 ("bison" ,bison)
984 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
985 ("gobject-introspection" ,gobject-introspection)
986 ("pkg-config" ,pkg-config)
987 ("xsltproc" ,libxslt)))
988 (inputs
989 `(("avahi" ,avahi)
990 ("docbook-xml" ,docbook-xml-4.2)
991 ("docbook-xsl" ,docbook-xsl)
992 ("e2fsprogs" ,e2fsprogs)
993 ("fuse" ,fuse)
994 ("glib" ,glib)
995 ("gpgme" ,gpgme)
996 ("libarchive" ,libarchive)
997 ("libsoup" ,libsoup)
998 ("nettle" ,nettle) ; required by 'libarchive.la'
999 ("util-linux" ,util-linux)))
1000 (home-page "https://ostree.readthedocs.io/en/latest/")
1001 (synopsis "Operating system and container binary deployment and upgrades")
1002 (description
1003 "@code{libostree} is both a shared library and suite of command line
1004tools that combines a \"git-like\" model for committing and downloading
1005bootable filesystem trees, along with a layer for deploying them and managing
1006the bootloader configuration.")
1007 (license license:lgpl2.0+)))
36e1ab84
RH
1008
1009(define-public flatpak
1010 (package
122db9a6 1011 (name "flatpak")
e2760d1a 1012 (version "1.2.3")
122db9a6
RH
1013 (source
1014 (origin
1015 (method url-fetch)
1016 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
1017 version "/flatpak-" version ".tar.xz"))
1018 (sha256
1019 (base32
e2760d1a 1020 "0i0dn3w3545lvmjlzqj3j70lk8yrq64r9frp1rk6a161gwq20ixv"))))
122db9a6
RH
1021 (build-system gnu-build-system)
1022 (arguments
1023 '(#:tests? #f ;; Tests fail due to trying to create files where it can't.
1024 #:configure-flags (list
1025 "--enable-documentation=no" ;; FIXME
1026 "--enable-system-helper=no"
1027 "--localstatedir=/var"
1028 (string-append "--with-system-bubblewrap="
1029 (assoc-ref %build-inputs "bubblewrap")
1030 "/bin/bwrap"))))
1031 (native-inputs `(("bison" ,bison)
1032 ("gettext" ,gnu-gettext)
1033 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
1034 ("gobject-introspection" ,gobject-introspection)
1035 ("libcap" ,libcap)
1036 ("pkg-config" ,pkg-config)))
1037 (inputs `(("appstream-glib" ,appstream-glib)
1038 ("bubblewrap" ,bubblewrap)
89ea6252 1039 ("dconf" ,dconf)
122db9a6
RH
1040 ("gdk-pixbuf" ,gdk-pixbuf)
1041 ("gpgme" ,gpgme)
1042 ("json-glib" ,json-glib)
1043 ("libarchive" ,libarchive)
1044 ("libostree" ,libostree)
1045 ("libseccomp" ,libseccomp)
1046 ("libsoup" ,libsoup)
1047 ("libxau" ,libxau)
1048 ("libxml2" ,libxml2)
1049 ("nettle" ,nettle)
1050 ("util-linux" ,util-linux)))
1051 (home-page "https://flatpak.org")
1052 (synopsis "System for building, distributing, and running sandboxed desktop
36e1ab84 1053applications")
122db9a6 1054 (description "Flatpak is a system for building, distributing, and running
36e1ab84 1055sandboxed desktop applications on GNU/Linux.")
122db9a6 1056 (license license:lgpl2.1+)))