gnu: emacs-csv-mode: Update to 1.12.
[jackhill/guix/guix.git] / gnu / packages / package-management.scm
CommitLineData
bbe8d8f0 1;;; GNU Guix --- Functional package management for GNU
9961cde3 2;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
598ea80f 3;;; Copyright © 2015, 2017, 2020 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>
fd885160 7;;; Copyright © 2017, 2018, 2019, 2020 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>
30833b13 11;;; Copyright © 2018, 2019 Eric Bavier <bavier@member.fsf.org>
6def31e8 12;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
c0023514 13;;; Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
b4335cfb 14;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
b778989e 15;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
13c18af1 16;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
bbe8d8f0
LC
17;;;
18;;; This file is part of GNU Guix.
19;;;
20;;; GNU Guix is free software; you can redistribute it and/or modify it
21;;; under the terms of the GNU General Public License as published by
22;;; the Free Software Foundation; either version 3 of the License, or (at
23;;; your option) any later version.
24;;;
25;;; GNU Guix is distributed in the hope that it will be useful, but
26;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28;;; GNU General Public License for more details.
29;;;
30;;; You should have received a copy of the GNU General Public License
31;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32
33(define-module (gnu packages package-management)
8a43ff10 34 #:use-module (gnu packages)
37756a13 35 #:use-module (gnu packages acl)
3d391309
SB
36 #:use-module (gnu packages attr)
37 #:use-module (gnu packages avahi)
37756a13 38 #:use-module (gnu packages autotools)
e3e1ecf6 39 #:use-module (gnu packages backup)
8a973abc 40 #:use-module (gnu packages base)
38b9af7c 41 #:use-module (gnu packages bash)
37756a13 42 #:use-module (gnu packages bdw-gc)
3d391309 43 #:use-module (gnu packages bison)
13c18af1 44 #:use-module (gnu packages boost)
3e5750af 45 #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
ac257f12 46 #:use-module (gnu packages check)
38cf2ba0 47 #:use-module (gnu packages compression)
37756a13 48 #:use-module (gnu packages cpio)
e6c8199b 49 #:use-module (gnu packages crypto)
37756a13 50 #:use-module (gnu packages curl)
255d1bbe 51 #:use-module (gnu packages dbm)
3d391309 52 #:use-module (gnu packages docbook)
37756a13 53 #:use-module (gnu packages file)
480af4d6 54 #:use-module (gnu packages gettext)
98a11b7f 55 #:use-module (gnu packages glib)
cb390925 56 #:use-module (gnu packages gnome)
37756a13 57 #:use-module (gnu packages gnupg)
37756a13 58 #:use-module (gnu packages graphviz)
36e1ab84 59 #:use-module (gnu packages gtk)
37756a13 60 #:use-module (gnu packages guile)
0791437f 61 #:use-module (gnu packages guile-xyz)
52b01cb7 62 #:use-module (gnu packages hurd)
13c18af1 63 #:use-module (gnu packages libedit)
cb390925 64 #:use-module (gnu packages linux)
58a308e0 65 #:use-module (gnu packages lisp)
37756a13 66 #:use-module (gnu packages man)
e3e1ecf6 67 #:use-module (gnu packages nettle)
ac68fb3b 68 #:use-module (gnu packages networking)
aff0cce9 69 #:use-module (gnu packages nss)
37756a13 70 #:use-module (gnu packages patchutils)
fcb0109d 71 #:use-module (gnu packages perl)
5ccde207 72 #:use-module (gnu packages perl-check)
37756a13
TGR
73 #:use-module (gnu packages pkg-config)
74 #:use-module (gnu packages popt)
e3e1ecf6 75 #:use-module (gnu packages python)
1b2f753d 76 #:use-module (gnu packages python-web)
44d10b1f 77 #:use-module (gnu packages python-xyz)
37756a13 78 #:use-module (gnu packages serialization)
cd0322a3 79 #:use-module (gnu packages sqlite)
37756a13
TGR
80 #:use-module (gnu packages ssh)
81 #:use-module (gnu packages texinfo)
33dc54b0 82 #:use-module (gnu packages time)
04eb0fab 83 #:use-module (gnu packages tls)
5dbeccf5 84 #:use-module (gnu packages vim)
36e1ab84 85 #:use-module (gnu packages virtualization)
37756a13 86 #:use-module (gnu packages web)
cb390925 87 #:use-module (gnu packages xml)
36e1ab84 88 #:use-module (gnu packages xorg)
16360cc8 89 #:use-module (guix build-system glib-or-gtk)
37756a13 90 #:use-module (guix build-system gnu)
44118720 91 #:use-module (guix build-system meson)
37756a13
TGR
92 #:use-module (guix build-system python)
93 #:use-module (guix download)
94 #:use-module (guix gexp)
95 #:use-module (guix git-download)
7ed6343f 96 #:use-module ((guix licenses) #:prefix license:)
37756a13
TGR
97 #:use-module (guix packages)
98 #:use-module (guix utils)
99 #:use-module (ice-9 match)
100 #:use-module (srfi srfi-1))
bbe8d8f0 101
39de700c
LC
102(define (boot-guile-uri arch)
103 "Return the URI for the bootstrap Guile tarball for ARCH."
aef81a81
LC
104 (cond ((string=? "armhf" arch)
105 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
106 arch "-linux"
107 "/20150101/guile-2.0.11.tar.xz"))
108 ((string=? "aarch64" arch)
b31b0155
LC
109 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
110 arch "-linux/20170217/guile-2.0.14.tar.xz"))
aef81a81
LC
111 (else
112 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
113 arch "-linux"
114 "/20131110/guile-2.0.9.tar.xz"))))
39de700c 115
994a1494
LC
116(define-public guix
117 ;; Latest version of Guix, which may or may not correspond to a release.
94fa8d76
LC
118 ;; Note: the 'update-guix-package.scm' script expects this definition to
119 ;; start precisely like this.
33ff35d5 120 (let ((version "1.1.0")
977f4780
MB
121 (commit "bdc801e1cfa8e436890da5bd755dd7759cb0f748")
122 (revision 4))
994a1494
LC
123 (package
124 (name "guix")
ab2419e5 125
994a1494
LC
126 (version (if (zero? revision)
127 version
128 (string-append version "-"
129 (number->string revision)
4b7917f2 130 "." (string-take commit 7))))
994a1494
LC
131 (source (origin
132 (method git-fetch)
133 (uri (git-reference
134 (url "https://git.savannah.gnu.org/r/guix.git")
135 (commit commit)))
136 (sha256
137 (base32
977f4780 138 "1wf30g45kh4nmcapd4vrcl6m2wjzly7v7dv8z0r584770i2yh836"))
994a1494
LC
139 (file-name (string-append "guix-" version "-checkout"))))
140 (build-system gnu-build-system)
141 (arguments
142 `(#:configure-flags (list
143 "--localstatedir=/var"
144 "--sysconfdir=/etc"
145 (string-append "--with-bash-completion-dir="
146 (assoc-ref %outputs "out")
147 "/etc/bash_completion.d")
994a1494
LC
148
149 ;; Set 'DOT_USER_PROGRAM' to the empty string so
150 ;; we don't keep a reference to Graphviz, whose
59e80445
LC
151 ;; closure is pretty big (too big for the Guix
152 ;; system installation image.)
4b7917f2
LC
153 "ac_cv_path_DOT_USER_PROGRAM=dot"
154
155 ;; To avoid problems with the length of shebangs,
156 ;; choose a fixed-width and short directory name
157 ;; for tests.
52b01cb7
JN
158 "ac_cv_guix_test_root=/tmp/guix-tests"
159 ,@(if (hurd-target?) '("--with-courage") '()))
994a1494
LC
160 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
161
162 #:modules ((guix build gnu-build-system)
163 (guix build utils)
c9117162 164 (srfi srfi-26)
994a1494
LC
165 (ice-9 popen)
166 (ice-9 rdelim))
167
168 #:phases (modify-phases %standard-phases
189be331 169 (replace 'bootstrap
994a1494
LC
170 (lambda _
171 ;; Make sure 'msgmerge' can modify the PO files.
172 (for-each (lambda (po)
173 (chmod po #o666))
174 (find-files "." "\\.po$"))
ab2419e5 175
8833a647
LC
176 (patch-shebang "build-aux/git-version-gen")
177
91c619eb
LC
178 (call-with-output-file ".tarball-version"
179 (lambda (port)
180 (display ,version port)))
181
fe4a3727
LC
182 ;; Install SysV init files to $(prefix)/etc rather
183 ;; than to /etc.
184 (substitute* "nix/local.mk"
185 (("^sysvinitservicedir = .*$")
186 (string-append "sysvinitservicedir = \
187$(prefix)/etc/init.d\n")))
188
92fcb831 189 (invoke "sh" "bootstrap")))
569c55be
JN
190 (add-before 'build 'use-host-compressors
191 (lambda* (#:key inputs target #:allow-other-keys)
192 (when target
193 ;; Use host compressors.
194 (let ((bzip2 (assoc-ref inputs "bzip2"))
195 (gzip (assoc-ref inputs "gzip"))
196 (xz (assoc-ref inputs "xz")))
197 (substitute* "guix/config.scm"
198 (("\"[^\"]*/bin/bzip2")
199 (string-append "\"" bzip2 "/bin/bzip2"))
200 (("\"[^\"]*/bin/gzip") gzip
201 (string-append "\"" gzip "/bin/gzip"))
202 (("\"[^\"]*/bin//xz")
203 (string-append "\"" xz "/bin/xz")))))
204 #t))
59127916 205 (add-before 'check 'copy-bootstrap-guile
d653e184 206 (lambda* (#:key system target inputs #:allow-other-keys)
569c55be
JN
207 ;; Copy the bootstrap guile tarball in the store
208 ;; used by the test suite.
209 (define (intern file recursive?)
210 ;; Note: don't use 'guix download' here because we
211 ;; need to set the 'recursive?' argument.
212 (define base
213 (strip-store-file-name file))
d653e184 214
569c55be
JN
215 (define code
216 `(begin
217 (use-modules (guix))
218 (with-store store
219 (let* ((item (add-to-store store ,base
220 ,recursive?
221 "sha256" ,file))
222 (root (string-append "/tmp/gc-root-"
223 (basename item))))
224 ;; Register a root so that the GC tests
225 ;; don't delete those.
226 (symlink item root)
227 (add-indirect-root store root)))))
d653e184 228
569c55be
JN
229 (invoke "./test-env" "guile" "-c"
230 (object->string code)))
d653e184 231
569c55be
JN
232 (unless target
233 (intern (assoc-ref inputs "boot-guile") #f)
d653e184 234
569c55be
JN
235 ;; On x86_64 some tests need the i686 Guile.
236 ,@(if (and (not (%current-target-system))
237 (string=? (%current-system)
238 "x86_64-linux"))
239 '((intern (assoc-ref inputs "boot-guile/i686") #f))
240 '())
d653e184 241
569c55be
JN
242 ;; Copy the bootstrap executables.
243 (for-each (lambda (input)
244 (intern (assoc-ref inputs input) #t))
245 '("bootstrap/bash" "bootstrap/mkdir"
246 "bootstrap/tar" "bootstrap/xz")))
994a1494 247 #t))
40e89f5b 248 (add-after 'unpack 'disable-failing-tests
994a1494
LC
249 ;; XXX FIXME: These tests fail within the build container.
250 (lambda _
251 (substitute* "tests/syscalls.scm"
252 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
253 (string-append "(test-skip 1)\n" all)))
254 (substitute* "tests/containers.scm"
255 (("^\\(test-(assert|equal)" all)
256 (string-append "(test-skip 1)\n" all)))
257 (when (file-exists? "tests/guix-environment-container.sh")
258 (substitute* "tests/guix-environment-container.sh"
259 (("guix environment --version")
260 "exit 77\n")))
261 #t))
262 (add-before 'check 'set-SHELL
263 (lambda _
264 ;; 'guix environment' tests rely on 'SHELL' having a
265 ;; correct value, so set it.
266 (setenv "SHELL" (which "sh"))
267 #t))
268 (add-after 'install 'wrap-program
38b9af7c
JN
269 (lambda* (#:key inputs native-inputs outputs target
270 #:allow-other-keys)
dd1640ee
LC
271 ;; Make sure the 'guix' command finds GnuTLS,
272 ;; Guile-JSON, and Guile-Git automatically.
994a1494 273 (let* ((out (assoc-ref outputs "out"))
56389433
JN
274 (guile ,@(if (%current-target-system)
275 '((assoc-ref native-inputs "guile"))
276 '((assoc-ref inputs "guile"))))
ca719424 277 (gcrypt (assoc-ref inputs "guile-gcrypt"))
994a1494 278 (json (assoc-ref inputs "guile-json"))
c5a2e1ff 279 (sqlite (assoc-ref inputs "guile-sqlite3"))
9ca8aa38 280 (git (assoc-ref inputs "guile-git"))
dd1640ee
LC
281 (bs (assoc-ref inputs
282 "guile-bytestructures"))
994a1494
LC
283 (ssh (assoc-ref inputs "guile-ssh"))
284 (gnutls (assoc-ref inputs "gnutls"))
8a973abc 285 (locales (assoc-ref inputs "glibc-utf8-locales"))
ca719424
LC
286 (deps (list gcrypt json sqlite gnutls
287 git bs ssh))
994a1494
LC
288 (effective
289 (read-line
290 (open-pipe* OPEN_READ
291 (string-append guile "/bin/guile")
292 "-c" "(display (effective-version))")))
c9117162
LC
293 (path (string-join
294 (map (cut string-append <>
295 "/share/guile/site/"
296 effective)
6f1ce09d 297 (delete #f deps))
c9117162
LC
298 ":"))
299 (gopath (string-join
300 (map (cut string-append <>
301 "/lib/guile/" effective
302 "/site-ccache")
6f1ce09d 303 (delete #f deps))
8a973abc
LC
304 ":"))
305 (locpath (string-append locales "/lib/locale")))
61cdad35 306
994a1494
LC
307 (wrap-program (string-append out "/bin/guix")
308 `("GUILE_LOAD_PATH" ":" prefix (,path))
8a973abc
LC
309 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
310 `("GUIX_LOCPATH" ":" suffix (,locpath)))
61cdad35 311
38b9af7c
JN
312 (when target
313 ;; XXX Touching wrap-program rebuilds world
314 (let ((bash (assoc-ref inputs "bash")))
315 (substitute* (string-append out "/bin/guix")
316 (("^#!.*/bash") (string-append "#! " bash "/bin/bash")))))
994a1494
LC
317 #t))))))
318 (native-inputs `(("pkg-config" ,pkg-config)
a7db8540 319
b4335cfb
MO
320 ;; Guile libraries are needed here for
321 ;; cross-compilation.
b778989e 322 ("guile" ,guile-3.0)
b4335cfb
MO
323 ("gnutls" ,gnutls)
324 ("guile-gcrypt" ,guile-gcrypt)
325 ("guile-json" ,guile-json-3)
326 ("guile-sqlite3" ,guile-sqlite3)
327 ("guile-ssh" ,guile-ssh)
328 ("guile-git" ,guile-git)
329
994a1494
LC
330 ;; XXX: Keep the development inputs here even though
331 ;; they're unnecessary, just so that 'guix environment
332 ;; guix' always contains them.
464f5447 333 ("autoconf" ,autoconf-wrapper)
994a1494
LC
334 ("automake" ,automake)
335 ("gettext" ,gettext-minimal)
336 ("texinfo" ,texinfo)
337 ("graphviz" ,graphviz)
76fa5e04
JL
338 ("help2man" ,help2man)
339 ("po4a" ,po4a)))
994a1494 340 (inputs
3e5750af
LC
341 `(("bzip2" ,bzip2)
342 ("gzip" ,gzip)
94d2ff6d 343 ("zlib" ,zlib) ;for 'guix publish'
2e5c71b2 344 ("lzlib" ,lzlib) ;for 'guix publish' and 'guix substitute'
2d195e67 345
3e5750af
LC
346 ("sqlite" ,sqlite)
347 ("libgcrypt" ,libgcrypt)
4e80516c 348
b6bee63b 349 ("guile" ,guile-3.0)
bbe8d8f0 350
94d2ff6d
LC
351 ;; Some of the tests use "unshare" when it is available.
352 ("util-linux" ,util-linux)
353
59127916
LC
354 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
355 ;; have it here.
356 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
357 ,@(if (and (not (%current-target-system))
358 (string=? (%current-system) "x86_64-linux"))
359 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
8a973abc 360 '())
569c55be 361 ,@(if (%current-target-system)
38b9af7c
JN
362 `(("bash" ,bash-minimal)
363 ("xz" ,xz))
569c55be 364 '())
8a973abc 365
94d2ff6d
LC
366 ;; Tests also rely on these bootstrap executables.
367 ("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system)))
368 ("bootstrap/mkdir" ,(bootstrap-executable "mkdir" (%current-system)))
369 ("bootstrap/tar" ,(bootstrap-executable "tar" (%current-system)))
370 ("bootstrap/xz" ,(bootstrap-executable "xz" (%current-system)))
371
8a973abc 372 ("glibc-utf8-locales" ,glibc-utf8-locales)))
994a1494 373 (propagated-inputs
0c5d974f 374 `(("gnutls" ,(if (%current-target-system) gnutls-3.6.13 guile3.0-gnutls))
ca719424 375 ("guile-gcrypt" ,guile-gcrypt)
2eb0628a 376 ("guile-json" ,guile-json-3)
c5a2e1ff 377 ("guile-sqlite3" ,guile-sqlite3)
9ca8aa38
LC
378 ("guile-ssh" ,guile-ssh)
379 ("guile-git" ,guile-git)))
f1082ec1 380
994a1494
LC
381 (home-page "https://www.gnu.org/software/guix/")
382 (synopsis "Functional package manager for installed software packages and versions")
383 (description
384 "GNU Guix is a functional package manager for the GNU system, and is
c5779c93 385also a distribution thereof. It includes a virtual machine image. Besides
79c311b8 386the usual package management features, it also supports transactional
c5779c93
LC
387upgrades and roll-backs, per-user profiles, and much more. It is based on
388the Nix package manager.")
7ed6343f 389 (license license:gpl3+)
994a1494 390 (properties '((ftp-server . "alpha.gnu.org"))))))
3ad9a0b1 391
baed9236
LC
392(define-public guix-daemon
393 ;; This package is for internal consumption: it allows us to quickly build
394 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
395 ;; pull'.
396 (package
397 (inherit guix)
398 (properties `((hidden? . #t)))
399 (name "guix-daemon")
400
401 ;; Use a minimum set of dependencies.
402 (native-inputs
403 (fold alist-delete (package-native-inputs guix)
404 '("po4a" "graphviz" "help2man")))
405 (inputs
b6bee63b 406 `(("gnutls" ,guile3.0-gnutls)
baed9236 407 ("guile-git" ,guile-git)
2eb0628a 408 ("guile-json" ,guile-json-3)
3b0153bd 409 ("guile-gcrypt" ,guile-gcrypt)
1fb947f6
LC
410 ,@(fold alist-delete (package-inputs guix)
411 '("boot-guile" "boot-guile/i686" "util-linux"))))
412
baed9236
LC
413 (propagated-inputs '())
414
415 (arguments
416 (substitute-keyword-arguments (package-arguments guix)
1fb947f6
LC
417 ((#:configure-flags flags '())
418 ;; Pretend we have those libraries; we don't actually need them.
419 `(append ,flags
420 '("guix_cv_have_recent_guile_sqlite3=yes"
421 "guix_cv_have_recent_guile_ssh=yes")))
baed9236
LC
422 ((#:tests? #f #f)
423 #f)
424 ((#:phases phases '%standard-phases)
425 `(modify-phases ,phases
74781c65
LC
426 (add-after 'unpack 'change-default-guix
427 (lambda _
428 ;; We need to tell 'guix-daemon' which 'guix' command to use.
429 ;; Here we use a questionable hack where we hard-code root's
430 ;; current guix, which could be wrong (XXX). Note that scripts
431 ;; like 'guix perform-download' do not run as root so we assume
432 ;; that they have access to /var/guix/profiles/per-user/root.
433 (substitute* "nix/libstore/globals.cc"
434 (("guixProgram = (.*)nixBinDir + \"/guix\"" _ before)
435 (string-append "guixProgram = " before
436 "/var/guix/profiles/per-user/root\
437/current-guix/bin/guix")))
438 #t))
baed9236
LC
439 (replace 'build
440 (lambda _
441 (invoke "make" "nix/libstore/schema.sql.hh")
442 (invoke "make" "-j" (number->string
443 (parallel-job-count))
444 "guix-daemon")))
445 (delete 'copy-bootstrap-guile)
446 (replace 'install
447 (lambda* (#:key outputs #:allow-other-keys)
74781c65 448 (invoke "make" "install-binPROGRAMS")))
baed9236
LC
449 (delete 'wrap-program)))))))
450
82ce81ba 451
b6bee63b 452(define-public guile2.2-guix
da765180
LC
453 (package
454 (inherit guix)
b6bee63b 455 (name "guile2.2-guix")
1926db54 456 (native-inputs
b6bee63b
LC
457 `(("guile" ,guile-2.2)
458 ("gnutls" ,guile2.2-gnutls)
459 ("guile-gcrypt" ,guile2.2-gcrypt)
460 ("guile-json" ,guile2.2-json)
461 ("guile-sqlite3" ,guile2.2-sqlite3)
462 ("guile-ssh" ,guile2.2-ssh)
463 ("guile-git" ,guile2.2-git)
1926db54
MO
464 ,@(fold alist-delete (package-native-inputs guix)
465 '("guile" "gnutls" "guile-gcrypt" "guile-json"
466 "guile-sqlite3" "guile-ssh" "guile-git"))))
da765180 467 (inputs
b6bee63b 468 `(("guile" ,guile-2.2)
da765180
LC
469 ,@(alist-delete "guile" (package-inputs guix))))
470 (propagated-inputs
b6bee63b
LC
471 `(("gnutls" ,gnutls)
472 ("guile-gcrypt" ,guile2.2-gcrypt)
473 ("guile-json" ,guile2.2-json)
474 ("guile-sqlite3" ,guile2.2-sqlite3)
475 ("guile-ssh" ,guile2.2-ssh)
476 ("guile-git" ,guile2.2-git)))))
477
478(define-public guile3.0-guix
479 (deprecated-package "guile3.0-guix" guix))
da765180 480
6f1ce09d
EB
481(define-public guix-minimal
482 ;; A version of Guix which is built with the minimal set of dependencies, as
483 ;; outlined in the README "Requirements" section. Intended as a CI job, so
484 ;; marked as hidden.
0991fd53
LC
485 (hidden-package
486 (package
487 (inherit guix)
488 (name "guix-minimal")
489 (inputs
490 `(("guile" ,guile-2.2)
491 ,@(alist-delete "guile" (package-inputs guix))))
492 (propagated-inputs
493 (fold alist-delete
494 (package-propagated-inputs guix)
495 '("guile-ssh"))))))
6f1ce09d 496
04eb0fab
LC
497(define (source-file? file stat)
498 "Return true if FILE is likely a source file, false if it is a typical
499generated file."
500 (define (wrong-extension? file)
501 (or (string-suffix? "~" file)
502 (member (file-extension file)
503 '("o" "a" "lo" "so" "go"))))
504
505 (match (basename file)
506 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
507 #f)
508 ((? wrong-extension?)
509 #f)
510 (_
511 #t)))
512
7e6d8d36
LC
513(define-public current-guix-package
514 ;; This parameter allows callers to override the package that 'current-guix'
515 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
516 ;; for instance because it's not running from a source code checkout.
517 (make-parameter #f))
518
04eb0fab 519(define-public current-guix
863519f6
LC
520 (let* ((repository-root (delay (canonicalize-path
521 (string-append (current-source-directory)
522 "/../.."))))
523 (select? (delay (or (git-predicate (force repository-root))
a9d5e4be 524 source-file?))))
04eb0fab
LC
525 (lambda ()
526 "Return a package representing Guix built from the current source tree.
527This works by adding the current source tree to the store (after filtering it
528out) and returning a package that uses that as its 'source'."
7e6d8d36
LC
529 (or (current-guix-package)
530 (package
531 (inherit guix)
532 (version (string-append (package-version guix) "+"))
863519f6 533 (source (local-file (force repository-root) "guix-current"
7e6d8d36
LC
534 #:recursive? #t
535 #:select? (force select?))))))))
04eb0fab
LC
536
537\f
538;;;
539;;; Other tools.
540;;;
541
fcb0109d
LC
542(define-public nix
543 (package
544 (name "nix")
13c18af1 545 (version "2.3.4")
fcb0109d
LC
546 (source (origin
547 (method url-fetch)
548 (uri (string-append "http://nixos.org/releases/nix/nix-"
549 version "/nix-" version ".tar.xz"))
550 (sha256
551 (base32
13c18af1 552 "03fhbb8088sgz3709zd9n9rydavar79w87l9n4q9iimcw06nlqhw"))))
fcb0109d 553 (build-system gnu-build-system)
e6c8199b 554 (native-inputs `(("pkg-config" ,pkg-config)))
13c18af1
GL
555 (inputs `(("boost" ,boost)
556 ("brotli" ,brotli)
e6c8199b 557 ("bzip2" ,bzip2)
13c18af1
GL
558 ("curl" ,curl)
559 ("editline" ,editline)
fcb0109d 560 ("libgc" ,libgc)
e6c8199b
SB
561 ("libseccomp" ,libseccomp)
562 ("libsodium" ,libsodium)
563 ("openssl" ,openssl)
fcb0109d 564 ("sqlite" ,sqlite)
e6c8199b 565 ("xz" ,xz)))
775989c7 566 (home-page "https://nixos.org/nix/")
fcb0109d
LC
567 (synopsis "The Nix package manager")
568 (description
569 "Nix is a purely functional package manager. This means that it treats
570packages like values in purely functional programming languages such as
571Haskell—they are built by functions that don't have side-effects, and they
572never change after they have been built. Nix stores packages in the Nix
573store, usually the directory /nix/store, where each package has its own unique
574sub-directory.")
7ed6343f 575 (license license:lgpl2.1+)))
a881a40c 576
8d422e25
RW
577(define-public stow
578 (package
579 (name "stow")
7cc98992 580 (version "2.3.1")
8d422e25
RW
581 (source (origin
582 (method url-fetch)
583 (uri (string-append "mirror://gnu/stow/stow-"
584 version ".tar.gz"))
585 (sha256
586 (base32
7cc98992 587 "0jrxy12ywn7smdzdnvwzjw77l6knx6jkj2rckgykg1dpf6bdkm89"))))
8d422e25
RW
588 (build-system gnu-build-system)
589 (inputs
7cc98992 590 `(("perl" ,perl)))
8d422e25
RW
591 (native-inputs
592 `(("perl-test-simple" ,perl-test-simple)
593 ("perl-test-output" ,perl-test-output)
ddfd70da
LC
594 ("perl-capture-tiny" ,perl-capture-tiny)
595 ("perl-io-stringy" ,perl-io-stringy)))
8d422e25
RW
596 (home-page "https://www.gnu.org/software/stow/")
597 (synopsis "Managing installed software packages")
598 (description
599 "GNU Stow is a symlink manager. It generates symlinks to directories
600of data and makes them appear to be merged into the same directory. It is
601typically used for managing software packages installed from source, by
602letting you install them apart in distinct directories and then create
603symlinks to the files in a common directory such as /usr/local.")
bdb51ed6 604 (license license:gpl3+)))
e3e1ecf6
LC
605
606(define-public rpm
607 (package
608 (name "rpm")
c0023514 609 (version "4.14.2.1")
e3e1ecf6
LC
610 (source (origin
611 (method url-fetch)
623cc34c
EB
612 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
613 (version-major+minor version) ".x/rpm-"
e3e1ecf6
LC
614 version ".tar.bz2"))
615 (sha256
616 (base32
c0023514 617 "1nmck2fq9h85fgs3zhh6w1avlw5y16cbz5khd459ry3jfd5w4f8i"))))
e3e1ecf6
LC
618 (build-system gnu-build-system)
619 (arguments
620 '(#:configure-flags '("--with-external-db" ;use the system's bdb
621 "--enable-python"
622 "--without-lua")
623 #:phases (modify-phases %standard-phases
91a3c800 624 (add-before 'configure 'set-nss-library-path
e3e1ecf6 625 (lambda* (#:key inputs #:allow-other-keys)
91a3c800 626 (let ((nss (assoc-ref inputs "nss")))
e3e1ecf6
LC
627 (setenv "LIBRARY_PATH"
628 (string-append (getenv "LIBRARY_PATH") ":"
629 nss "/lib/nss"))
91a3c800 630 #t))))))
e3e1ecf6
LC
631 (native-inputs
632 `(("pkg-config" ,pkg-config)))
633 (inputs
c0023514 634 `(("python" ,python)
e3e1ecf6
LC
635 ("xz" ,xz)
636 ("bdb" ,bdb)
637 ("popt" ,popt)
638 ("nss" ,nss)
639 ("nspr" ,nspr)
640 ("libarchive" ,libarchive)
e3e1ecf6
LC
641 ("file" ,file)
642 ("bzip2" ,bzip2)
643 ("zlib" ,zlib)
644 ("cpio" ,cpio)))
c0023514 645 (home-page "https://rpm.org/")
e3e1ecf6
LC
646 (synopsis "The RPM Package Manager")
647 (description
648 "The RPM Package Manager (RPM) is a command-line driven package
649management system capable of installing, uninstalling, verifying, querying,
650and updating computer software packages. Each software package consists of an
651archive of files along with information about the package like its version, a
652description. There is also a library permitting developers to manage such
653transactions from C or Python.")
654
655 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
7ed6343f 656 (license license:gpl2+)))
e3e1ecf6 657
513d35f1
MFM
658(define-public python-anaconda-client
659 (package
660 (name "python-anaconda-client")
661 (version "1.6.3")
662 (source
663 (origin
837da4d3
EF
664 (method git-fetch)
665 (uri (git-reference
666 (url "https://github.com/Anaconda-Platform/anaconda-client")
667 (commit version)))
668 (file-name (git-file-name name version))
513d35f1
MFM
669 (sha256
670 (base32
837da4d3 671 "0w1bfxnydjl9qp53r2gcvr6vlpdqqilcrzqxrll9sgg6vwdyiyyp"))))
513d35f1
MFM
672 (build-system python-build-system)
673 (propagated-inputs
674 `(("python-pyyaml" ,python-pyyaml)
675 ("python-requests" ,python-requests)
676 ("python-clyent" ,python-clyent)))
677 (native-inputs
678 `(("python-pytz" ,python-pytz)
679 ("python-dateutil" ,python-dateutil)
680 ("python-mock" ,python-mock)
681 ("python-coverage" ,python-coverage)
682 ("python-pillow" ,python-pillow)))
683 (arguments
684 `(#:phases
685 (modify-phases %standard-phases
686 ;; This is needed for some tests.
687 (add-before 'check 'set-up-home
688 (lambda* _ (setenv "HOME" "/tmp") #t))
689 (add-before 'check 'remove-network-tests
690 (lambda* _
691 ;; Remove tests requiring a network connection
692 (let ((network-tests '("tests/test_upload.py"
693 "tests/test_authorizations.py"
694 "tests/test_login.py"
695 "tests/test_whoami.py"
696 "utils/notebook/tests/test_data_uri.py"
697 "utils/notebook/tests/test_base.py"
698 "utils/notebook/tests/test_downloader.py"
699 "inspect_package/tests/test_conda.py")))
700 (with-directory-excursion "binstar_client"
701 (for-each delete-file network-tests)))
702 #t)))))
703 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
704 (synopsis "Anaconda Cloud command line client library")
705 (description
706 "Anaconda Cloud command line client library provides an interface to
707Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
708environments.")
7ed6343f 709 (license license:bsd-3)))
513d35f1
MFM
710
711(define-public python2-anaconda-client
712 (package-with-python2 python-anaconda-client))
4bc08b6e
MFM
713
714(define-public python-conda
715 (package
716 (name "python-conda")
717 (version "4.3.16")
718 (source
719 (origin
6def31e8
EF
720 (method git-fetch)
721 (uri (git-reference
722 (url "https://github.com/conda/conda")
723 (commit version)))
724 (file-name (git-file-name name version))
4bc08b6e
MFM
725 (sha256
726 (base32
6def31e8 727 "1qwy0awx4qf2pbk8z2b7q6wdcq7mvwpxxjhg27mbirdvs5hw7hb2"))))
4bc08b6e
MFM
728 (build-system python-build-system)
729 (arguments
730 `(#:phases
731 (modify-phases %standard-phases
732 (add-before 'build 'create-version-file
733 (lambda _
734 (with-output-to-file "conda/.version"
735 (lambda () (display ,version)))
736 #t))
737 (add-before 'check 'remove-failing-tests
738 (lambda _
739 ;; These tests require internet/network access
740 (let ((network-tests '("test_cli.py"
741 "test_create.py"
742 "test_export.py"
743 "test_fetch.py"
744 "test_history.py"
745 "test_info.py"
746 "test_install.py"
747 "test_priority.py"
748 "conda_env/test_cli.py"
749 "conda_env/test_create.py"
750 "conda_env/specs/test_notebook.py"
751 "conda_env/utils/test_notebooks.py"
752 "core/test_index.py"
753 "core/test_repodata.py")))
754 (with-directory-excursion "tests"
755 (for-each delete-file network-tests)
756
757 ;; FIXME: This test creates a file, then deletes it and tests
758 ;; that the file was deleted. For some reason it fails when
759 ;; building with guix, but does not when you run it in the
760 ;; directory left when you build with the --keep-failed
761 ;; option
762 (delete-file "gateways/disk/test_delete.py")
6def31e8
EF
763 ;; This file is no longer writable after downloading with 'git-fetch'
764 (make-file-writable "conda_env/support/saved-env/environment.yml")
4bc08b6e
MFM
765 #t))))
766 (replace 'check
767 (lambda _
768 (setenv "HOME" "/tmp")
675e7bba 769 (invoke "py.test"))))))
4bc08b6e 770 (native-inputs
e227f248
EF
771 `(("python-cytoolz" ,python-cytoolz)
772 ("python-ruamel.yaml" ,python-ruamel.yaml)
4bc08b6e
MFM
773 ("python-requests" ,python-requests)
774 ("python-pycosat" ,python-pycosat)
775 ("python-pytest" ,python-pytest)
776 ("python-responses" ,python-responses)
777 ("python-pyyaml" ,python-pyyaml)
778 ("python-anaconda-client" ,python-anaconda-client)))
779 (home-page "https://github.com/conda/conda")
780 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
781 (description
782 "Conda is a cross-platform, Python-agnostic binary package manager. It
783is the package manager used by Anaconda installations, but it may be used for
784other systems as well. Conda makes environments first-class citizens, making
785it easy to create independent environments even for C libraries. Conda is
786written entirely in Python.
787
788This package provides Conda as a library.")
7ed6343f 789 (license license:bsd-3)))
4bc08b6e
MFM
790
791(define-public python2-conda
2c5cf844
LF
792 (let ((base (package-with-python2
793 (strip-python2-variant python-conda))))
794 (package (inherit base)
795 (native-inputs
796 `(("python2-enum34" ,python2-enum34)
797 ,@(package-native-inputs base))))))
84fcb580
MFM
798
799(define-public conda
800 (package (inherit python-conda)
801 (name "conda")
802 (arguments
803 (substitute-keyword-arguments (package-arguments python-conda)
804 ((#:phases phases)
805 `(modify-phases ,phases
806 (replace 'build
807 (lambda* (#:key outputs #:allow-other-keys)
808 ;; This test fails when run before installation.
809 (delete-file "tests/test_activate.py")
810
811 ;; Fix broken defaults
812 (substitute* "conda/base/context.py"
813 (("return sys.prefix")
814 (string-append "return \"" (assoc-ref outputs "out") "\""))
815 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
816 (string-append "return False if self.root_prefix == self.conda_prefix else "
817 match)))
818
819 ;; The util/setup-testing.py is used to build conda in
820 ;; application form, rather than the default, library form.
821 ;; With this, we are able to run commands like `conda --help`
822 ;; directly on the command line
d691e966 823 (invoke "python" "utils/setup-testing.py" "build_py")))
84fcb580
MFM
824 (replace 'install
825 (lambda* (#:key inputs outputs #:allow-other-keys)
826 (let* ((out (assoc-ref outputs "out"))
827 (target (string-append out "/lib/python"
9c2563a8 828 (python-version
84fcb580
MFM
829 (assoc-ref inputs "python"))
830 "/site-packages/")))
831 ;; The installer aborts if the target directory is not on
832 ;; PYTHONPATH.
833 (setenv "PYTHONPATH"
834 (string-append target ":" (getenv "PYTHONPATH")))
835
836 ;; And it aborts if the directory doesn't exist.
837 (mkdir-p target)
d691e966
EF
838 (invoke "python" "utils/setup-testing.py" "install"
839 (string-append "--prefix=" out)))))
1d84500a
RW
840 ;; The "activate" and "deactivate" scripts don't need wrapping.
841 ;; They also break when they are renamed.
842 (add-after 'wrap 'undo-wrap
843 (lambda* (#:key outputs #:allow-other-keys)
844 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
845 (delete-file "deactivate")
846 (rename-file ".deactivate-real" "deactivate")
847 (delete-file "activate")
848 (rename-file ".activate-real" "activate")
849 #t)))))))
84fcb580
MFM
850 (description
851 "Conda is a cross-platform, Python-agnostic binary package manager. It
852is the package manager used by Anaconda installations, but it may be used for
853other systems as well. Conda makes environments first-class citizens, making
854it easy to create independent environments even for C libraries. Conda is
855written entirely in Python.")))
58a308e0
RJ
856
857(define-public gwl
858 (package
859 (name "gwl")
efb98dd0 860 (version "0.2.1")
58a308e0
RJ
861 (source (origin
862 (method url-fetch)
598ea80f 863 (uri (string-append "mirror://gnu/gwl/gwl-" version ".tar.gz"))
58a308e0
RJ
864 (sha256
865 (base32
efb98dd0 866 "1ji5jvzni8aml9fmimlr11g3k8isrnlvnbzhmwgdjh72hils0alc"))))
58a308e0 867 (build-system gnu-build-system)
efb98dd0
RW
868 (arguments
869 `(#:phases
870 (modify-phases %standard-phases
871 (add-before 'build 'fix-tests
872 (lambda _
873 ;; Avoid cross-device link.
874 (substitute* "tests/cache.scm"
875 (("/tmp/gwl-test-input-XXXXXX")
876 (string-append (getcwd) "/gwl-test-input-XXXXXX")))
877 #t)))))
58a308e0
RJ
878 (native-inputs
879 `(("autoconf" ,autoconf)
880 ("automake" ,automake)
598ea80f
RW
881 ("pkg-config" ,pkg-config)
882 ("texinfo" ,texinfo)
883 ("graphviz" ,graphviz)))
58a308e0 884 (inputs
bfb6c393 885 `(("guile" ,guile-3.0)))
58a308e0 886 (propagated-inputs
b6bee63b
LC
887 `(("guix" ,guix)
888 ("guile-commonmark" ,guile-commonmark)
889 ("guile-gcrypt" ,guile-gcrypt)
890 ("guile-pfds" ,guile-pfds)
891 ("guile-syntax-highlight" ,guile-syntax-highlight)
892 ("guile-wisp" ,guile-wisp)))
598ea80f 893 (home-page "https://workflows.guix.info")
58a308e0 894 (synopsis "Workflow management extension for GNU Guix")
598ea80f
RW
895 (description "The @dfn{Guix Workflow Language} (GWL) provides an
896extension to GNU Guix's declarative language for package management to
897automate the execution of programs in scientific workflows. The GWL
898can use process engines to integrate with various computing
899environments.")
58a308e0
RJ
900 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
901 ;; the web interface modules in gwl/ are licensed AGPL3+,
902 ;; and the fonts included in this package are licensed OFL1.1.
7ed6343f 903 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
98a11b7f 904
fc1fe722
LC
905(define-public guix-jupyter
906 (package
907 (name "guix-jupyter")
908 (version "0.1.0")
909 (home-page "https://gitlab.inria.fr/guix-hpc/guix-kernel")
910 (source (origin
911 (method git-fetch)
912 (uri (git-reference (url home-page)
913 (commit (string-append "v" version))))
914 (sha256
915 (base32
916 "01z7jjkc7r7lj6637rcgpz40v8xqqyfp6871h94yvcnwm7zy9h1n"))
b6bee63b
LC
917 (modules '((guix build utils)))
918 (snippet
919 '(begin
920 ;; Allow builds with Guile 3.0.
921 (substitute* "configure.ac"
922 (("^GUILE_PKG.*")
923 "GUILE_PKG([3.0 2.2])\n"))
924 #t))
fc1fe722
LC
925 (file-name (string-append "guix-jupyter-" version "-checkout"))))
926 (build-system gnu-build-system)
927 (arguments
928 `(#:modules ((srfi srfi-26)
929 (ice-9 match)
930 (ice-9 popen)
931 (ice-9 rdelim)
932 (guix build utils)
933 (guix build gnu-build-system))
934 #:phases
935 (modify-phases %standard-phases
936 (add-after 'install 'sed-kernel-json
937 (lambda* (#:key inputs outputs #:allow-other-keys)
938 (let* ((out (assoc-ref outputs "out"))
939 (guix (assoc-ref inputs "guix"))
940 (guile (assoc-ref inputs "guile"))
941 (json (assoc-ref inputs "guile-json"))
942 (git (assoc-ref inputs "guile-git"))
943 (bs (assoc-ref inputs "guile-bytestructures"))
944 (s-zmq (assoc-ref inputs "guile-simple-zmq"))
945 (gcrypt (assoc-ref inputs "guile-gcrypt"))
946 (deps (list out s-zmq guix json git bs gcrypt))
947 (effective
948 (read-line
949 (open-pipe* OPEN_READ
950 (string-append guile "/bin/guile")
951 "-c" "(display (effective-version))")))
952 (path (map (cut string-append "-L\", \"" <>
953 "/share/guile/site/"
954 effective)
955 deps))
956 (gopath (map (cut string-append "-C\", \"" <>
957 "/lib/guile/" effective
958 "/site-ccache")
959 deps))
960 (kernel-dir (string-append out "/share/jupyter/kernels/guix/")))
961 (substitute* (string-append kernel-dir "kernel.json")
962 (("-s")
963 (string-join
964 (list (string-join path "\",\n\t\t\"")
965 (string-join gopath "\",\n\t\t\"")
966 "-s")
967 "\",\n\t\t\""))
968 (("guix-jupyter-kernel.scm")
969 (string-append out "/share/guile/site/2.2/"
970 "guix-jupyter-kernel.scm")))
971 #t))))))
972 (native-inputs
973 `(("autoconf" ,autoconf)
974 ("automake" ,automake)
975 ("pkg-config" ,pkg-config)
976
977 ;; For testing.
d3650775
LC
978 ("jupyter" ,jupyter)
979 ("python-ipython" ,python-ipython)
980 ("python-ipykernel" ,python-ipykernel)))
fc1fe722
LC
981 (inputs
982 `(("guix" ,guix)
b6bee63b 983 ("guile" ,guile-3.0)))
fc1fe722
LC
984 (propagated-inputs
985 `(("guile-json" ,guile-json-3)
986 ("guile-simple-zmq" ,guile-simple-zmq)
987 ("guile-gcrypt" ,guile-gcrypt)))
988 (synopsis "Guix kernel for Jupyter")
989 (description
990 "Guix-Jupyter is a Jupyter kernel. It allows you to annotate notebooks
991with information about their software dependencies, such that code is executed
992in the right software environment. Guix-Jupyter spawns the actual kernels
993such as @code{python-ipykernel} on behalf of the notebook user and runs them
994in an isolated environment, in separate namespaces.")
995 (license license:gpl3+)))
996
98a11b7f
TGR
997(define-public gcab
998 (package
999 (name "gcab")
a1785cfb 1000 (version "1.2")
98a11b7f
TGR
1001 (source (origin
1002 (method url-fetch)
41eac186
TGR
1003 (uri (string-append "mirror://gnome/sources/gcab/"
1004 version "/gcab-" version ".tar.xz"))
98a11b7f
TGR
1005 (sha256
1006 (base32
a1785cfb 1007 "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"))))
44118720 1008 (build-system meson-build-system)
98a11b7f 1009 (native-inputs
44118720
TGR
1010 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1011 ("intltool" ,intltool)
1012 ("pkg-config" ,pkg-config)
1013 ("vala" ,vala)))
98a11b7f
TGR
1014 (inputs
1015 `(("glib" ,glib)
1016 ("zlib" ,zlib)))
44118720
TGR
1017 (arguments
1018 `(#:configure-flags
1019 ;; XXX This ‘documentation’ is for developers, and fails informatively:
1020 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
1021 (list "-Ddocs=false"
1022 "-Dintrospection=false")))
98a11b7f
TGR
1023 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
1024 (synopsis "Microsoft Cabinet file manipulation library")
1025 (description
1026 "The libgcab library provides GObject functions to read, write, and modify
1027Microsoft cabinet (.@dfn{CAB}) files.")
1028 (license (list license:gpl2+ ; tests/testsuite.at
1029 license:lgpl2.1+)))) ; the rest
cb390925
TGR
1030
1031(define-public msitools
1032 (package
1033 (name "msitools")
84748e71 1034 (version "0.100")
cb390925
TGR
1035 (source (origin
1036 (method url-fetch)
a4469936
TGR
1037 (uri (string-append "mirror://gnome/sources/msitools/"
1038 version "/msitools-" version ".tar.xz"))
cb390925
TGR
1039 (sha256
1040 (base32
84748e71 1041 "1skq17qr2ic4qr3779j49byfm8rncwbsq9rj1a33ncn2m7isdwdv"))))
cb390925
TGR
1042 (build-system gnu-build-system)
1043 (native-inputs
9e4da9f2
TGR
1044 `(("bison" ,bison)
1045 ("pkg-config" ,pkg-config)))
cb390925
TGR
1046 (inputs
1047 `(("gcab" ,gcab)
1048 ("glib" ,glib)
1049 ("libgsf" ,libgsf)
1050 ("libxml2" ,libxml2)
bb93042c 1051 ("uuid" ,util-linux "lib")))
cb390925
TGR
1052 (home-page "https://wiki.gnome.org/msitools")
1053 (synopsis "Windows Installer file manipulation tool")
1054 (description
1055 "msitools is a collection of command-line tools to inspect, extract, build,
1056and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
1057for packaging and deployment of cross-compiled Windows applications.")
1058 (license license:lgpl2.1+)))
3d391309
SB
1059
1060(define-public libostree
1061 (package
1062 (name "libostree")
77ca6fb3 1063 (version "2020.3")
3d391309
SB
1064 (source (origin
1065 (method url-fetch)
1066 (uri (string-append
1067 "https://github.com/ostreedev/ostree/releases/download/v"
83d4da12 1068 (version-major+minor version) "/libostree-" version ".tar.xz"))
3d391309
SB
1069 (sha256
1070 (base32
77ca6fb3 1071 "01cch4as23xspq6pck59al7x5jj60wl21g8p3iqbdxcjl1p3jxsq"))))
3d391309
SB
1072 (build-system gnu-build-system)
1073 (arguments
1074 '(#:phases
1075 (modify-phases %standard-phases
1076 (add-before 'check 'pre-check
1077 (lambda _
1078 ;; Don't try to use the non-existing '/var/tmp' as test
1079 ;; directory.
1080 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
1081 #t)))
1082 ;; XXX: fails with:
5f97cc23 1083 ;; tap-driver.sh: missing test plan
3d391309
SB
1084 ;; tap-driver.sh: internal error getting exit status
1085 ;; tap-driver.sh: fatal: I/O or internal error
1086 #:tests? #f))
1087 (native-inputs
1088 `(("attr" ,attr) ; for tests
1089 ("bison" ,bison)
5f97cc23 1090 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
3d391309
SB
1091 ("gobject-introspection" ,gobject-introspection)
1092 ("pkg-config" ,pkg-config)
1093 ("xsltproc" ,libxslt)))
1094 (inputs
1095 `(("avahi" ,avahi)
1096 ("docbook-xml" ,docbook-xml-4.2)
1097 ("docbook-xsl" ,docbook-xsl)
1098 ("e2fsprogs" ,e2fsprogs)
1099 ("fuse" ,fuse)
1100 ("glib" ,glib)
1101 ("gpgme" ,gpgme)
1102 ("libarchive" ,libarchive)
1103 ("libsoup" ,libsoup)
3d391309
SB
1104 ("util-linux" ,util-linux)))
1105 (home-page "https://ostree.readthedocs.io/en/latest/")
1106 (synopsis "Operating system and container binary deployment and upgrades")
1107 (description
1108 "@code{libostree} is both a shared library and suite of command line
1109tools that combines a \"git-like\" model for committing and downloading
52beae7b
TGR
1110bootable file system trees, along with a layer for deploying them and managing
1111the boot loader configuration.")
3d391309 1112 (license license:lgpl2.0+)))
36e1ab84
RH
1113
1114(define-public flatpak
1115 (package
122db9a6 1116 (name "flatpak")
ac68fb3b 1117 (version "1.6.3")
122db9a6
RH
1118 (source
1119 (origin
1120 (method url-fetch)
1121 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
1122 version "/flatpak-" version ".tar.xz"))
1123 (sha256
1124 (base32
ac68fb3b 1125 "17s8nqdxd4xdy7ag9bw06adxccha78jmlsa3zpqnl3qh92pg0hji"))))
16360cc8
LC
1126
1127 ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
1128 ;; find the TLS backend in glib-networking.
1129 (build-system glib-or-gtk-build-system)
1130
122db9a6 1131 (arguments
ac68fb3b
RW
1132 '(#:configure-flags
1133 (list
1134 "--enable-documentation=no" ;; FIXME
1135 "--enable-system-helper=no"
1136 "--localstatedir=/var"
1137 (string-append "--with-system-bubblewrap="
1138 (assoc-ref %build-inputs "bubblewrap")
1139 "/bin/bwrap")
1140 "--with-system-dbus-proxy")
1141 #:phases
1142 (modify-phases %standard-phases
1143 (add-after 'unpack 'fix-tests
1144 (lambda* (#:key inputs #:allow-other-keys)
1145 (copy-recursively
1146 (string-append (assoc-ref inputs "glibc-utf8-locales")
1147 "/lib/locale/") "/tmp/locale")
1148 (for-each make-file-writable (find-files "/tmp"))
1149 (substitute* "tests/make-test-runtime.sh"
1150 (("cp `which.*") "echo guix\n")
1151 (("cp -r /usr/lib/locale/C\\.\\*")
1152 (string-append "mkdir ${DIR}/usr/lib/locale/en_US; \
1153cp -r /tmp/locale/*/en_US.*")))
1154 (substitute* "tests/libtest.sh"
1155 (("/bin/kill") (which "kill"))
1156 (("/usr/bin/python3") (which "python3")))
1157 #t))
1158 ;; Many tests fail for unknown reasons, so we just run a few basic
1159 ;; tests
1160 (replace 'check
1161 (lambda _
1162 (setenv "HOME" "/tmp")
1163 (invoke "make" "check"
1164 "TESTS=tests/test-basic.sh tests/test-config.sh testcommon"))))))
1165 (native-inputs
1166 `(("bison" ,bison)
1167 ("dbus" ,dbus) ; for dbus-daemon
1168 ("gettext" ,gettext-minimal)
1169 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
1170 ("glibc-utf8-locales" ,glibc-utf8-locales)
1171 ("gobject-introspection" ,gobject-introspection)
1172 ("libcap" ,libcap)
1173 ("pkg-config" ,pkg-config)
1174 ("python" ,python)
1175 ("socat" ,socat)
1176 ("which" ,which)))
75f0bda7
RH
1177 (propagated-inputs `(("glib-networking" ,glib-networking)
1178 ("gnupg" ,gnupg)
1179 ("gsettings-desktop-schemas"
1180 ,gsettings-desktop-schemas)))
ac68fb3b
RW
1181 (inputs
1182 `(("appstream-glib" ,appstream-glib)
1183 ("bubblewrap" ,bubblewrap)
1184 ("dconf" ,dconf)
1185 ("fuse" ,fuse)
1186 ("gdk-pixbuf" ,gdk-pixbuf)
1187 ("gpgme" ,gpgme)
1188 ("json-glib" ,json-glib)
1189 ("libarchive" ,libarchive)
1190 ("libostree" ,libostree)
1191 ("libseccomp" ,libseccomp)
1192 ("libsoup" ,libsoup)
1193 ("libxau" ,libxau)
1194 ("libxml2" ,libxml2)
1195 ("util-linux" ,util-linux)
1196 ("xdg-dbus-proxy" ,xdg-dbus-proxy)))
122db9a6
RH
1197 (home-page "https://flatpak.org")
1198 (synopsis "System for building, distributing, and running sandboxed desktop
36e1ab84 1199applications")
122db9a6 1200 (description "Flatpak is a system for building, distributing, and running
36e1ab84 1201sandboxed desktop applications on GNU/Linux.")
122db9a6 1202 (license license:lgpl2.1+)))