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 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
9 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
10 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
11 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
12 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages package-management)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages acl)
32 #:use-module (gnu packages attr)
33 #:use-module (gnu packages avahi)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages backup)
36 #:use-module (gnu packages bdw-gc)
37 #:use-module (gnu packages bison)
38 #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
39 #:use-module (gnu packages check)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages cpio)
42 #:use-module (gnu packages crypto)
43 #:use-module (gnu packages curl)
44 #:use-module (gnu packages dbm)
45 #:use-module (gnu packages docbook)
46 #:use-module (gnu packages emacs-xyz)
47 #:use-module (gnu packages file)
48 #:use-module (gnu packages gettext)
49 #:use-module (gnu packages glib)
50 #:use-module (gnu packages gnome)
51 #:use-module (gnu packages gnupg)
52 #:use-module (gnu packages gnuzilla)
53 #:use-module (gnu packages graphviz)
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages guile)
56 #:use-module (gnu packages linux)
57 #:use-module (gnu packages lisp)
58 #:use-module (gnu packages man)
59 #:use-module (gnu packages nettle)
60 #:use-module (gnu packages patchutils)
61 #:use-module (gnu packages perl)
62 #:use-module (gnu packages perl-check)
63 #:use-module (gnu packages pkg-config)
64 #:use-module (gnu packages popt)
65 #:use-module (gnu packages python)
66 #:use-module (gnu packages python-web)
67 #:use-module (gnu packages python-xyz)
68 #:use-module (gnu packages serialization)
69 #:use-module (gnu packages sqlite)
70 #:use-module (gnu packages ssh)
71 #:use-module (gnu packages texinfo)
72 #:use-module (gnu packages time)
73 #:use-module (gnu packages tls)
74 #:use-module (gnu packages vim)
75 #:use-module (gnu packages virtualization)
76 #:use-module (gnu packages web)
77 #:use-module (gnu packages xml)
78 #:use-module (gnu packages xorg)
79 #:use-module (guix build-system emacs)
80 #:use-module (guix build-system gnu)
81 #:use-module (guix build-system meson)
82 #:use-module (guix build-system python)
83 #:use-module (guix download)
84 #:use-module (guix gexp)
85 #:use-module (guix git-download)
86 #:use-module ((guix licenses) #:prefix license:)
87 #:use-module (guix packages)
88 #:use-module (guix utils)
89 #:use-module (ice-9 match)
90 #:use-module (srfi srfi-1))
92 (define (boot-guile-uri arch)
93 "Return the URI for the bootstrap Guile tarball for ARCH."
94 (cond ((string=? "armhf" arch)
95 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
97 "/20150101/guile-2.0.11.tar.xz"))
98 ((string=? "aarch64" arch)
99 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
100 arch "-linux/20170217/guile-2.0.14.tar.xz"))
102 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
104 "/20131110/guile-2.0.9.tar.xz"))))
107 ;; Latest version of Guix, which may or may not correspond to a release.
108 ;; Note: the 'update-guix-package.scm' script expects this definition to
109 ;; start precisely like this.
110 (let ((version "0.16.0")
111 (commit "7ba2b27467a39956f10e2e11061d9569e4b7d632")
116 (version (if (zero? revision)
118 (string-append version "-"
119 (number->string revision)
120 "." (string-take commit 7))))
124 (url "https://git.savannah.gnu.org/r/guix.git")
128 "14srgkl0vyr6q7azv76nncp63gngmm71y18ybyj9f6l6s4shbcm4"))
129 (file-name (string-append "guix-" version "-checkout"))))
130 (build-system gnu-build-system)
132 `(#:configure-flags (list
133 "--localstatedir=/var"
135 (string-append "--with-bash-completion-dir="
136 (assoc-ref %outputs "out")
137 "/etc/bash_completion.d")
138 (string-append "--with-libgcrypt-prefix="
139 (assoc-ref %build-inputs
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 GuixSD
145 ;; 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 (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
251 (wrap-program (string-append out "/bin/guix")
252 `("GUILE_LOAD_PATH" ":" prefix (,path))
253 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath)))
256 (native-inputs `(("pkg-config" ,pkg-config)
258 ;; XXX: Keep the development inputs here even though
259 ;; they're unnecessary, just so that 'guix environment
260 ;; guix' always contains them.
261 ("autoconf" ,autoconf-wrapper)
262 ("automake" ,automake)
263 ("gettext" ,gettext-minimal)
265 ("graphviz" ,graphviz)
266 ("help2man" ,help2man)
271 ("zlib" ,zlib) ;for 'guix publish'
274 ("libgcrypt" ,libgcrypt)
278 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
280 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
281 ;; Some of the tests use "unshare" when it is available.
282 ("util-linux" ,util-linux)
283 ,@(if (and (not (%current-target-system))
284 (string=? (%current-system) "x86_64-linux"))
285 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
289 ("guile-gcrypt" ,guile-gcrypt)
290 ("guile-json" ,guile-json)
291 ("guile-sqlite3" ,guile-sqlite3)
292 ("guile-ssh" ,guile-ssh)
293 ("guile-git" ,guile-git)))
295 (home-page "https://www.gnu.org/software/guix/")
296 (synopsis "Functional package manager for installed software packages and versions")
298 "GNU Guix is a functional package manager for the GNU system, and is
299 also a distribution thereof. It includes a virtual machine image. Besides
300 the usual package management features, it also supports transactional
301 upgrades and roll-backs, per-user profiles, and much more. It is based on
302 the Nix package manager.")
303 (license license:gpl3+)
304 (properties '((ftp-server . "alpha.gnu.org"))))))
306 ;; Alias for backward compatibility.
307 (define-public guix-devel guix)
309 (define-public guix-daemon
310 ;; This package is for internal consumption: it allows us to quickly build
311 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
315 (properties `((hidden? . #t)))
318 ;; Use a minimum set of dependencies.
320 (fold alist-delete (package-native-inputs guix)
321 '("po4a" "graphviz" "help2man")))
324 ("guile-git" ,guile-git)
325 ("guile-json" ,guile-json)
326 ("guile-gcrypt" ,guile-gcrypt)
327 ,@(fold alist-delete (package-inputs guix)
328 '("boot-guile" "boot-guile/i686" "util-linux"))))
330 (propagated-inputs '())
333 (substitute-keyword-arguments (package-arguments guix)
334 ((#:configure-flags flags '())
335 ;; Pretend we have those libraries; we don't actually need them.
337 '("guix_cv_have_recent_guile_sqlite3=yes"
338 "guix_cv_have_recent_guile_ssh=yes")))
341 ((#:phases phases '%standard-phases)
342 `(modify-phases ,phases
345 (invoke "make" "nix/libstore/schema.sql.hh")
346 (invoke "make" "-j" (number->string
347 (parallel-job-count))
349 (delete 'copy-bootstrap-guile)
351 (lambda* (#:key outputs #:allow-other-keys)
352 (invoke "make" "install-binPROGRAMS"
353 "install-nodist_pkglibexecSCRIPTS")
355 ;; We need to tell 'guix-daemon' which 'guix' command to use.
356 ;; Here we use a questionable hack where we hard-code root's
357 ;; current guix, which could be wrong (XXX). Note that scripts
358 ;; like 'guix perform-download' do not run as root so we assume
359 ;; that they have access to /var/guix/profiles/per-user/root.
360 (let ((out (assoc-ref outputs "out")))
361 (substitute* (find-files (string-append out "/libexec"))
362 (("exec \".*/bin/guix\"")
363 "exec /var/guix/profiles/per-user/root/current-guix/bin/guix"))
365 (delete 'wrap-program)))))))
367 (define-public guile2.0-guix
368 (deprecated-package "guile2.0-guix" guix))
370 (define-public guix-minimal
371 ;; A version of Guix which is built with the minimal set of dependencies, as
372 ;; outlined in the README "Requirements" section. Intended as a CI job, so
377 (name "guix-minimal")
379 `(("guile" ,guile-2.2)
380 ,@(alist-delete "guile" (package-inputs guix))))
383 (package-propagated-inputs guix)
386 (define (source-file? file stat)
387 "Return true if FILE is likely a source file, false if it is a typical
389 (define (wrong-extension? file)
390 (or (string-suffix? "~" file)
391 (member (file-extension file)
392 '("o" "a" "lo" "so" "go"))))
394 (match (basename file)
395 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
397 ((? wrong-extension?)
402 (define-public current-guix-package
403 ;; This parameter allows callers to override the package that 'current-guix'
404 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
405 ;; for instance because it's not running from a source code checkout.
408 (define-public current-guix
409 (let* ((repository-root (canonicalize-path
410 (string-append (current-source-directory)
412 (select? (delay (or (git-predicate repository-root)
415 "Return a package representing Guix built from the current source tree.
416 This works by adding the current source tree to the store (after filtering it
417 out) and returning a package that uses that as its 'source'."
418 (or (current-guix-package)
421 (version (string-append (package-version guix) "+"))
422 (source (local-file repository-root "guix-current"
424 #:select? (force select?))))))))
437 (uri (string-append "http://nixos.org/releases/nix/nix-"
438 version "/nix-" version ".tar.xz"))
441 "0ss9svxlh1pvrdmnqjvjyqjmbqmrdbyfarvbb14i9d4bggzl0r8n"))))
442 (build-system gnu-build-system)
443 (native-inputs `(("pkg-config" ,pkg-config)))
444 (inputs `(("curl" ,curl)
447 ("libseccomp" ,libseccomp)
448 ("libsodium" ,libsodium)
452 (home-page "https://nixos.org/nix/")
453 (synopsis "The Nix package manager")
455 "Nix is a purely functional package manager. This means that it treats
456 packages like values in purely functional programming languages such as
457 Haskell—they are built by functions that don't have side-effects, and they
458 never change after they have been built. Nix stores packages in the Nix
459 store, usually the directory /nix/store, where each package has its own unique
461 (license license:lgpl2.1+)))
463 (define-public emacs-nix-mode
465 (name "emacs-nix-mode")
470 (uri (string-append "https://github.com/NixOS/nix-mode/archive/v"
472 (file-name (string-append name "-" version ".tar.gz"))
475 "06aqz0czznsj8835jqnk794sy2p6pa8kxfqwh0nl5d5vxivria6z"))))
476 (build-system emacs-build-system)
478 `(("emacs-company" ,emacs-company)
479 ("emacs-mmm-mode" ,emacs-mmm-mode)))
480 (home-page "https://github.com/NixOS/nix-mode")
481 (synopsis "Emacs major mode for editing Nix expressions")
482 (description "@code{nixos-mode} provides an Emacs major mode for editing
483 Nix expressions. It supports syntax highlighting, indenting and refilling of
485 (license license:lgpl2.1+)))
493 (uri (string-append "mirror://gnu/stow/stow-"
497 "1pvky9fayms4r6fhns8jd0vavszd7d979w62vfd5n88v614pdxz2"))))
498 (build-system gnu-build-system)
502 `(("perl-test-simple" ,perl-test-simple)
503 ("perl-test-output" ,perl-test-output)
504 ("perl-capture-tiny" ,perl-capture-tiny)
505 ("perl-io-stringy" ,perl-io-stringy)))
506 (home-page "https://www.gnu.org/software/stow/")
507 (synopsis "Managing installed software packages")
509 "GNU Stow is a symlink manager. It generates symlinks to directories
510 of data and makes them appear to be merged into the same directory. It is
511 typically used for managing software packages installed from source, by
512 letting you install them apart in distinct directories and then create
513 symlinks to the files in a common directory such as /usr/local.")
514 (license license:gpl2+)))
522 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
523 (version-major+minor version) ".x/rpm-"
527 "0armd7dqr8bl0isx8l4xlylm7dikasmxhhcbz336fkp2x30w5jw0"))))
528 (build-system gnu-build-system)
530 '(#:configure-flags '("--with-external-db" ;use the system's bdb
533 #:phases (modify-phases %standard-phases
534 (add-before 'configure 'set-nss-library-path
535 (lambda* (#:key inputs #:allow-other-keys)
536 (let ((nss (assoc-ref inputs "nss")))
537 (setenv "LIBRARY_PATH"
538 (string-append (getenv "LIBRARY_PATH") ":"
542 `(("pkg-config" ,pkg-config)))
544 `(("python" ,python-2)
550 ("libarchive" ,libarchive)
551 ("nettle" ,nettle) ;XXX: actually a dependency of libarchive
556 (home-page "http://rpm.org/")
557 (synopsis "The RPM Package Manager")
559 "The RPM Package Manager (RPM) is a command-line driven package
560 management system capable of installing, uninstalling, verifying, querying,
561 and updating computer software packages. Each software package consists of an
562 archive of files along with information about the package like its version, a
563 description. There is also a library permitting developers to manage such
564 transactions from C or Python.")
566 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
567 (license license:gpl2+)))
569 (define-public diffoscope
575 (uri (pypi-uri name version))
578 "0qrfp7nha2n2s9h5ibcf7rqji1amh4cqbcf80m6anim6p3ik26da"))))
579 (build-system python-build-system)
581 `(#:phases (modify-phases %standard-phases
582 ;; setup.py mistakenly requires python-magic from PyPi, even
583 ;; though the Python bindings of `file` are sufficient.
584 ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844
585 (add-after 'unpack 'dependency-on-python-magic
587 (substitute* "setup.py"
588 (("'python-magic',") ""))))
589 ;; This test is broken because our `file` package has a
590 ;; bug in berkeley-db file type detection.
591 (add-after 'unpack 'remove-berkeley-test
593 (delete-file "tests/comparators/test_berkeley_db.py")
595 (add-after 'unpack 'embed-tool-references
596 (lambda* (#:key inputs #:allow-other-keys)
597 (substitute* "diffoscope/comparators/utils/compare.py"
599 (string-append "['" (which "xxd") "',")))
600 (substitute* "diffoscope/comparators/elf.py"
601 (("@tool_required\\('readelf'\\)") "")
602 (("get_tool_name\\('readelf'\\)")
603 (string-append "'" (which "readelf") "'")))
604 (substitute* "diffoscope/comparators/directory.py"
605 (("@tool_required\\('stat'\\)") "")
606 (("@tool_required\\('getfacl'\\)") "")
608 (string-append "['" (which "stat") "',"))
610 (string-append "['" (which "getfacl") "',")))
612 (add-before 'check 'delete-failing-test
614 (delete-file "tests/test_tools.py") ;this requires /sbin to be on the path
616 (inputs `(("rpm" ,rpm) ;for rpm-python
617 ("python-file" ,python-file)
618 ("python-debian" ,python-debian)
619 ("python-libarchive-c" ,python-libarchive-c)
620 ("python-tlsh" ,python-tlsh)
621 ("acl" ,acl) ;for getfacl
622 ("colordiff" ,colordiff)
625 ;; Below are modules used for tests.
626 ("python-pytest" ,python-pytest)
627 ("python-chardet" ,python-chardet)))
628 (home-page "https://diffoscope.org/")
629 (synopsis "Compare files, archives, and directories in depth")
631 "Diffoscope tries to get to the bottom of what makes files or directories
632 different. It recursively unpacks archives of many kinds and transforms
633 various binary formats into more human readable forms to compare them. It can
634 compare two tarballs, ISO images, or PDFs just as easily.")
635 (license license:gpl3+)))
637 (define-public python-anaconda-client
639 (name "python-anaconda-client")
644 (uri (string-append "https://github.com/Anaconda-Platform/"
645 "anaconda-client/archive/" version ".tar.gz"))
646 (file-name (string-append name "-" version ".tar.gz"))
649 "1wv4wi6k5jz7rlwfgvgfdizv77x3cr1wa2aj0k1595g7fbhkjhz2"))))
650 (build-system python-build-system)
652 `(("python-pyyaml" ,python-pyyaml)
653 ("python-requests" ,python-requests)
654 ("python-clyent" ,python-clyent)))
656 `(("python-pytz" ,python-pytz)
657 ("python-dateutil" ,python-dateutil)
658 ("python-mock" ,python-mock)
659 ("python-coverage" ,python-coverage)
660 ("python-pillow" ,python-pillow)))
663 (modify-phases %standard-phases
664 ;; This is needed for some tests.
665 (add-before 'check 'set-up-home
666 (lambda* _ (setenv "HOME" "/tmp") #t))
667 (add-before 'check 'remove-network-tests
669 ;; Remove tests requiring a network connection
670 (let ((network-tests '("tests/test_upload.py"
671 "tests/test_authorizations.py"
672 "tests/test_login.py"
673 "tests/test_whoami.py"
674 "utils/notebook/tests/test_data_uri.py"
675 "utils/notebook/tests/test_base.py"
676 "utils/notebook/tests/test_downloader.py"
677 "inspect_package/tests/test_conda.py")))
678 (with-directory-excursion "binstar_client"
679 (for-each delete-file network-tests)))
681 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
682 (synopsis "Anaconda Cloud command line client library")
684 "Anaconda Cloud command line client library provides an interface to
685 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
687 (license license:bsd-3)))
689 (define-public python2-anaconda-client
690 (package-with-python2 python-anaconda-client))
692 (define-public python-conda
694 (name "python-conda")
699 (uri (string-append "https://github.com/conda/conda/archive/"
701 (file-name (string-append name "-" version ".tar.gz"))
704 "1jq8hyrc5npb5sf4vw6s6by4602yj8f79vzpbwdfgpkn02nfk1dv"))))
705 (build-system python-build-system)
708 (modify-phases %standard-phases
709 (add-before 'build 'create-version-file
711 (with-output-to-file "conda/.version"
712 (lambda () (display ,version)))
714 (add-before 'check 'remove-failing-tests
716 ;; These tests require internet/network access
717 (let ((network-tests '("test_cli.py"
725 "conda_env/test_cli.py"
726 "conda_env/test_create.py"
727 "conda_env/specs/test_notebook.py"
728 "conda_env/utils/test_notebooks.py"
730 "core/test_repodata.py")))
731 (with-directory-excursion "tests"
732 (for-each delete-file network-tests)
734 ;; FIXME: This test creates a file, then deletes it and tests
735 ;; that the file was deleted. For some reason it fails when
736 ;; building with guix, but does not when you run it in the
737 ;; directory left when you build with the --keep-failed
739 (delete-file "gateways/disk/test_delete.py")
743 (setenv "HOME" "/tmp")
744 (invoke "py.test"))))))
746 `(("python-cytoolz" ,python-cytoolz)
747 ("python-ruamel.yaml" ,python-ruamel.yaml)
748 ("python-requests" ,python-requests)
749 ("python-pycosat" ,python-pycosat)
750 ("python-pytest" ,python-pytest)
751 ("python-responses" ,python-responses)
752 ("python-pyyaml" ,python-pyyaml)
753 ("python-anaconda-client" ,python-anaconda-client)))
754 (home-page "https://github.com/conda/conda")
755 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
757 "Conda is a cross-platform, Python-agnostic binary package manager. It
758 is the package manager used by Anaconda installations, but it may be used for
759 other systems as well. Conda makes environments first-class citizens, making
760 it easy to create independent environments even for C libraries. Conda is
761 written entirely in Python.
763 This package provides Conda as a library.")
764 (license license:bsd-3)))
766 (define-public python2-conda
767 (let ((base (package-with-python2
768 (strip-python2-variant python-conda))))
769 (package (inherit base)
771 `(("python2-enum34" ,python2-enum34)
772 ,@(package-native-inputs base))))))
775 (package (inherit python-conda)
778 (substitute-keyword-arguments (package-arguments python-conda)
780 `(modify-phases ,phases
782 (lambda* (#:key outputs #:allow-other-keys)
783 ;; This test fails when run before installation.
784 (delete-file "tests/test_activate.py")
786 ;; Fix broken defaults
787 (substitute* "conda/base/context.py"
788 (("return sys.prefix")
789 (string-append "return \"" (assoc-ref outputs "out") "\""))
790 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
791 (string-append "return False if self.root_prefix == self.conda_prefix else "
794 ;; The util/setup-testing.py is used to build conda in
795 ;; application form, rather than the default, library form.
796 ;; With this, we are able to run commands like `conda --help`
797 ;; directly on the command line
798 (invoke "python" "utils/setup-testing.py" "build_py")))
800 (lambda* (#:key inputs outputs #:allow-other-keys)
801 (let* ((out (assoc-ref outputs "out"))
802 (target (string-append out "/lib/python"
803 ((@@ (guix build python-build-system)
805 (assoc-ref inputs "python"))
807 ;; The installer aborts if the target directory is not on
810 (string-append target ":" (getenv "PYTHONPATH")))
812 ;; And it aborts if the directory doesn't exist.
814 (invoke "python" "utils/setup-testing.py" "install"
815 (string-append "--prefix=" out)))))
816 ;; The "activate" and "deactivate" scripts don't need wrapping.
817 ;; They also break when they are renamed.
818 (add-after 'wrap 'undo-wrap
819 (lambda* (#:key outputs #:allow-other-keys)
820 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
821 (delete-file "deactivate")
822 (rename-file ".deactivate-real" "deactivate")
823 (delete-file "activate")
824 (rename-file ".activate-real" "activate")
827 "Conda is a cross-platform, Python-agnostic binary package manager. It
828 is the package manager used by Anaconda installations, but it may be used for
829 other systems as well. Conda makes environments first-class citizens, making
830 it easy to create independent environments even for C libraries. Conda is
831 written entirely in Python.")))
839 (uri (string-append "https://www.guixwl.org/releases/gwl-"
843 "06pm967mq1wyggx7l0nfapw5s0k5qc5r9lawk2v3db868br779a7"))))
844 (build-system gnu-build-system)
846 `(("autoconf" ,autoconf)
847 ("automake" ,automake)
848 ("pkg-config" ,pkg-config)))
850 `(("guile" ,guile-2.2)))
853 ("guile-commonmark" ,guile-commonmark)))
854 (home-page "https://www.guixwl.org")
855 (synopsis "Workflow management extension for GNU Guix")
856 (description "This project provides two subcommands to GNU Guix and
857 introduces two record types that provide a workflow management extension built
858 on top of GNU Guix.")
859 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
860 ;; the web interface modules in gwl/ are licensed AGPL3+,
861 ;; and the fonts included in this package are licensed OFL1.1.
862 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
870 (uri (string-append "mirror://gnome/sources/" name "/"
871 version "/" name "-" version ".tar.xz"))
874 "0l19sr6pg0cfcddmi5n79d08mjjbhn427ip5jlsy9zddq9r24aqr"))
875 ;; gcab 1.1 has a hard dependency on git — even when building
876 ;; from a tarball. Remove it early so ‘guix environment gcab’
877 ;; can actually build what ‘guix build --source gcab’ returns.
878 (modules '((guix build utils)))
881 (substitute* "meson.build"
882 (("git_version = .*$") "git_version = []\n"))
884 (build-system meson-build-system)
886 `(("glib:bin" ,glib "bin") ; for glib-mkenums
887 ("intltool" ,intltool)
888 ("pkg-config" ,pkg-config)
895 ;; XXX This ‘documentation’ is for developers, and fails informatively:
896 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
898 "-Dintrospection=false")))
899 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
900 (synopsis "Microsoft Cabinet file manipulation library")
902 "The libgcab library provides GObject functions to read, write, and modify
903 Microsoft cabinet (.@dfn{CAB}) files.")
904 (license (list license:gpl2+ ; tests/testsuite.at
905 license:lgpl2.1+)))) ; the rest
907 (define-public msitools
913 (uri (string-append "mirror://gnome/sources/" name "/"
914 version "/" name "-" version ".tar.xz"))
917 "19wb3n3nwkpc6bjr0q3f1znaxsfaqgjbdxxnbx8ic8bb5b49hwac"))))
918 (build-system gnu-build-system)
920 `(("pkg-config" ,pkg-config)))
926 ("uuid" ,util-linux)))
927 (home-page "https://wiki.gnome.org/msitools")
928 (synopsis "Windows Installer file manipulation tool")
930 "msitools is a collection of command-line tools to inspect, extract, build,
931 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
932 for packaging and deployment of cross-compiled Windows applications.")
933 (license license:lgpl2.1+)))
935 (define-public libostree
942 "https://github.com/ostreedev/ostree/releases/download/v"
943 (version-major+minor version) "/libostree-" version ".tar.xz"))
946 "01mygpkbl9sk2vr3hjbpih6qlg8lwx0q5lklm09f7jfwfpnwyqzj"))))
947 (build-system gnu-build-system)
950 (modify-phases %standard-phases
951 (add-before 'check 'pre-check
953 ;; Don't try to use the non-existing '/var/tmp' as test
955 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
958 ;; tap-driver.sh: internal error getting exit status
959 ;; tap-driver.sh: fatal: I/O or internal error
962 `(("attr" ,attr) ; for tests
964 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
965 ("gobject-introspection" ,gobject-introspection)
966 ("pkg-config" ,pkg-config)
967 ("xsltproc" ,libxslt)))
970 ("docbook-xml" ,docbook-xml-4.2)
971 ("docbook-xsl" ,docbook-xsl)
972 ("e2fsprogs" ,e2fsprogs)
976 ("libarchive" ,libarchive)
978 ("nettle" ,nettle) ; required by 'libarchive.la'
979 ("util-linux" ,util-linux)))
980 (home-page "https://ostree.readthedocs.io/en/latest/")
981 (synopsis "Operating system and container binary deployment and upgrades")
983 "@code{libostree} is both a shared library and suite of command line
984 tools that combines a \"git-like\" model for committing and downloading
985 bootable filesystem trees, along with a layer for deploying them and managing
986 the bootloader configuration.")
987 (license license:lgpl2.0+)))
989 (define-public flatpak
996 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
997 version "/flatpak-" version ".tar.xz"))
1000 "0bkjwh49kajyd78vdh0g9arb352a7rccaifas9zxa78phhja2v2p"))))
1001 (build-system gnu-build-system)
1003 '(#:tests? #f ;; Tests fail due to trying to create files where it can't.
1004 #:configure-flags (list
1005 "--enable-documentation=no" ;; FIXME
1006 "--enable-system-helper=no"
1007 "--localstatedir=/var"
1008 (string-append "--with-system-bubblewrap="
1009 (assoc-ref %build-inputs "bubblewrap")
1011 (native-inputs `(("bison" ,bison)
1012 ("gettext" ,gnu-gettext)
1013 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
1014 ("gobject-introspection" ,gobject-introspection)
1016 ("pkg-config" ,pkg-config)))
1017 (inputs `(("appstream-glib" ,appstream-glib)
1018 ("bubblewrap" ,bubblewrap)
1019 ("gdk-pixbuf" ,gdk-pixbuf)
1021 ("json-glib" ,json-glib)
1022 ("libarchive" ,libarchive)
1023 ("libostree" ,libostree)
1024 ("libseccomp" ,libseccomp)
1025 ("libsoup" ,libsoup)
1027 ("libxml2" ,libxml2)
1029 ("util-linux" ,util-linux)))
1030 (home-page "https://flatpak.org")
1031 (synopsis "System for building, distributing, and running sandboxed desktop
1033 (description "Flatpak is a system for building, distributing, and running
1034 sandboxed desktop applications on GNU/Linux.")
1035 (license license:lgpl2.1+)))