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 file)
47 #:use-module (gnu packages gettext)
48 #:use-module (gnu packages glib)
49 #:use-module (gnu packages gnome)
50 #:use-module (gnu packages gnupg)
51 #:use-module (gnu packages gnuzilla)
52 #:use-module (gnu packages graphviz)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages guile)
55 #:use-module (gnu packages linux)
56 #:use-module (gnu packages lisp)
57 #:use-module (gnu packages man)
58 #:use-module (gnu packages nettle)
59 #:use-module (gnu packages patchutils)
60 #:use-module (gnu packages perl)
61 #:use-module (gnu packages perl-check)
62 #:use-module (gnu packages pkg-config)
63 #:use-module (gnu packages popt)
64 #:use-module (gnu packages python)
65 #:use-module (gnu packages python-web)
66 #:use-module (gnu packages python-xyz)
67 #:use-module (gnu packages serialization)
68 #:use-module (gnu packages sqlite)
69 #:use-module (gnu packages ssh)
70 #:use-module (gnu packages texinfo)
71 #:use-module (gnu packages time)
72 #:use-module (gnu packages tls)
73 #:use-module (gnu packages vim)
74 #:use-module (gnu packages virtualization)
75 #:use-module (gnu packages web)
76 #:use-module (gnu packages xml)
77 #:use-module (gnu packages xorg)
78 #:use-module (guix build-system gnu)
79 #:use-module (guix build-system meson)
80 #:use-module (guix build-system python)
81 #:use-module (guix download)
82 #:use-module (guix gexp)
83 #:use-module (guix git-download)
84 #:use-module ((guix licenses) #:prefix license:)
85 #:use-module (guix packages)
86 #:use-module (guix utils)
87 #:use-module (ice-9 match)
88 #:use-module (srfi srfi-1))
90 (define (boot-guile-uri arch)
91 "Return the URI for the bootstrap Guile tarball for ARCH."
92 (cond ((string=? "armhf" arch)
93 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
95 "/20150101/guile-2.0.11.tar.xz"))
96 ((string=? "aarch64" arch)
97 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
98 arch "-linux/20170217/guile-2.0.14.tar.xz"))
100 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
102 "/20131110/guile-2.0.9.tar.xz"))))
105 ;; Latest version of Guix, which may or may not correspond to a release.
106 ;; Note: the 'update-guix-package.scm' script expects this definition to
107 ;; start precisely like this.
108 (let ((version "0.16.0")
109 (commit "7ba2b27467a39956f10e2e11061d9569e4b7d632")
114 (version (if (zero? revision)
116 (string-append version "-"
117 (number->string revision)
118 "." (string-take commit 7))))
122 (url "https://git.savannah.gnu.org/r/guix.git")
126 "14srgkl0vyr6q7azv76nncp63gngmm71y18ybyj9f6l6s4shbcm4"))
127 (file-name (string-append "guix-" version "-checkout"))))
128 (build-system gnu-build-system)
130 `(#:configure-flags (list
131 "--localstatedir=/var"
133 (string-append "--with-bash-completion-dir="
134 (assoc-ref %outputs "out")
135 "/etc/bash_completion.d")
136 (string-append "--with-libgcrypt-prefix="
137 (assoc-ref %build-inputs
140 ;; Set 'DOT_USER_PROGRAM' to the empty string so
141 ;; we don't keep a reference to Graphviz, whose
142 ;; closure is pretty big (too big for the GuixSD
143 ;; installation image.)
144 "ac_cv_path_DOT_USER_PROGRAM=dot"
146 ;; To avoid problems with the length of shebangs,
147 ;; choose a fixed-width and short directory name
149 "ac_cv_guix_test_root=/tmp/guix-tests")
150 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
152 #:modules ((guix build gnu-build-system)
158 #:phases (modify-phases %standard-phases
161 ;; Make sure 'msgmerge' can modify the PO files.
162 (for-each (lambda (po)
164 (find-files "." "\\.po$"))
166 (patch-shebang "build-aux/git-version-gen")
168 (call-with-output-file ".tarball-version"
170 (display ,version port)))
172 (invoke "sh" "bootstrap")))
173 (add-before 'check 'copy-bootstrap-guile
174 (lambda* (#:key system inputs #:allow-other-keys)
175 ;; Copy the bootstrap guile tarball in the store used
176 ;; by the test suite.
177 (define (intern tarball)
178 (let ((base (strip-store-file-name tarball)))
179 (copy-file tarball base)
180 (invoke "./test-env" "guix" "download"
181 (string-append "file://" (getcwd)
186 (intern (assoc-ref inputs "boot-guile"))
188 ;; On x86_64 some tests need the i686 Guile.
189 ,@(if (and (not (%current-target-system))
190 (string=? (%current-system)
192 '((intern (assoc-ref inputs "boot-guile/i686")))
195 (add-after 'unpack 'disable-failing-tests
196 ;; XXX FIXME: These tests fail within the build container.
198 (substitute* "tests/syscalls.scm"
199 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
200 (string-append "(test-skip 1)\n" all)))
201 (substitute* "tests/containers.scm"
202 (("^\\(test-(assert|equal)" all)
203 (string-append "(test-skip 1)\n" all)))
204 (when (file-exists? "tests/guix-environment-container.sh")
205 (substitute* "tests/guix-environment-container.sh"
206 (("guix environment --version")
209 (add-before 'check 'set-SHELL
211 ;; 'guix environment' tests rely on 'SHELL' having a
212 ;; correct value, so set it.
213 (setenv "SHELL" (which "sh"))
215 (add-after 'install 'wrap-program
216 (lambda* (#:key inputs outputs #:allow-other-keys)
217 ;; Make sure the 'guix' command finds GnuTLS,
218 ;; Guile-JSON, and Guile-Git automatically.
219 (let* ((out (assoc-ref outputs "out"))
220 (guile (assoc-ref inputs "guile"))
221 (gcrypt (assoc-ref inputs "guile-gcrypt"))
222 (json (assoc-ref inputs "guile-json"))
223 (sqlite (assoc-ref inputs "guile-sqlite3"))
224 (git (assoc-ref inputs "guile-git"))
225 (bs (assoc-ref inputs
226 "guile-bytestructures"))
227 (ssh (assoc-ref inputs "guile-ssh"))
228 (gnutls (assoc-ref inputs "gnutls"))
229 (deps (list gcrypt json sqlite gnutls
233 (open-pipe* OPEN_READ
234 (string-append guile "/bin/guile")
235 "-c" "(display (effective-version))")))
237 (map (cut string-append <>
243 (map (cut string-append <>
244 "/lib/guile/" effective
249 (wrap-program (string-append out "/bin/guix")
250 `("GUILE_LOAD_PATH" ":" prefix (,path))
251 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath)))
254 (native-inputs `(("pkg-config" ,pkg-config)
256 ;; XXX: Keep the development inputs here even though
257 ;; they're unnecessary, just so that 'guix environment
258 ;; guix' always contains them.
259 ("autoconf" ,autoconf-wrapper)
260 ("automake" ,automake)
261 ("gettext" ,gettext-minimal)
263 ("graphviz" ,graphviz)
264 ("help2man" ,help2man)
269 ("zlib" ,zlib) ;for 'guix publish'
272 ("libgcrypt" ,libgcrypt)
276 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
278 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
279 ;; Some of the tests use "unshare" when it is available.
280 ("util-linux" ,util-linux)
281 ,@(if (and (not (%current-target-system))
282 (string=? (%current-system) "x86_64-linux"))
283 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
287 ("guile-gcrypt" ,guile-gcrypt)
288 ("guile-json" ,guile-json)
289 ("guile-sqlite3" ,guile-sqlite3)
290 ("guile-ssh" ,guile-ssh)
291 ("guile-git" ,guile-git)))
293 (home-page "https://www.gnu.org/software/guix/")
294 (synopsis "Functional package manager for installed software packages and versions")
296 "GNU Guix is a functional package manager for the GNU system, and is
297 also a distribution thereof. It includes a virtual machine image. Besides
298 the usual package management features, it also supports transactional
299 upgrades and roll-backs, per-user profiles, and much more. It is based on
300 the Nix package manager.")
301 (license license:gpl3+)
302 (properties '((ftp-server . "alpha.gnu.org"))))))
304 ;; Alias for backward compatibility.
305 (define-public guix-devel guix)
307 (define-public guix-daemon
308 ;; This package is for internal consumption: it allows us to quickly build
309 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
313 (properties `((hidden? . #t)))
316 ;; Use a minimum set of dependencies.
318 (fold alist-delete (package-native-inputs guix)
319 '("po4a" "graphviz" "help2man")))
322 ("guile-git" ,guile-git)
323 ("guile-json" ,guile-json)
324 ("guile-gcrypt" ,guile-gcrypt)
325 ,@(fold alist-delete (package-inputs guix)
326 '("boot-guile" "boot-guile/i686" "util-linux"))))
328 (propagated-inputs '())
331 (substitute-keyword-arguments (package-arguments guix)
332 ((#:configure-flags flags '())
333 ;; Pretend we have those libraries; we don't actually need them.
335 '("guix_cv_have_recent_guile_sqlite3=yes"
336 "guix_cv_have_recent_guile_ssh=yes")))
339 ((#:phases phases '%standard-phases)
340 `(modify-phases ,phases
343 (invoke "make" "nix/libstore/schema.sql.hh")
344 (invoke "make" "-j" (number->string
345 (parallel-job-count))
347 (delete 'copy-bootstrap-guile)
349 (lambda* (#:key outputs #:allow-other-keys)
350 (invoke "make" "install-binPROGRAMS"
351 "install-nodist_pkglibexecSCRIPTS")
353 ;; We need to tell 'guix-daemon' which 'guix' command to use.
354 ;; Here we use a questionable hack where we hard-code root's
355 ;; current guix, which could be wrong (XXX). Note that scripts
356 ;; like 'guix perform-download' do not run as root so we assume
357 ;; that they have access to /var/guix/profiles/per-user/root.
358 (let ((out (assoc-ref outputs "out")))
359 (substitute* (find-files (string-append out "/libexec"))
360 (("exec \".*/bin/guix\"")
361 "exec /var/guix/profiles/per-user/root/current-guix/bin/guix"))
363 (delete 'wrap-program)))))))
365 (define-public guile2.0-guix
366 (deprecated-package "guile2.0-guix" guix))
368 (define-public guix-minimal
369 ;; A version of Guix which is built with the minimal set of dependencies, as
370 ;; outlined in the README "Requirements" section. Intended as a CI job, so
375 (name "guix-minimal")
377 `(("guile" ,guile-2.2)
378 ,@(alist-delete "guile" (package-inputs guix))))
381 (package-propagated-inputs guix)
384 (define (source-file? file stat)
385 "Return true if FILE is likely a source file, false if it is a typical
387 (define (wrong-extension? file)
388 (or (string-suffix? "~" file)
389 (member (file-extension file)
390 '("o" "a" "lo" "so" "go"))))
392 (match (basename file)
393 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
395 ((? wrong-extension?)
400 (define-public current-guix-package
401 ;; This parameter allows callers to override the package that 'current-guix'
402 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
403 ;; for instance because it's not running from a source code checkout.
406 (define-public current-guix
407 (let* ((repository-root (canonicalize-path
408 (string-append (current-source-directory)
410 (select? (delay (or (git-predicate repository-root)
413 "Return a package representing Guix built from the current source tree.
414 This works by adding the current source tree to the store (after filtering it
415 out) and returning a package that uses that as its 'source'."
416 (or (current-guix-package)
419 (version (string-append (package-version guix) "+"))
420 (source (local-file repository-root "guix-current"
422 #:select? (force select?))))))))
435 (uri (string-append "http://nixos.org/releases/nix/nix-"
436 version "/nix-" version ".tar.xz"))
439 "0ss9svxlh1pvrdmnqjvjyqjmbqmrdbyfarvbb14i9d4bggzl0r8n"))))
440 (build-system gnu-build-system)
441 (native-inputs `(("pkg-config" ,pkg-config)))
442 (inputs `(("curl" ,curl)
445 ("libseccomp" ,libseccomp)
446 ("libsodium" ,libsodium)
450 (home-page "https://nixos.org/nix/")
451 (synopsis "The Nix package manager")
453 "Nix is a purely functional package manager. This means that it treats
454 packages like values in purely functional programming languages such as
455 Haskell—they are built by functions that don't have side-effects, and they
456 never change after they have been built. Nix stores packages in the Nix
457 store, usually the directory /nix/store, where each package has its own unique
459 (license license:lgpl2.1+)))
467 (uri (string-append "mirror://gnu/stow/stow-"
471 "1pvky9fayms4r6fhns8jd0vavszd7d979w62vfd5n88v614pdxz2"))))
472 (build-system gnu-build-system)
476 `(("perl-test-simple" ,perl-test-simple)
477 ("perl-test-output" ,perl-test-output)
478 ("perl-capture-tiny" ,perl-capture-tiny)
479 ("perl-io-stringy" ,perl-io-stringy)))
480 (home-page "https://www.gnu.org/software/stow/")
481 (synopsis "Managing installed software packages")
483 "GNU Stow is a symlink manager. It generates symlinks to directories
484 of data and makes them appear to be merged into the same directory. It is
485 typically used for managing software packages installed from source, by
486 letting you install them apart in distinct directories and then create
487 symlinks to the files in a common directory such as /usr/local.")
488 (license license:gpl2+)))
496 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
497 (version-major+minor version) ".x/rpm-"
501 "0armd7dqr8bl0isx8l4xlylm7dikasmxhhcbz336fkp2x30w5jw0"))))
502 (build-system gnu-build-system)
504 '(#:configure-flags '("--with-external-db" ;use the system's bdb
507 #:phases (modify-phases %standard-phases
508 (add-before 'configure 'set-nss-library-path
509 (lambda* (#:key inputs #:allow-other-keys)
510 (let ((nss (assoc-ref inputs "nss")))
511 (setenv "LIBRARY_PATH"
512 (string-append (getenv "LIBRARY_PATH") ":"
516 `(("pkg-config" ,pkg-config)))
518 `(("python" ,python-2)
524 ("libarchive" ,libarchive)
525 ("nettle" ,nettle) ;XXX: actually a dependency of libarchive
530 (home-page "http://rpm.org/")
531 (synopsis "The RPM Package Manager")
533 "The RPM Package Manager (RPM) is a command-line driven package
534 management system capable of installing, uninstalling, verifying, querying,
535 and updating computer software packages. Each software package consists of an
536 archive of files along with information about the package like its version, a
537 description. There is also a library permitting developers to manage such
538 transactions from C or Python.")
540 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
541 (license license:gpl2+)))
543 (define-public diffoscope
549 (uri (pypi-uri name version))
552 "0qrfp7nha2n2s9h5ibcf7rqji1amh4cqbcf80m6anim6p3ik26da"))))
553 (build-system python-build-system)
555 `(#:phases (modify-phases %standard-phases
556 ;; setup.py mistakenly requires python-magic from PyPi, even
557 ;; though the Python bindings of `file` are sufficient.
558 ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844
559 (add-after 'unpack 'dependency-on-python-magic
561 (substitute* "setup.py"
562 (("'python-magic',") ""))))
563 ;; This test is broken because our `file` package has a
564 ;; bug in berkeley-db file type detection.
565 (add-after 'unpack 'remove-berkeley-test
567 (delete-file "tests/comparators/test_berkeley_db.py")
569 (add-after 'unpack 'embed-tool-references
570 (lambda* (#:key inputs #:allow-other-keys)
571 (substitute* "diffoscope/comparators/utils/compare.py"
573 (string-append "['" (which "xxd") "',")))
574 (substitute* "diffoscope/comparators/elf.py"
575 (("@tool_required\\('readelf'\\)") "")
576 (("get_tool_name\\('readelf'\\)")
577 (string-append "'" (which "readelf") "'")))
578 (substitute* "diffoscope/comparators/directory.py"
579 (("@tool_required\\('stat'\\)") "")
580 (("@tool_required\\('getfacl'\\)") "")
582 (string-append "['" (which "stat") "',"))
584 (string-append "['" (which "getfacl") "',")))
586 (add-before 'check 'delete-failing-test
588 (delete-file "tests/test_tools.py") ;this requires /sbin to be on the path
590 (inputs `(("rpm" ,rpm) ;for rpm-python
591 ("python-file" ,python-file)
592 ("python-debian" ,python-debian)
593 ("python-libarchive-c" ,python-libarchive-c)
594 ("python-tlsh" ,python-tlsh)
595 ("acl" ,acl) ;for getfacl
596 ("colordiff" ,colordiff)
599 ;; Below are modules used for tests.
600 ("python-pytest" ,python-pytest)
601 ("python-chardet" ,python-chardet)))
602 (home-page "https://diffoscope.org/")
603 (synopsis "Compare files, archives, and directories in depth")
605 "Diffoscope tries to get to the bottom of what makes files or directories
606 different. It recursively unpacks archives of many kinds and transforms
607 various binary formats into more human readable forms to compare them. It can
608 compare two tarballs, ISO images, or PDFs just as easily.")
609 (license license:gpl3+)))
611 (define-public python-anaconda-client
613 (name "python-anaconda-client")
618 (uri (string-append "https://github.com/Anaconda-Platform/"
619 "anaconda-client/archive/" version ".tar.gz"))
620 (file-name (string-append name "-" version ".tar.gz"))
623 "1wv4wi6k5jz7rlwfgvgfdizv77x3cr1wa2aj0k1595g7fbhkjhz2"))))
624 (build-system python-build-system)
626 `(("python-pyyaml" ,python-pyyaml)
627 ("python-requests" ,python-requests)
628 ("python-clyent" ,python-clyent)))
630 `(("python-pytz" ,python-pytz)
631 ("python-dateutil" ,python-dateutil)
632 ("python-mock" ,python-mock)
633 ("python-coverage" ,python-coverage)
634 ("python-pillow" ,python-pillow)))
637 (modify-phases %standard-phases
638 ;; This is needed for some tests.
639 (add-before 'check 'set-up-home
640 (lambda* _ (setenv "HOME" "/tmp") #t))
641 (add-before 'check 'remove-network-tests
643 ;; Remove tests requiring a network connection
644 (let ((network-tests '("tests/test_upload.py"
645 "tests/test_authorizations.py"
646 "tests/test_login.py"
647 "tests/test_whoami.py"
648 "utils/notebook/tests/test_data_uri.py"
649 "utils/notebook/tests/test_base.py"
650 "utils/notebook/tests/test_downloader.py"
651 "inspect_package/tests/test_conda.py")))
652 (with-directory-excursion "binstar_client"
653 (for-each delete-file network-tests)))
655 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
656 (synopsis "Anaconda Cloud command line client library")
658 "Anaconda Cloud command line client library provides an interface to
659 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
661 (license license:bsd-3)))
663 (define-public python2-anaconda-client
664 (package-with-python2 python-anaconda-client))
666 (define-public python-conda
668 (name "python-conda")
673 (uri (string-append "https://github.com/conda/conda/archive/"
675 (file-name (string-append name "-" version ".tar.gz"))
678 "1jq8hyrc5npb5sf4vw6s6by4602yj8f79vzpbwdfgpkn02nfk1dv"))))
679 (build-system python-build-system)
682 (modify-phases %standard-phases
683 (add-before 'build 'create-version-file
685 (with-output-to-file "conda/.version"
686 (lambda () (display ,version)))
688 (add-before 'check 'remove-failing-tests
690 ;; These tests require internet/network access
691 (let ((network-tests '("test_cli.py"
699 "conda_env/test_cli.py"
700 "conda_env/test_create.py"
701 "conda_env/specs/test_notebook.py"
702 "conda_env/utils/test_notebooks.py"
704 "core/test_repodata.py")))
705 (with-directory-excursion "tests"
706 (for-each delete-file network-tests)
708 ;; FIXME: This test creates a file, then deletes it and tests
709 ;; that the file was deleted. For some reason it fails when
710 ;; building with guix, but does not when you run it in the
711 ;; directory left when you build with the --keep-failed
713 (delete-file "gateways/disk/test_delete.py")
717 (setenv "HOME" "/tmp")
718 (invoke "py.test"))))))
720 `(("python-cytoolz" ,python-cytoolz)
721 ("python-ruamel.yaml" ,python-ruamel.yaml)
722 ("python-requests" ,python-requests)
723 ("python-pycosat" ,python-pycosat)
724 ("python-pytest" ,python-pytest)
725 ("python-responses" ,python-responses)
726 ("python-pyyaml" ,python-pyyaml)
727 ("python-anaconda-client" ,python-anaconda-client)))
728 (home-page "https://github.com/conda/conda")
729 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
731 "Conda is a cross-platform, Python-agnostic binary package manager. It
732 is the package manager used by Anaconda installations, but it may be used for
733 other systems as well. Conda makes environments first-class citizens, making
734 it easy to create independent environments even for C libraries. Conda is
735 written entirely in Python.
737 This package provides Conda as a library.")
738 (license license:bsd-3)))
740 (define-public python2-conda
741 (let ((base (package-with-python2
742 (strip-python2-variant python-conda))))
743 (package (inherit base)
745 `(("python2-enum34" ,python2-enum34)
746 ,@(package-native-inputs base))))))
749 (package (inherit python-conda)
752 (substitute-keyword-arguments (package-arguments python-conda)
754 `(modify-phases ,phases
756 (lambda* (#:key outputs #:allow-other-keys)
757 ;; This test fails when run before installation.
758 (delete-file "tests/test_activate.py")
760 ;; Fix broken defaults
761 (substitute* "conda/base/context.py"
762 (("return sys.prefix")
763 (string-append "return \"" (assoc-ref outputs "out") "\""))
764 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
765 (string-append "return False if self.root_prefix == self.conda_prefix else "
768 ;; The util/setup-testing.py is used to build conda in
769 ;; application form, rather than the default, library form.
770 ;; With this, we are able to run commands like `conda --help`
771 ;; directly on the command line
772 (invoke "python" "utils/setup-testing.py" "build_py")))
774 (lambda* (#:key inputs outputs #:allow-other-keys)
775 (let* ((out (assoc-ref outputs "out"))
776 (target (string-append out "/lib/python"
777 ((@@ (guix build python-build-system)
779 (assoc-ref inputs "python"))
781 ;; The installer aborts if the target directory is not on
784 (string-append target ":" (getenv "PYTHONPATH")))
786 ;; And it aborts if the directory doesn't exist.
788 (invoke "python" "utils/setup-testing.py" "install"
789 (string-append "--prefix=" out)))))
790 ;; The "activate" and "deactivate" scripts don't need wrapping.
791 ;; They also break when they are renamed.
792 (add-after 'wrap 'undo-wrap
793 (lambda* (#:key outputs #:allow-other-keys)
794 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
795 (delete-file "deactivate")
796 (rename-file ".deactivate-real" "deactivate")
797 (delete-file "activate")
798 (rename-file ".activate-real" "activate")
801 "Conda is a cross-platform, Python-agnostic binary package manager. It
802 is the package manager used by Anaconda installations, but it may be used for
803 other systems as well. Conda makes environments first-class citizens, making
804 it easy to create independent environments even for C libraries. Conda is
805 written entirely in Python.")))
813 (uri (string-append "https://www.guixwl.org/releases/gwl-"
817 "06pm967mq1wyggx7l0nfapw5s0k5qc5r9lawk2v3db868br779a7"))))
818 (build-system gnu-build-system)
820 `(("autoconf" ,autoconf)
821 ("automake" ,automake)
822 ("pkg-config" ,pkg-config)))
824 `(("guile" ,guile-2.2)))
827 ("guile-commonmark" ,guile-commonmark)))
828 (home-page "https://www.guixwl.org")
829 (synopsis "Workflow management extension for GNU Guix")
830 (description "This project provides two subcommands to GNU Guix and
831 introduces two record types that provide a workflow management extension built
832 on top of GNU Guix.")
833 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
834 ;; the web interface modules in gwl/ are licensed AGPL3+,
835 ;; and the fonts included in this package are licensed OFL1.1.
836 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
844 (uri (string-append "mirror://gnome/sources/" name "/"
845 version "/" name "-" version ".tar.xz"))
848 "0l19sr6pg0cfcddmi5n79d08mjjbhn427ip5jlsy9zddq9r24aqr"))
849 ;; gcab 1.1 has a hard dependency on git — even when building
850 ;; from a tarball. Remove it early so ‘guix environment gcab’
851 ;; can actually build what ‘guix build --source gcab’ returns.
852 (modules '((guix build utils)))
855 (substitute* "meson.build"
856 (("git_version = .*$") "git_version = []\n"))
858 (build-system meson-build-system)
860 `(("glib:bin" ,glib "bin") ; for glib-mkenums
861 ("intltool" ,intltool)
862 ("pkg-config" ,pkg-config)
869 ;; XXX This ‘documentation’ is for developers, and fails informatively:
870 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
872 "-Dintrospection=false")))
873 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
874 (synopsis "Microsoft Cabinet file manipulation library")
876 "The libgcab library provides GObject functions to read, write, and modify
877 Microsoft cabinet (.@dfn{CAB}) files.")
878 (license (list license:gpl2+ ; tests/testsuite.at
879 license:lgpl2.1+)))) ; the rest
881 (define-public msitools
887 (uri (string-append "mirror://gnome/sources/" name "/"
888 version "/" name "-" version ".tar.xz"))
891 "19wb3n3nwkpc6bjr0q3f1znaxsfaqgjbdxxnbx8ic8bb5b49hwac"))))
892 (build-system gnu-build-system)
894 `(("pkg-config" ,pkg-config)))
900 ("uuid" ,util-linux)))
901 (home-page "https://wiki.gnome.org/msitools")
902 (synopsis "Windows Installer file manipulation tool")
904 "msitools is a collection of command-line tools to inspect, extract, build,
905 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
906 for packaging and deployment of cross-compiled Windows applications.")
907 (license license:lgpl2.1+)))
909 (define-public libostree
916 "https://github.com/ostreedev/ostree/releases/download/v"
917 (version-major+minor version) "/libostree-" version ".tar.xz"))
920 "01mygpkbl9sk2vr3hjbpih6qlg8lwx0q5lklm09f7jfwfpnwyqzj"))))
921 (build-system gnu-build-system)
924 (modify-phases %standard-phases
925 (add-before 'check 'pre-check
927 ;; Don't try to use the non-existing '/var/tmp' as test
929 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
932 ;; tap-driver.sh: internal error getting exit status
933 ;; tap-driver.sh: fatal: I/O or internal error
936 `(("attr" ,attr) ; for tests
938 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
939 ("gobject-introspection" ,gobject-introspection)
940 ("pkg-config" ,pkg-config)
941 ("xsltproc" ,libxslt)))
944 ("docbook-xml" ,docbook-xml-4.2)
945 ("docbook-xsl" ,docbook-xsl)
946 ("e2fsprogs" ,e2fsprogs)
950 ("libarchive" ,libarchive)
952 ("nettle" ,nettle) ; required by 'libarchive.la'
953 ("util-linux" ,util-linux)))
954 (home-page "https://ostree.readthedocs.io/en/latest/")
955 (synopsis "Operating system and container binary deployment and upgrades")
957 "@code{libostree} is both a shared library and suite of command line
958 tools that combines a \"git-like\" model for committing and downloading
959 bootable filesystem trees, along with a layer for deploying them and managing
960 the bootloader configuration.")
961 (license license:lgpl2.0+)))
963 (define-public flatpak
970 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
971 version "/flatpak-" version ".tar.xz"))
974 "0bkjwh49kajyd78vdh0g9arb352a7rccaifas9zxa78phhja2v2p"))))
975 (build-system gnu-build-system)
977 '(#:tests? #f ;; Tests fail due to trying to create files where it can't.
978 #:configure-flags (list
979 "--enable-documentation=no" ;; FIXME
980 "--enable-system-helper=no"
981 "--localstatedir=/var"
982 (string-append "--with-system-bubblewrap="
983 (assoc-ref %build-inputs "bubblewrap")
985 (native-inputs `(("bison" ,bison)
986 ("gettext" ,gnu-gettext)
987 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
988 ("gobject-introspection" ,gobject-introspection)
990 ("pkg-config" ,pkg-config)))
991 (inputs `(("appstream-glib" ,appstream-glib)
992 ("bubblewrap" ,bubblewrap)
993 ("gdk-pixbuf" ,gdk-pixbuf)
995 ("json-glib" ,json-glib)
996 ("libarchive" ,libarchive)
997 ("libostree" ,libostree)
998 ("libseccomp" ,libseccomp)
1001 ("libxml2" ,libxml2)
1003 ("util-linux" ,util-linux)))
1004 (home-page "https://flatpak.org")
1005 (synopsis "System for building, distributing, and running sandboxed desktop
1007 (description "Flatpak is a system for building, distributing, and running
1008 sandboxed desktop applications on GNU/Linux.")
1009 (license license:lgpl2.1+)))