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