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 nss)
62 #:use-module (gnu packages patchutils)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages perl-check)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages popt)
67 #:use-module (gnu packages python)
68 #:use-module (gnu packages python-web)
69 #:use-module (gnu packages python-xyz)
70 #:use-module (gnu packages serialization)
71 #:use-module (gnu packages sqlite)
72 #:use-module (gnu packages ssh)
73 #:use-module (gnu packages texinfo)
74 #:use-module (gnu packages time)
75 #:use-module (gnu packages tls)
76 #:use-module (gnu packages vim)
77 #:use-module (gnu packages virtualization)
78 #:use-module (gnu packages web)
79 #:use-module (gnu packages xml)
80 #:use-module (gnu packages xorg)
81 #:use-module (guix build-system glib-or-gtk)
82 #:use-module (guix build-system gnu)
83 #:use-module (guix build-system meson)
84 #:use-module (guix build-system python)
85 #:use-module (guix download)
86 #:use-module (guix gexp)
87 #:use-module (guix git-download)
88 #:use-module ((guix licenses) #:prefix license:)
89 #:use-module (guix packages)
90 #:use-module (guix utils)
91 #:use-module (ice-9 match)
92 #:use-module (srfi srfi-1))
94 (define (boot-guile-uri arch)
95 "Return the URI for the bootstrap Guile tarball for ARCH."
96 (cond ((string=? "armhf" arch)
97 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
99 "/20150101/guile-2.0.11.tar.xz"))
100 ((string=? "aarch64" arch)
101 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
102 arch "-linux/20170217/guile-2.0.14.tar.xz"))
104 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
106 "/20131110/guile-2.0.9.tar.xz"))))
109 ;; Latest version of Guix, which may or may not correspond to a release.
110 ;; Note: the 'update-guix-package.scm' script expects this definition to
111 ;; start precisely like this.
112 (let ((version "1.0.1")
113 (commit "c902458863d1d341ffd74970b75e69c2bb848183")
118 (version (if (zero? revision)
120 (string-append version "-"
121 (number->string revision)
122 "." (string-take commit 7))))
126 (url "https://git.savannah.gnu.org/r/guix.git")
130 "0w93qjgy9n0qqyij12s7hm7fl4wb6h99bmfril4cqf4ynckpdvbb"))
131 (file-name (string-append "guix-" version "-checkout"))))
132 (build-system gnu-build-system)
134 `(#:configure-flags (list
135 "--localstatedir=/var"
137 (string-append "--with-bash-completion-dir="
138 (assoc-ref %outputs "out")
139 "/etc/bash_completion.d")
141 ;; Set 'DOT_USER_PROGRAM' to the empty string so
142 ;; we don't keep a reference to Graphviz, whose
143 ;; closure is pretty big (too big for the Guix
144 ;; system installation image.)
145 "ac_cv_path_DOT_USER_PROGRAM=dot"
147 ;; To avoid problems with the length of shebangs,
148 ;; choose a fixed-width and short directory name
150 "ac_cv_guix_test_root=/tmp/guix-tests")
151 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
153 #:modules ((guix build gnu-build-system)
159 #:phases (modify-phases %standard-phases
162 ;; Make sure 'msgmerge' can modify the PO files.
163 (for-each (lambda (po)
165 (find-files "." "\\.po$"))
167 (patch-shebang "build-aux/git-version-gen")
169 (call-with-output-file ".tarball-version"
171 (display ,version port)))
173 (invoke "sh" "bootstrap")))
174 (add-before 'check 'copy-bootstrap-guile
175 (lambda* (#:key system inputs #:allow-other-keys)
176 ;; Copy the bootstrap guile tarball in the store used
177 ;; by the test suite.
178 (define (intern tarball)
179 (let ((base (strip-store-file-name tarball)))
180 (copy-file tarball base)
181 (invoke "./test-env" "guix" "download"
182 (string-append "file://" (getcwd)
187 (intern (assoc-ref inputs "boot-guile"))
189 ;; On x86_64 some tests need the i686 Guile.
190 ,@(if (and (not (%current-target-system))
191 (string=? (%current-system)
193 '((intern (assoc-ref inputs "boot-guile/i686")))
196 (add-after 'unpack 'disable-failing-tests
197 ;; XXX FIXME: These tests fail within the build container.
199 (substitute* "tests/syscalls.scm"
200 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
201 (string-append "(test-skip 1)\n" all)))
202 (substitute* "tests/containers.scm"
203 (("^\\(test-(assert|equal)" all)
204 (string-append "(test-skip 1)\n" all)))
205 (when (file-exists? "tests/guix-environment-container.sh")
206 (substitute* "tests/guix-environment-container.sh"
207 (("guix environment --version")
210 (add-before 'check 'set-SHELL
212 ;; 'guix environment' tests rely on 'SHELL' having a
213 ;; correct value, so set it.
214 (setenv "SHELL" (which "sh"))
216 (add-after 'install 'wrap-program
217 (lambda* (#:key inputs outputs #:allow-other-keys)
218 ;; Make sure the 'guix' command finds GnuTLS,
219 ;; Guile-JSON, and Guile-Git automatically.
220 (let* ((out (assoc-ref outputs "out"))
221 (guile (assoc-ref inputs "guile"))
222 (gcrypt (assoc-ref inputs "guile-gcrypt"))
223 (json (assoc-ref inputs "guile-json"))
224 (sqlite (assoc-ref inputs "guile-sqlite3"))
225 (git (assoc-ref inputs "guile-git"))
226 (bs (assoc-ref inputs
227 "guile-bytestructures"))
228 (ssh (assoc-ref inputs "guile-ssh"))
229 (gnutls (assoc-ref inputs "gnutls"))
230 (locales (assoc-ref inputs "glibc-utf8-locales"))
231 (deps (list gcrypt json sqlite gnutls
235 (open-pipe* OPEN_READ
236 (string-append guile "/bin/guile")
237 "-c" "(display (effective-version))")))
239 (map (cut string-append <>
245 (map (cut string-append <>
246 "/lib/guile/" effective
250 (locpath (string-append locales "/lib/locale")))
252 (wrap-program (string-append out "/bin/guix")
253 `("GUILE_LOAD_PATH" ":" prefix (,path))
254 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
255 `("GUIX_LOCPATH" ":" suffix (,locpath)))
258 (native-inputs `(("pkg-config" ,pkg-config)
260 ;; XXX: Keep the development inputs here even though
261 ;; they're unnecessary, just so that 'guix environment
262 ;; guix' always contains them.
263 ("autoconf" ,autoconf-wrapper)
264 ("automake" ,automake)
265 ("gettext" ,gettext-minimal)
267 ("graphviz" ,graphviz)
268 ("help2man" ,help2man)
273 ("zlib" ,zlib) ;for 'guix publish'
274 ("lzlib" ,lzlib) ;for 'guix publish' and 'guix substitute'
277 ("libgcrypt" ,libgcrypt)
281 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
283 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
284 ;; Some of the tests use "unshare" when it is available.
285 ("util-linux" ,util-linux)
286 ,@(if (and (not (%current-target-system))
287 (string=? (%current-system) "x86_64-linux"))
288 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
291 ("glibc-utf8-locales" ,glibc-utf8-locales)))
294 ("guile-gcrypt" ,guile-gcrypt)
295 ("guile-json" ,guile-json-3)
296 ("guile-sqlite3" ,guile-sqlite3)
297 ("guile-ssh" ,guile-ssh)
298 ("guile-git" ,guile-git)))
300 (home-page "https://www.gnu.org/software/guix/")
301 (synopsis "Functional package manager for installed software packages and versions")
303 "GNU Guix is a functional package manager for the GNU system, and is
304 also a distribution thereof. It includes a virtual machine image. Besides
305 the usual package management features, it also supports transactional
306 upgrades and roll-backs, per-user profiles, and much more. It is based on
307 the Nix package manager.")
308 (license license:gpl3+)
309 (properties '((ftp-server . "alpha.gnu.org"))))))
311 (define-public guix-daemon
312 ;; This package is for internal consumption: it allows us to quickly build
313 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
317 (properties `((hidden? . #t)))
320 ;; Use a minimum set of dependencies.
322 (fold alist-delete (package-native-inputs guix)
323 '("po4a" "graphviz" "help2man")))
326 ("guile-git" ,guile-git)
327 ("guile-json" ,guile-json-3)
328 ("guile-gcrypt" ,guile-gcrypt)
329 ,@(fold alist-delete (package-inputs guix)
330 '("boot-guile" "boot-guile/i686" "util-linux"))))
332 (propagated-inputs '())
335 (substitute-keyword-arguments (package-arguments guix)
336 ((#:configure-flags flags '())
337 ;; Pretend we have those libraries; we don't actually need them.
339 '("guix_cv_have_recent_guile_sqlite3=yes"
340 "guix_cv_have_recent_guile_ssh=yes")))
343 ((#:phases phases '%standard-phases)
344 `(modify-phases ,phases
347 (invoke "make" "nix/libstore/schema.sql.hh")
348 (invoke "make" "-j" (number->string
349 (parallel-job-count))
351 (delete 'copy-bootstrap-guile)
353 (lambda* (#:key outputs #:allow-other-keys)
354 (invoke "make" "install-binPROGRAMS"
355 "install-nodist_pkglibexecSCRIPTS")
357 ;; We need to tell 'guix-daemon' which 'guix' command to use.
358 ;; Here we use a questionable hack where we hard-code root's
359 ;; current guix, which could be wrong (XXX). Note that scripts
360 ;; like 'guix perform-download' do not run as root so we assume
361 ;; that they have access to /var/guix/profiles/per-user/root.
362 (let ((out (assoc-ref outputs "out")))
363 (substitute* (find-files (string-append out "/libexec"))
364 (("exec \".*/bin/guix\"")
365 "exec \"${GUIX:-/var/guix/profiles/per-user/root/current-guix/bin/guix}\""))
367 (delete 'wrap-program)))))))
369 (define-public guile2.0-guix
370 (deprecated-package "guile2.0-guix" guix))
372 (define-public guix-minimal
373 ;; A version of Guix which is built with the minimal set of dependencies, as
374 ;; outlined in the README "Requirements" section. Intended as a CI job, so
379 (name "guix-minimal")
381 `(("guile" ,guile-2.2)
382 ,@(alist-delete "guile" (package-inputs guix))))
385 (package-propagated-inputs guix)
388 (define (source-file? file stat)
389 "Return true if FILE is likely a source file, false if it is a typical
391 (define (wrong-extension? file)
392 (or (string-suffix? "~" file)
393 (member (file-extension file)
394 '("o" "a" "lo" "so" "go"))))
396 (match (basename file)
397 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
399 ((? wrong-extension?)
404 (define-public current-guix-package
405 ;; This parameter allows callers to override the package that 'current-guix'
406 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
407 ;; for instance because it's not running from a source code checkout.
410 (define-public current-guix
411 (let* ((repository-root (delay (canonicalize-path
412 (string-append (current-source-directory)
414 (select? (delay (or (git-predicate (force repository-root))
417 "Return a package representing Guix built from the current source tree.
418 This works by adding the current source tree to the store (after filtering it
419 out) and returning a package that uses that as its 'source'."
420 (or (current-guix-package)
423 (version (string-append (package-version guix) "+"))
424 (source (local-file (force repository-root) "guix-current"
426 #:select? (force select?))))))))
439 (uri (string-append "http://nixos.org/releases/nix/nix-"
440 version "/nix-" version ".tar.xz"))
443 "0ss9svxlh1pvrdmnqjvjyqjmbqmrdbyfarvbb14i9d4bggzl0r8n"))))
444 (build-system gnu-build-system)
445 (native-inputs `(("pkg-config" ,pkg-config)))
446 (inputs `(("curl" ,curl)
449 ("libseccomp" ,libseccomp)
450 ("libsodium" ,libsodium)
454 (home-page "https://nixos.org/nix/")
455 (synopsis "The Nix package manager")
457 "Nix is a purely functional package manager. This means that it treats
458 packages like values in purely functional programming languages such as
459 Haskell—they are built by functions that don't have side-effects, and they
460 never change after they have been built. Nix stores packages in the Nix
461 store, usually the directory /nix/store, where each package has its own unique
463 (license license:lgpl2.1+)))
471 (uri (string-append "mirror://gnu/stow/stow-"
475 "0jrxy12ywn7smdzdnvwzjw77l6knx6jkj2rckgykg1dpf6bdkm89"))))
476 (build-system gnu-build-system)
480 `(("perl-test-simple" ,perl-test-simple)
481 ("perl-test-output" ,perl-test-output)
482 ("perl-capture-tiny" ,perl-capture-tiny)
483 ("perl-io-stringy" ,perl-io-stringy)))
484 (home-page "https://www.gnu.org/software/stow/")
485 (synopsis "Managing installed software packages")
487 "GNU Stow is a symlink manager. It generates symlinks to directories
488 of data and makes them appear to be merged into the same directory. It is
489 typically used for managing software packages installed from source, by
490 letting you install them apart in distinct directories and then create
491 symlinks to the files in a common directory such as /usr/local.")
492 (license license:gpl3+)))
500 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
501 (version-major+minor version) ".x/rpm-"
505 "1nmck2fq9h85fgs3zhh6w1avlw5y16cbz5khd459ry3jfd5w4f8i"))))
506 (build-system gnu-build-system)
508 '(#:configure-flags '("--with-external-db" ;use the system's bdb
511 #:phases (modify-phases %standard-phases
512 (add-before 'configure 'set-nss-library-path
513 (lambda* (#:key inputs #:allow-other-keys)
514 (let ((nss (assoc-ref inputs "nss")))
515 (setenv "LIBRARY_PATH"
516 (string-append (getenv "LIBRARY_PATH") ":"
520 `(("pkg-config" ,pkg-config)))
528 ("libarchive" ,libarchive)
533 (home-page "https://rpm.org/")
534 (synopsis "The RPM Package Manager")
536 "The RPM Package Manager (RPM) is a command-line driven package
537 management system capable of installing, uninstalling, verifying, querying,
538 and updating computer software packages. Each software package consists of an
539 archive of files along with information about the package like its version, a
540 description. There is also a library permitting developers to manage such
541 transactions from C or Python.")
543 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
544 (license license:gpl2+)))
546 (define-public diffoscope
547 (let ((version "121"))
554 (url "https://salsa.debian.org/reproducible-builds/diffoscope.git")
556 (file-name (git-file-name name version))
559 "1bw7s8qs1vnr93vhifl6pj6h6w6r6nrpc5anzhh9wx2gcaipkb3m"))))
560 (build-system python-build-system)
562 `(#:phases (modify-phases %standard-phases
563 ;; setup.py mistakenly requires python-magic from PyPi, even
564 ;; though the Python bindings of `file` are sufficient.
565 ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844
566 (add-after 'unpack 'dependency-on-python-magic
568 (substitute* "setup.py"
569 (("'python-magic',") ""))))
570 ;; This test is broken because our `file` package has a
571 ;; bug in berkeley-db file type detection.
572 (add-after 'unpack 'remove-berkeley-test
574 (delete-file "tests/comparators/test_berkeley_db.py")
576 (add-after 'unpack 'embed-tool-references
577 (lambda* (#:key inputs #:allow-other-keys)
578 (substitute* "diffoscope/comparators/utils/compare.py"
580 (string-append "['" (which "xxd") "',")))
581 (substitute* "diffoscope/comparators/elf.py"
582 (("@tool_required\\('readelf'\\)") "")
583 (("get_tool_name\\('readelf'\\)")
584 (string-append "'" (which "readelf") "'")))
585 (substitute* "diffoscope/comparators/directory.py"
586 (("@tool_required\\('stat'\\)") "")
587 (("@tool_required\\('getfacl'\\)") "")
589 (string-append "['" (which "stat") "',"))
591 (string-append "['" (which "getfacl") "',")))
593 (add-before 'check 'writable-test-data
595 ;; tests/comparators/test_elf.py needs write access to
598 "tests/data/ignore_readelf_errors_expected_diff")
600 (add-before 'check 'delete-failing-test
602 ;; this requires /sbin to be on the path
603 (delete-file "tests/test_tools.py")
605 (inputs `(("rpm" ,rpm) ;for rpm-python
606 ("python-file" ,python-file)
607 ("python-debian" ,python-debian)
608 ("python-libarchive-c" ,python-libarchive-c)
609 ("python-tlsh" ,python-tlsh)
610 ("acl" ,acl) ;for getfacl
611 ("colordiff" ,colordiff)
613 ;; Below are modules used for tests.
614 (native-inputs `(("python-pytest" ,python-pytest)
615 ("python-chardet" ,python-chardet)))
616 (home-page "https://diffoscope.org/")
617 (synopsis "Compare files, archives, and directories in depth")
619 "Diffoscope tries to get to the bottom of what makes files or directories
620 different. It recursively unpacks archives of many kinds and transforms
621 various binary formats into more human readable forms to compare them. It can
622 compare two tarballs, ISO images, or PDFs just as easily.")
623 (license license:gpl3+))))
625 (define-public trydiffoscope
627 (name "trydiffoscope")
633 (url "https://salsa.debian.org/reproducible-builds/trydiffoscope.git")
635 (file-name (git-file-name name version))
638 "03b66cjii7l2yiwffj6ym6mycd5drx7prfp4j2550281pias6mjh"))))
641 (modify-phases %standard-phases
642 (add-after 'install 'install-doc
643 (lambda* (#:key outputs #:allow-other-keys)
644 (let* ((share (string-append (assoc-ref outputs "out") "/share/")))
645 (mkdir-p (string-append share "/man/man1/" ))
647 "trydiffoscope.1.rst"
648 (string-append share "/man/man1/trydiffoscope.1"))
649 (mkdir-p (string-append share "/doc/" ,name "-" ,version))
650 (install-file "./README.rst"
651 (string-append share "/doc/" ,name "-" ,version)))
654 `(("python-requests" ,python-requests)))
657 ("python-docutils" ,python-docutils)))
658 (build-system python-build-system)
659 (home-page "https://try.diffoscope.org")
660 (synopsis "Client for remote diffoscope service")
661 (description "This is a client for the @url{https://try.diffoscope.org,
662 remote diffoscope service}.
664 Diffoscope tries to get to the bottom of what makes files or directories
665 different. It recursively unpacks archives of many kinds and transforms
666 various binary formats into more human readable forms to compare them. It can
667 compare two tarballs, ISO images, or PDFs just as easily.
669 Results are displayed by default, stored as local text or html files, or made
670 available via a URL on @url{https://try.diffoscope.org}. Results stored on the
671 server are purged after 30 days.")
672 (license license:gpl3+)))
674 (define-public python-anaconda-client
676 (name "python-anaconda-client")
681 (uri (string-append "https://github.com/Anaconda-Platform/"
682 "anaconda-client/archive/" version ".tar.gz"))
683 (file-name (string-append name "-" version ".tar.gz"))
686 "1wv4wi6k5jz7rlwfgvgfdizv77x3cr1wa2aj0k1595g7fbhkjhz2"))))
687 (build-system python-build-system)
689 `(("python-pyyaml" ,python-pyyaml)
690 ("python-requests" ,python-requests)
691 ("python-clyent" ,python-clyent)))
693 `(("python-pytz" ,python-pytz)
694 ("python-dateutil" ,python-dateutil)
695 ("python-mock" ,python-mock)
696 ("python-coverage" ,python-coverage)
697 ("python-pillow" ,python-pillow)))
700 (modify-phases %standard-phases
701 ;; This is needed for some tests.
702 (add-before 'check 'set-up-home
703 (lambda* _ (setenv "HOME" "/tmp") #t))
704 (add-before 'check 'remove-network-tests
706 ;; Remove tests requiring a network connection
707 (let ((network-tests '("tests/test_upload.py"
708 "tests/test_authorizations.py"
709 "tests/test_login.py"
710 "tests/test_whoami.py"
711 "utils/notebook/tests/test_data_uri.py"
712 "utils/notebook/tests/test_base.py"
713 "utils/notebook/tests/test_downloader.py"
714 "inspect_package/tests/test_conda.py")))
715 (with-directory-excursion "binstar_client"
716 (for-each delete-file network-tests)))
718 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
719 (synopsis "Anaconda Cloud command line client library")
721 "Anaconda Cloud command line client library provides an interface to
722 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
724 (license license:bsd-3)))
726 (define-public python2-anaconda-client
727 (package-with-python2 python-anaconda-client))
729 (define-public python-conda
731 (name "python-conda")
736 (uri (string-append "https://github.com/conda/conda/archive/"
738 (file-name (string-append name "-" version ".tar.gz"))
741 "1jq8hyrc5npb5sf4vw6s6by4602yj8f79vzpbwdfgpkn02nfk1dv"))))
742 (build-system python-build-system)
745 (modify-phases %standard-phases
746 (add-before 'build 'create-version-file
748 (with-output-to-file "conda/.version"
749 (lambda () (display ,version)))
751 (add-before 'check 'remove-failing-tests
753 ;; These tests require internet/network access
754 (let ((network-tests '("test_cli.py"
762 "conda_env/test_cli.py"
763 "conda_env/test_create.py"
764 "conda_env/specs/test_notebook.py"
765 "conda_env/utils/test_notebooks.py"
767 "core/test_repodata.py")))
768 (with-directory-excursion "tests"
769 (for-each delete-file network-tests)
771 ;; FIXME: This test creates a file, then deletes it and tests
772 ;; that the file was deleted. For some reason it fails when
773 ;; building with guix, but does not when you run it in the
774 ;; directory left when you build with the --keep-failed
776 (delete-file "gateways/disk/test_delete.py")
780 (setenv "HOME" "/tmp")
781 (invoke "py.test"))))))
783 `(("python-cytoolz" ,python-cytoolz)
784 ("python-ruamel.yaml" ,python-ruamel.yaml)
785 ("python-requests" ,python-requests)
786 ("python-pycosat" ,python-pycosat)
787 ("python-pytest" ,python-pytest)
788 ("python-responses" ,python-responses)
789 ("python-pyyaml" ,python-pyyaml)
790 ("python-anaconda-client" ,python-anaconda-client)))
791 (home-page "https://github.com/conda/conda")
792 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
794 "Conda is a cross-platform, Python-agnostic binary package manager. It
795 is the package manager used by Anaconda installations, but it may be used for
796 other systems as well. Conda makes environments first-class citizens, making
797 it easy to create independent environments even for C libraries. Conda is
798 written entirely in Python.
800 This package provides Conda as a library.")
801 (license license:bsd-3)))
803 (define-public python2-conda
804 (let ((base (package-with-python2
805 (strip-python2-variant python-conda))))
806 (package (inherit base)
808 `(("python2-enum34" ,python2-enum34)
809 ,@(package-native-inputs base))))))
812 (package (inherit python-conda)
815 (substitute-keyword-arguments (package-arguments python-conda)
817 `(modify-phases ,phases
819 (lambda* (#:key outputs #:allow-other-keys)
820 ;; This test fails when run before installation.
821 (delete-file "tests/test_activate.py")
823 ;; Fix broken defaults
824 (substitute* "conda/base/context.py"
825 (("return sys.prefix")
826 (string-append "return \"" (assoc-ref outputs "out") "\""))
827 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
828 (string-append "return False if self.root_prefix == self.conda_prefix else "
831 ;; The util/setup-testing.py is used to build conda in
832 ;; application form, rather than the default, library form.
833 ;; With this, we are able to run commands like `conda --help`
834 ;; directly on the command line
835 (invoke "python" "utils/setup-testing.py" "build_py")))
837 (lambda* (#:key inputs outputs #:allow-other-keys)
838 (let* ((out (assoc-ref outputs "out"))
839 (target (string-append out "/lib/python"
841 (assoc-ref inputs "python"))
843 ;; The installer aborts if the target directory is not on
846 (string-append target ":" (getenv "PYTHONPATH")))
848 ;; And it aborts if the directory doesn't exist.
850 (invoke "python" "utils/setup-testing.py" "install"
851 (string-append "--prefix=" out)))))
852 ;; The "activate" and "deactivate" scripts don't need wrapping.
853 ;; They also break when they are renamed.
854 (add-after 'wrap 'undo-wrap
855 (lambda* (#:key outputs #:allow-other-keys)
856 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
857 (delete-file "deactivate")
858 (rename-file ".deactivate-real" "deactivate")
859 (delete-file "activate")
860 (rename-file ".activate-real" "activate")
863 "Conda is a cross-platform, Python-agnostic binary package manager. It
864 is the package manager used by Anaconda installations, but it may be used for
865 other systems as well. Conda makes environments first-class citizens, making
866 it easy to create independent environments even for C libraries. Conda is
867 written entirely in Python.")))
875 (uri (string-append "https://www.guixwl.org/releases/gwl-"
879 "06pm967mq1wyggx7l0nfapw5s0k5qc5r9lawk2v3db868br779a7"))))
880 (build-system gnu-build-system)
882 `(("autoconf" ,autoconf)
883 ("automake" ,automake)
884 ("pkg-config" ,pkg-config)))
886 `(("guile" ,guile-2.2)))
889 ("guile-commonmark" ,guile-commonmark)))
890 (home-page "https://www.guixwl.org")
891 (synopsis "Workflow management extension for GNU Guix")
892 (description "This project provides two subcommands to GNU Guix and
893 introduces two record types that provide a workflow management extension built
894 on top of GNU Guix.")
895 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
896 ;; the web interface modules in gwl/ are licensed AGPL3+,
897 ;; and the fonts included in this package are licensed OFL1.1.
898 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
906 (uri (string-append "mirror://gnome/sources/gcab/"
907 version "/gcab-" version ".tar.xz"))
910 "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"))))
911 (build-system meson-build-system)
913 `(("glib:bin" ,glib "bin") ; for glib-mkenums
914 ("intltool" ,intltool)
915 ("pkg-config" ,pkg-config)
922 ;; XXX This ‘documentation’ is for developers, and fails informatively:
923 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
925 "-Dintrospection=false")))
926 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
927 (synopsis "Microsoft Cabinet file manipulation library")
929 "The libgcab library provides GObject functions to read, write, and modify
930 Microsoft cabinet (.@dfn{CAB}) files.")
931 (license (list license:gpl2+ ; tests/testsuite.at
932 license:lgpl2.1+)))) ; the rest
934 (define-public msitools
940 (uri (string-append "mirror://gnome/sources/msitools/"
941 version "/msitools-" version ".tar.xz"))
944 "0d9nidn5zc81bc30w119933rn2g87mrsqyqkndg20srkbsd96xfl"))))
945 (build-system gnu-build-system)
948 ("pkg-config" ,pkg-config)))
954 ("uuid" ,util-linux)))
955 (home-page "https://wiki.gnome.org/msitools")
956 (synopsis "Windows Installer file manipulation tool")
958 "msitools is a collection of command-line tools to inspect, extract, build,
959 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
960 for packaging and deployment of cross-compiled Windows applications.")
961 (license license:lgpl2.1+)))
963 (define-public libostree
970 "https://github.com/ostreedev/ostree/releases/download/v"
971 (version-major+minor version) "/libostree-" version ".tar.xz"))
974 "01mygpkbl9sk2vr3hjbpih6qlg8lwx0q5lklm09f7jfwfpnwyqzj"))))
975 (build-system gnu-build-system)
978 (modify-phases %standard-phases
979 (add-before 'check 'pre-check
981 ;; Don't try to use the non-existing '/var/tmp' as test
983 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
986 ;; tap-driver.sh: internal error getting exit status
987 ;; tap-driver.sh: fatal: I/O or internal error
990 `(("attr" ,attr) ; for tests
992 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
993 ("gobject-introspection" ,gobject-introspection)
994 ("pkg-config" ,pkg-config)
995 ("xsltproc" ,libxslt)))
998 ("docbook-xml" ,docbook-xml-4.2)
999 ("docbook-xsl" ,docbook-xsl)
1000 ("e2fsprogs" ,e2fsprogs)
1004 ("libarchive" ,libarchive)
1005 ("libsoup" ,libsoup)
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 "08nmpp26mgv0vp3mlwk97rnp0j7i108h4hr9nllja19sjxnrlygj"))))
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)
1056 ("gdk-pixbuf" ,gdk-pixbuf)
1058 ("json-glib" ,json-glib)
1059 ("libarchive" ,libarchive)
1060 ("libostree" ,libostree)
1061 ("libseccomp" ,libseccomp)
1062 ("libsoup" ,libsoup)
1064 ("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+)))