1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
5 ;;; Copyright © 2017, 2018 Oleg Pykhalov <go.wigust@gmail.com>
6 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
7 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
9 ;;; Copyright © 2018, 2019 Rutger Helling <rhelling@mykolab.com>
10 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
11 ;;; Copyright © 2018, 2019 Eric Bavier <bavier@member.fsf.org>
12 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019 Vagrant Cascadian <vagrant@reproducible-builds.org>
14 ;;; Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
16 ;;; This file is part of GNU Guix.
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.
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.
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/>.
31 (define-module (gnu packages package-management)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages acl)
34 #:use-module (gnu packages attr)
35 #:use-module (gnu packages avahi)
36 #:use-module (gnu packages autotools)
37 #:use-module (gnu packages backup)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages bdw-gc)
40 #:use-module (gnu packages bison)
41 #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
42 #:use-module (gnu packages check)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages cpio)
45 #:use-module (gnu packages crypto)
46 #:use-module (gnu packages curl)
47 #:use-module (gnu packages dbm)
48 #:use-module (gnu packages docbook)
49 #:use-module (gnu packages file)
50 #:use-module (gnu packages gettext)
51 #:use-module (gnu packages glib)
52 #:use-module (gnu packages gnome)
53 #:use-module (gnu packages gnupg)
54 #:use-module (gnu packages graphviz)
55 #:use-module (gnu packages gtk)
56 #:use-module (gnu packages guile)
57 #:use-module (gnu packages guile-xyz)
58 #:use-module (gnu packages linux)
59 #:use-module (gnu packages lisp)
60 #:use-module (gnu packages man)
61 #:use-module (gnu packages nettle)
62 #:use-module (gnu packages nss)
63 #:use-module (gnu packages patchutils)
64 #:use-module (gnu packages perl)
65 #:use-module (gnu packages perl-check)
66 #:use-module (gnu packages pkg-config)
67 #:use-module (gnu packages popt)
68 #:use-module (gnu packages python)
69 #:use-module (gnu packages python-web)
70 #:use-module (gnu packages python-xyz)
71 #:use-module (gnu packages serialization)
72 #:use-module (gnu packages sqlite)
73 #:use-module (gnu packages ssh)
74 #:use-module (gnu packages texinfo)
75 #:use-module (gnu packages time)
76 #:use-module (gnu packages tls)
77 #:use-module (gnu packages vim)
78 #:use-module (gnu packages virtualization)
79 #:use-module (gnu packages web)
80 #:use-module (gnu packages xml)
81 #:use-module (gnu packages xorg)
82 #:use-module (guix build-system glib-or-gtk)
83 #:use-module (guix build-system gnu)
84 #:use-module (guix build-system meson)
85 #:use-module (guix build-system python)
86 #:use-module (guix download)
87 #:use-module (guix gexp)
88 #:use-module (guix git-download)
89 #:use-module ((guix licenses) #:prefix license:)
90 #:use-module (guix packages)
91 #:use-module (guix utils)
92 #:use-module (ice-9 match)
93 #:use-module (srfi srfi-1))
95 (define (boot-guile-uri arch)
96 "Return the URI for the bootstrap Guile tarball for ARCH."
97 (cond ((string=? "armhf" arch)
98 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
100 "/20150101/guile-2.0.11.tar.xz"))
101 ((string=? "aarch64" arch)
102 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
103 arch "-linux/20170217/guile-2.0.14.tar.xz"))
105 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
107 "/20131110/guile-2.0.9.tar.xz"))))
110 ;; Latest version of Guix, which may or may not correspond to a release.
111 ;; Note: the 'update-guix-package.scm' script expects this definition to
112 ;; start precisely like this.
113 (let ((version "1.0.1")
114 (commit "4a54ed774913480c0f8dad3caf0cd627e4fa8ebf")
119 (version (if (zero? revision)
121 (string-append version "-"
122 (number->string revision)
123 "." (string-take commit 7))))
127 (url "https://git.savannah.gnu.org/r/guix.git")
131 "14m4a4bn0d5hav6mrks5d7r223knx9dpswgbsc875wgr2921na2h"))
132 (file-name (string-append "guix-" version "-checkout"))))
133 (build-system gnu-build-system)
135 `(#:configure-flags (list
136 "--localstatedir=/var"
138 (string-append "--with-bash-completion-dir="
139 (assoc-ref %outputs "out")
140 "/etc/bash_completion.d")
142 ;; Set 'DOT_USER_PROGRAM' to the empty string so
143 ;; we don't keep a reference to Graphviz, whose
144 ;; closure is pretty big (too big for the Guix
145 ;; system installation image.)
146 "ac_cv_path_DOT_USER_PROGRAM=dot"
148 ;; To avoid problems with the length of shebangs,
149 ;; choose a fixed-width and short directory name
151 "ac_cv_guix_test_root=/tmp/guix-tests")
152 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
154 #:modules ((guix build gnu-build-system)
160 #:phases (modify-phases %standard-phases
163 ;; Make sure 'msgmerge' can modify the PO files.
164 (for-each (lambda (po)
166 (find-files "." "\\.po$"))
168 (patch-shebang "build-aux/git-version-gen")
170 (call-with-output-file ".tarball-version"
172 (display ,version port)))
174 (invoke "sh" "bootstrap")))
175 (add-before 'check 'copy-bootstrap-guile
176 (lambda* (#:key system inputs #:allow-other-keys)
177 ;; Copy the bootstrap guile tarball in the store used
178 ;; by the test suite.
179 (define (intern tarball)
180 (let ((base (strip-store-file-name tarball)))
181 (copy-file tarball base)
182 (invoke "./test-env" "guix" "download"
183 (string-append "file://" (getcwd)
188 (intern (assoc-ref inputs "boot-guile"))
190 ;; On x86_64 some tests need the i686 Guile.
191 ,@(if (and (not (%current-target-system))
192 (string=? (%current-system)
194 '((intern (assoc-ref inputs "boot-guile/i686")))
197 (add-after 'unpack 'disable-failing-tests
198 ;; XXX FIXME: These tests fail within the build container.
200 (substitute* "tests/syscalls.scm"
201 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
202 (string-append "(test-skip 1)\n" all)))
203 (substitute* "tests/containers.scm"
204 (("^\\(test-(assert|equal)" all)
205 (string-append "(test-skip 1)\n" all)))
206 (when (file-exists? "tests/guix-environment-container.sh")
207 (substitute* "tests/guix-environment-container.sh"
208 (("guix environment --version")
211 (add-before 'check 'set-SHELL
213 ;; 'guix environment' tests rely on 'SHELL' having a
214 ;; correct value, so set it.
215 (setenv "SHELL" (which "sh"))
217 (add-after 'install 'wrap-program
218 (lambda* (#:key inputs outputs #:allow-other-keys)
219 ;; Make sure the 'guix' command finds GnuTLS,
220 ;; Guile-JSON, and Guile-Git automatically.
221 (let* ((out (assoc-ref outputs "out"))
222 (guile (assoc-ref inputs "guile"))
223 (gcrypt (assoc-ref inputs "guile-gcrypt"))
224 (json (assoc-ref inputs "guile-json"))
225 (sqlite (assoc-ref inputs "guile-sqlite3"))
226 (git (assoc-ref inputs "guile-git"))
227 (bs (assoc-ref inputs
228 "guile-bytestructures"))
229 (ssh (assoc-ref inputs "guile-ssh"))
230 (gnutls (assoc-ref inputs "gnutls"))
231 (locales (assoc-ref inputs "glibc-utf8-locales"))
232 (deps (list gcrypt json sqlite gnutls
236 (open-pipe* OPEN_READ
237 (string-append guile "/bin/guile")
238 "-c" "(display (effective-version))")))
240 (map (cut string-append <>
246 (map (cut string-append <>
247 "/lib/guile/" effective
251 (locpath (string-append locales "/lib/locale")))
253 (wrap-program (string-append out "/bin/guix")
254 `("GUILE_LOAD_PATH" ":" prefix (,path))
255 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
256 `("GUIX_LOCPATH" ":" suffix (,locpath)))
259 (native-inputs `(("pkg-config" ,pkg-config)
261 ;; XXX: Keep the development inputs here even though
262 ;; they're unnecessary, just so that 'guix environment
263 ;; guix' always contains them.
264 ("autoconf" ,autoconf-wrapper)
265 ("automake" ,automake)
266 ("gettext" ,gettext-minimal)
268 ("graphviz" ,graphviz)
269 ("help2man" ,help2man)
274 ("zlib" ,zlib) ;for 'guix publish'
275 ("lzlib" ,lzlib) ;for 'guix publish' and 'guix substitute'
278 ("libgcrypt" ,libgcrypt)
282 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
284 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
285 ;; Some of the tests use "unshare" when it is available.
286 ("util-linux" ,util-linux)
287 ,@(if (and (not (%current-target-system))
288 (string=? (%current-system) "x86_64-linux"))
289 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
292 ("glibc-utf8-locales" ,glibc-utf8-locales)))
295 ("guile-gcrypt" ,guile-gcrypt)
296 ("guile-json" ,guile-json)
297 ("guile-sqlite3" ,guile-sqlite3)
298 ("guile-ssh" ,guile-ssh)
299 ("guile-git" ,guile-git)))
301 (home-page "https://www.gnu.org/software/guix/")
302 (synopsis "Functional package manager for installed software packages and versions")
304 "GNU Guix is a functional package manager for the GNU system, and is
305 also a distribution thereof. It includes a virtual machine image. Besides
306 the usual package management features, it also supports transactional
307 upgrades and roll-backs, per-user profiles, and much more. It is based on
308 the Nix package manager.")
309 (license license:gpl3+)
310 (properties '((ftp-server . "alpha.gnu.org"))))))
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
318 (properties `((hidden? . #t)))
321 ;; Use a minimum set of dependencies.
323 (fold alist-delete (package-native-inputs guix)
324 '("po4a" "graphviz" "help2man")))
327 ("guile-git" ,guile-git)
328 ("guile-json" ,guile-json)
329 ("guile-gcrypt" ,guile-gcrypt)
330 ,@(fold alist-delete (package-inputs guix)
331 '("boot-guile" "boot-guile/i686" "util-linux"))))
333 (propagated-inputs '())
336 (substitute-keyword-arguments (package-arguments guix)
337 ((#:configure-flags flags '())
338 ;; Pretend we have those libraries; we don't actually need them.
340 '("guix_cv_have_recent_guile_sqlite3=yes"
341 "guix_cv_have_recent_guile_ssh=yes")))
344 ((#:phases phases '%standard-phases)
345 `(modify-phases ,phases
348 (invoke "make" "nix/libstore/schema.sql.hh")
349 (invoke "make" "-j" (number->string
350 (parallel-job-count))
352 (delete 'copy-bootstrap-guile)
354 (lambda* (#:key outputs #:allow-other-keys)
355 (invoke "make" "install-binPROGRAMS"
356 "install-nodist_pkglibexecSCRIPTS")
358 ;; We need to tell 'guix-daemon' which 'guix' command to use.
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.
363 (let ((out (assoc-ref outputs "out")))
364 (substitute* (find-files (string-append out "/libexec"))
365 (("exec \".*/bin/guix\"")
366 "exec \"${GUIX:-/var/guix/profiles/per-user/root/current-guix/bin/guix}\""))
368 (delete 'wrap-program)))))))
370 (define-public guile2.0-guix
371 (deprecated-package "guile2.0-guix" guix))
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
380 (name "guix-minimal")
382 `(("guile" ,guile-2.2)
383 ,@(alist-delete "guile" (package-inputs guix))))
386 (package-propagated-inputs guix)
389 (define (source-file? file stat)
390 "Return true if FILE is likely a source file, false if it is a typical
392 (define (wrong-extension? file)
393 (or (string-suffix? "~" file)
394 (member (file-extension file)
395 '("o" "a" "lo" "so" "go"))))
397 (match (basename file)
398 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
400 ((? wrong-extension?)
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.
411 (define-public current-guix
412 (let* ((repository-root (delay (canonicalize-path
413 (string-append (current-source-directory)
415 (select? (delay (or (git-predicate (force repository-root))
418 "Return a package representing Guix built from the current source tree.
419 This works by adding the current source tree to the store (after filtering it
420 out) and returning a package that uses that as its 'source'."
421 (or (current-guix-package)
424 (version (string-append (package-version guix) "+"))
425 (source (local-file (force repository-root) "guix-current"
427 #:select? (force select?))))))))
440 (uri (string-append "http://nixos.org/releases/nix/nix-"
441 version "/nix-" version ".tar.xz"))
444 "0ss9svxlh1pvrdmnqjvjyqjmbqmrdbyfarvbb14i9d4bggzl0r8n"))))
445 (build-system gnu-build-system)
446 (native-inputs `(("pkg-config" ,pkg-config)))
447 (inputs `(("curl" ,curl)
450 ("libseccomp" ,libseccomp)
451 ("libsodium" ,libsodium)
455 (home-page "https://nixos.org/nix/")
456 (synopsis "The Nix package manager")
458 "Nix is a purely functional package manager. This means that it treats
459 packages like values in purely functional programming languages such as
460 Haskell—they are built by functions that don't have side-effects, and they
461 never change after they have been built. Nix stores packages in the Nix
462 store, usually the directory /nix/store, where each package has its own unique
464 (license license:lgpl2.1+)))
472 (uri (string-append "mirror://gnu/stow/stow-"
476 "0h8qr2rxsrkg6d8jxjk68r23jgn1dxdxyp4bnzzinpa8sjhfl905"))))
477 (build-system gnu-build-system)
481 `(("perl-test-simple" ,perl-test-simple)
482 ("perl-test-output" ,perl-test-output)
483 ("perl-capture-tiny" ,perl-capture-tiny)
484 ("perl-io-stringy" ,perl-io-stringy)))
486 `(("perl-clone-choose" ,perl-clone-choose)
487 ("perl-clone" ,perl-clone)
488 ("perl-hash-merge" ,perl-hash-merge)))
489 (home-page "https://www.gnu.org/software/stow/")
490 (synopsis "Managing installed software packages")
492 "GNU Stow is a symlink manager. It generates symlinks to directories
493 of data and makes them appear to be merged into the same directory. It is
494 typically used for managing software packages installed from source, by
495 letting you install them apart in distinct directories and then create
496 symlinks to the files in a common directory such as /usr/local.")
497 (license license:gpl2+)))
505 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
506 (version-major+minor version) ".x/rpm-"
510 "1nmck2fq9h85fgs3zhh6w1avlw5y16cbz5khd459ry3jfd5w4f8i"))))
511 (build-system gnu-build-system)
513 '(#:configure-flags '("--with-external-db" ;use the system's bdb
516 #:phases (modify-phases %standard-phases
517 (add-before 'configure 'set-nss-library-path
518 (lambda* (#:key inputs #:allow-other-keys)
519 (let ((nss (assoc-ref inputs "nss")))
520 (setenv "LIBRARY_PATH"
521 (string-append (getenv "LIBRARY_PATH") ":"
525 `(("pkg-config" ,pkg-config)))
533 ("libarchive" ,libarchive)
534 ("nettle" ,nettle) ;XXX: actually a dependency of libarchive
539 (home-page "https://rpm.org/")
540 (synopsis "The RPM Package Manager")
542 "The RPM Package Manager (RPM) is a command-line driven package
543 management system capable of installing, uninstalling, verifying, querying,
544 and updating computer software packages. Each software package consists of an
545 archive of files along with information about the package like its version, a
546 description. There is also a library permitting developers to manage such
547 transactions from C or Python.")
549 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
550 (license license:gpl2+)))
552 (define-public diffoscope
555 (version (git-version "115" "1" "7f3416ffd12572b42c814e43ac15cee44ef48155"))
559 (url "https://salsa.debian.org/reproducible-builds/diffoscope.git")
560 (commit "7f3416ffd12572b42c814e43ac15cee44ef48155")))
561 (file-name (git-file-name name version))
564 "1pn2rwlz5shdx7s63798wx2v7029bl5if6dlq3i2r6zsnpp0laki"))))
565 (build-system python-build-system)
567 `(#:phases (modify-phases %standard-phases
568 ;; setup.py mistakenly requires python-magic from PyPi, even
569 ;; though the Python bindings of `file` are sufficient.
570 ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844
571 (add-after 'unpack 'dependency-on-python-magic
573 (substitute* "setup.py"
574 (("'python-magic',") ""))))
575 ;; This test is broken because our `file` package has a
576 ;; bug in berkeley-db file type detection.
577 (add-after 'unpack 'remove-berkeley-test
579 (delete-file "tests/comparators/test_berkeley_db.py")
581 (add-after 'unpack 'embed-tool-references
582 (lambda* (#:key inputs #:allow-other-keys)
583 (substitute* "diffoscope/comparators/utils/compare.py"
585 (string-append "['" (which "xxd") "',")))
586 (substitute* "diffoscope/comparators/elf.py"
587 (("@tool_required\\('readelf'\\)") "")
588 (("get_tool_name\\('readelf'\\)")
589 (string-append "'" (which "readelf") "'")))
590 (substitute* "diffoscope/comparators/directory.py"
591 (("@tool_required\\('stat'\\)") "")
592 (("@tool_required\\('getfacl'\\)") "")
594 (string-append "['" (which "stat") "',"))
596 (string-append "['" (which "getfacl") "',")))
598 (add-before 'check 'delete-failing-test
600 ;; this requires /sbin to be on the path
601 (delete-file "tests/test_tools.py")
603 (inputs `(("rpm" ,rpm) ;for rpm-python
604 ("python-file" ,python-file)
605 ("python-debian" ,python-debian)
606 ("python-libarchive-c" ,python-libarchive-c)
607 ("python-tlsh" ,python-tlsh)
608 ("acl" ,acl) ;for getfacl
609 ("colordiff" ,colordiff)
611 ;; Below are modules used for tests.
612 (native-inputs `(("python-pytest" ,python-pytest)
613 ("python-chardet" ,python-chardet)))
614 (home-page "https://diffoscope.org/")
615 (synopsis "Compare files, archives, and directories in depth")
617 "Diffoscope tries to get to the bottom of what makes files or directories
618 different. It recursively unpacks archives of many kinds and transforms
619 various binary formats into more human readable forms to compare them. It can
620 compare two tarballs, ISO images, or PDFs just as easily.")
621 (license license:gpl3+)))
623 (define-public trydiffoscope
625 (name "trydiffoscope")
631 (url "https://salsa.debian.org/reproducible-builds/trydiffoscope.git")
633 (file-name (git-file-name name version))
636 "03b66cjii7l2yiwffj6ym6mycd5drx7prfp4j2550281pias6mjh"))))
639 (modify-phases %standard-phases
640 (add-after 'install 'install-doc
641 (lambda* (#:key outputs #:allow-other-keys)
642 (let* ((share (string-append (assoc-ref outputs "out") "/share/")))
643 (mkdir-p (string-append share "/man/man1/" ))
645 "trydiffoscope.1.rst"
646 (string-append share "/man/man1/trydiffoscope.1"))
647 (mkdir-p (string-append share "/doc/" ,name "-" ,version))
648 (install-file "./README.rst"
649 (string-append share "/doc/" ,name "-" ,version)))
652 `(("python-requests" ,python-requests)))
655 ("python-docutils" ,python-docutils)))
656 (build-system python-build-system)
657 (home-page "https://try.diffoscope.org")
658 (synopsis "Client for remote diffoscope service")
659 (description "This is a client for the @url{https://try.diffoscope.org,
660 remote diffoscope service}.
662 Diffoscope tries to get to the bottom of what makes files or directories
663 different. It recursively unpacks archives of many kinds and transforms
664 various binary formats into more human readable forms to compare them. It can
665 compare two tarballs, ISO images, or PDFs just as easily.
667 Results are displayed by default, stored as local text or html files, or made
668 available via a URL on @url{https://try.diffoscope.org}. Results stored on the
669 server are purged after 30 days.")
670 (license license:gpl3+)))
672 (define-public python-anaconda-client
674 (name "python-anaconda-client")
679 (uri (string-append "https://github.com/Anaconda-Platform/"
680 "anaconda-client/archive/" version ".tar.gz"))
681 (file-name (string-append name "-" version ".tar.gz"))
684 "1wv4wi6k5jz7rlwfgvgfdizv77x3cr1wa2aj0k1595g7fbhkjhz2"))))
685 (build-system python-build-system)
687 `(("python-pyyaml" ,python-pyyaml)
688 ("python-requests" ,python-requests)
689 ("python-clyent" ,python-clyent)))
691 `(("python-pytz" ,python-pytz)
692 ("python-dateutil" ,python-dateutil)
693 ("python-mock" ,python-mock)
694 ("python-coverage" ,python-coverage)
695 ("python-pillow" ,python-pillow)))
698 (modify-phases %standard-phases
699 ;; This is needed for some tests.
700 (add-before 'check 'set-up-home
701 (lambda* _ (setenv "HOME" "/tmp") #t))
702 (add-before 'check 'remove-network-tests
704 ;; Remove tests requiring a network connection
705 (let ((network-tests '("tests/test_upload.py"
706 "tests/test_authorizations.py"
707 "tests/test_login.py"
708 "tests/test_whoami.py"
709 "utils/notebook/tests/test_data_uri.py"
710 "utils/notebook/tests/test_base.py"
711 "utils/notebook/tests/test_downloader.py"
712 "inspect_package/tests/test_conda.py")))
713 (with-directory-excursion "binstar_client"
714 (for-each delete-file network-tests)))
716 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
717 (synopsis "Anaconda Cloud command line client library")
719 "Anaconda Cloud command line client library provides an interface to
720 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
722 (license license:bsd-3)))
724 (define-public python2-anaconda-client
725 (package-with-python2 python-anaconda-client))
727 (define-public python-conda
729 (name "python-conda")
734 (uri (string-append "https://github.com/conda/conda/archive/"
736 (file-name (string-append name "-" version ".tar.gz"))
739 "1jq8hyrc5npb5sf4vw6s6by4602yj8f79vzpbwdfgpkn02nfk1dv"))))
740 (build-system python-build-system)
743 (modify-phases %standard-phases
744 (add-before 'build 'create-version-file
746 (with-output-to-file "conda/.version"
747 (lambda () (display ,version)))
749 (add-before 'check 'remove-failing-tests
751 ;; These tests require internet/network access
752 (let ((network-tests '("test_cli.py"
760 "conda_env/test_cli.py"
761 "conda_env/test_create.py"
762 "conda_env/specs/test_notebook.py"
763 "conda_env/utils/test_notebooks.py"
765 "core/test_repodata.py")))
766 (with-directory-excursion "tests"
767 (for-each delete-file network-tests)
769 ;; FIXME: This test creates a file, then deletes it and tests
770 ;; that the file was deleted. For some reason it fails when
771 ;; building with guix, but does not when you run it in the
772 ;; directory left when you build with the --keep-failed
774 (delete-file "gateways/disk/test_delete.py")
778 (setenv "HOME" "/tmp")
779 (invoke "py.test"))))))
781 `(("python-cytoolz" ,python-cytoolz)
782 ("python-ruamel.yaml" ,python-ruamel.yaml)
783 ("python-requests" ,python-requests)
784 ("python-pycosat" ,python-pycosat)
785 ("python-pytest" ,python-pytest)
786 ("python-responses" ,python-responses)
787 ("python-pyyaml" ,python-pyyaml)
788 ("python-anaconda-client" ,python-anaconda-client)))
789 (home-page "https://github.com/conda/conda")
790 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
792 "Conda is a cross-platform, Python-agnostic binary package manager. It
793 is the package manager used by Anaconda installations, but it may be used for
794 other systems as well. Conda makes environments first-class citizens, making
795 it easy to create independent environments even for C libraries. Conda is
796 written entirely in Python.
798 This package provides Conda as a library.")
799 (license license:bsd-3)))
801 (define-public python2-conda
802 (let ((base (package-with-python2
803 (strip-python2-variant python-conda))))
804 (package (inherit base)
806 `(("python2-enum34" ,python2-enum34)
807 ,@(package-native-inputs base))))))
810 (package (inherit python-conda)
813 (substitute-keyword-arguments (package-arguments python-conda)
815 `(modify-phases ,phases
817 (lambda* (#:key outputs #:allow-other-keys)
818 ;; This test fails when run before installation.
819 (delete-file "tests/test_activate.py")
821 ;; Fix broken defaults
822 (substitute* "conda/base/context.py"
823 (("return sys.prefix")
824 (string-append "return \"" (assoc-ref outputs "out") "\""))
825 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
826 (string-append "return False if self.root_prefix == self.conda_prefix else "
829 ;; The util/setup-testing.py is used to build conda in
830 ;; application form, rather than the default, library form.
831 ;; With this, we are able to run commands like `conda --help`
832 ;; directly on the command line
833 (invoke "python" "utils/setup-testing.py" "build_py")))
835 (lambda* (#:key inputs outputs #:allow-other-keys)
836 (let* ((out (assoc-ref outputs "out"))
837 (target (string-append out "/lib/python"
838 ((@@ (guix build python-build-system)
840 (assoc-ref inputs "python"))
842 ;; The installer aborts if the target directory is not on
845 (string-append target ":" (getenv "PYTHONPATH")))
847 ;; And it aborts if the directory doesn't exist.
849 (invoke "python" "utils/setup-testing.py" "install"
850 (string-append "--prefix=" out)))))
851 ;; The "activate" and "deactivate" scripts don't need wrapping.
852 ;; They also break when they are renamed.
853 (add-after 'wrap 'undo-wrap
854 (lambda* (#:key outputs #:allow-other-keys)
855 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
856 (delete-file "deactivate")
857 (rename-file ".deactivate-real" "deactivate")
858 (delete-file "activate")
859 (rename-file ".activate-real" "activate")
862 "Conda is a cross-platform, Python-agnostic binary package manager. It
863 is the package manager used by Anaconda installations, but it may be used for
864 other systems as well. Conda makes environments first-class citizens, making
865 it easy to create independent environments even for C libraries. Conda is
866 written entirely in Python.")))
874 (uri (string-append "https://www.guixwl.org/releases/gwl-"
878 "06pm967mq1wyggx7l0nfapw5s0k5qc5r9lawk2v3db868br779a7"))))
879 (build-system gnu-build-system)
881 `(("autoconf" ,autoconf)
882 ("automake" ,automake)
883 ("pkg-config" ,pkg-config)))
885 `(("guile" ,guile-2.2)))
888 ("guile-commonmark" ,guile-commonmark)))
889 (home-page "https://www.guixwl.org")
890 (synopsis "Workflow management extension for GNU Guix")
891 (description "This project provides two subcommands to GNU Guix and
892 introduces two record types that provide a workflow management extension built
893 on top of GNU Guix.")
894 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
895 ;; the web interface modules in gwl/ are licensed AGPL3+,
896 ;; and the fonts included in this package are licensed OFL1.1.
897 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
905 (uri (string-append "mirror://gnome/sources/gcab/"
906 version "/gcab-" version ".tar.xz"))
909 "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"))))
910 (build-system meson-build-system)
912 `(("glib:bin" ,glib "bin") ; for glib-mkenums
913 ("intltool" ,intltool)
914 ("pkg-config" ,pkg-config)
921 ;; XXX This ‘documentation’ is for developers, and fails informatively:
922 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
924 "-Dintrospection=false")))
925 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
926 (synopsis "Microsoft Cabinet file manipulation library")
928 "The libgcab library provides GObject functions to read, write, and modify
929 Microsoft cabinet (.@dfn{CAB}) files.")
930 (license (list license:gpl2+ ; tests/testsuite.at
931 license:lgpl2.1+)))) ; the rest
933 (define-public msitools
939 (uri (string-append "mirror://gnome/sources/msitools/"
940 version "/msitools-" version ".tar.xz"))
943 "0d9nidn5zc81bc30w119933rn2g87mrsqyqkndg20srkbsd96xfl"))))
944 (build-system gnu-build-system)
947 ("pkg-config" ,pkg-config)))
953 ("uuid" ,util-linux)))
954 (home-page "https://wiki.gnome.org/msitools")
955 (synopsis "Windows Installer file manipulation tool")
957 "msitools is a collection of command-line tools to inspect, extract, build,
958 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
959 for packaging and deployment of cross-compiled Windows applications.")
960 (license license:lgpl2.1+)))
962 (define-public libostree
969 "https://github.com/ostreedev/ostree/releases/download/v"
970 (version-major+minor version) "/libostree-" version ".tar.xz"))
973 "01mygpkbl9sk2vr3hjbpih6qlg8lwx0q5lklm09f7jfwfpnwyqzj"))))
974 (build-system gnu-build-system)
977 (modify-phases %standard-phases
978 (add-before 'check 'pre-check
980 ;; Don't try to use the non-existing '/var/tmp' as test
982 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
985 ;; tap-driver.sh: internal error getting exit status
986 ;; tap-driver.sh: fatal: I/O or internal error
989 `(("attr" ,attr) ; for tests
991 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
992 ("gobject-introspection" ,gobject-introspection)
993 ("pkg-config" ,pkg-config)
994 ("xsltproc" ,libxslt)))
997 ("docbook-xml" ,docbook-xml-4.2)
998 ("docbook-xsl" ,docbook-xsl)
999 ("e2fsprogs" ,e2fsprogs)
1003 ("libarchive" ,libarchive)
1004 ("libsoup" ,libsoup)
1005 ("nettle" ,nettle) ; required by 'libarchive.la'
1006 ("util-linux" ,util-linux)))
1007 (home-page "https://ostree.readthedocs.io/en/latest/")
1008 (synopsis "Operating system and container binary deployment and upgrades")
1010 "@code{libostree} is both a shared library and suite of command line
1011 tools that combines a \"git-like\" model for committing and downloading
1012 bootable file system trees, along with a layer for deploying them and managing
1013 the boot loader configuration.")
1014 (license license:lgpl2.0+)))
1016 (define-public flatpak
1023 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
1024 version "/flatpak-" version ".tar.xz"))
1027 "1qf3ys84fzv11z6f6li59rxjdjbyrv7cyi9539k73r9i9pckjr8v"))))
1029 ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
1030 ;; find the TLS backend in glib-networking.
1031 (build-system glib-or-gtk-build-system)
1034 '(#:tests? #f ;; Tests fail due to trying to create files where it can't.
1035 #:configure-flags (list
1036 "--enable-documentation=no" ;; FIXME
1037 "--enable-system-helper=no"
1038 "--localstatedir=/var"
1039 (string-append "--with-system-bubblewrap="
1040 (assoc-ref %build-inputs "bubblewrap")
1042 (native-inputs `(("bison" ,bison)
1043 ("gettext" ,gnu-gettext)
1044 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
1045 ("gobject-introspection" ,gobject-introspection)
1047 ("pkg-config" ,pkg-config)))
1048 (propagated-inputs `(("glib-networking" ,glib-networking)
1050 ("gsettings-desktop-schemas"
1051 ,gsettings-desktop-schemas)))
1052 (inputs `(("appstream-glib" ,appstream-glib)
1053 ("bubblewrap" ,bubblewrap)
1055 ("gdk-pixbuf" ,gdk-pixbuf)
1057 ("json-glib" ,json-glib)
1058 ("libarchive" ,libarchive)
1059 ("libostree" ,libostree)
1060 ("libseccomp" ,libseccomp)
1061 ("libsoup" ,libsoup)
1063 ("libxml2" ,libxml2)
1065 ("util-linux" ,util-linux)))
1066 (home-page "https://flatpak.org")
1067 (synopsis "System for building, distributing, and running sandboxed desktop
1069 (description "Flatpak is a system for building, distributing, and running
1070 sandboxed desktop applications on GNU/Linux.")
1071 (license license:lgpl2.1+)))