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 guile-xyz)
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 gnu)
80 #:use-module (guix build-system meson)
81 #:use-module (guix build-system python)
82 #:use-module (guix download)
83 #:use-module (guix gexp)
84 #:use-module (guix git-download)
85 #:use-module ((guix licenses) #:prefix license:)
86 #:use-module (guix packages)
87 #:use-module (guix utils)
88 #:use-module (ice-9 match)
89 #:use-module (srfi srfi-1))
91 (define (boot-guile-uri arch)
92 "Return the URI for the bootstrap Guile tarball for ARCH."
93 (cond ((string=? "armhf" arch)
94 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
96 "/20150101/guile-2.0.11.tar.xz"))
97 ((string=? "aarch64" arch)
98 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
99 arch "-linux/20170217/guile-2.0.14.tar.xz"))
101 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
103 "/20131110/guile-2.0.9.tar.xz"))))
106 ;; Latest version of Guix, which may or may not correspond to a release.
107 ;; Note: the 'update-guix-package.scm' script expects this definition to
108 ;; start precisely like this.
109 (let ((version "0.16.0")
110 (commit "4bddd12ad540d45a33a5f9f129b896843dca603f")
115 (version (if (zero? revision)
117 (string-append version "-"
118 (number->string revision)
119 "." (string-take commit 7))))
123 (url "https://git.savannah.gnu.org/r/guix.git")
127 "1abn4ghb25kn0cmr9dbb3q3fxdcc0g2fnnmbrykxv111s6ahdmlw"))
128 (file-name (string-append "guix-" version "-checkout"))))
129 (build-system gnu-build-system)
131 `(#:configure-flags (list
132 "--localstatedir=/var"
134 (string-append "--with-bash-completion-dir="
135 (assoc-ref %outputs "out")
136 "/etc/bash_completion.d")
137 (string-append "--with-libgcrypt-prefix="
138 (assoc-ref %build-inputs
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 GuixSD
144 ;; 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 (deps (list gcrypt json sqlite gnutls
234 (open-pipe* OPEN_READ
235 (string-append guile "/bin/guile")
236 "-c" "(display (effective-version))")))
238 (map (cut string-append <>
244 (map (cut string-append <>
245 "/lib/guile/" effective
250 (wrap-program (string-append out "/bin/guix")
251 `("GUILE_LOAD_PATH" ":" prefix (,path))
252 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath)))
255 (native-inputs `(("pkg-config" ,pkg-config)
257 ;; XXX: Keep the development inputs here even though
258 ;; they're unnecessary, just so that 'guix environment
259 ;; guix' always contains them.
260 ("autoconf" ,autoconf-wrapper)
261 ("automake" ,automake)
262 ("gettext" ,gettext-minimal)
264 ("graphviz" ,graphviz)
265 ("help2man" ,help2man)
270 ("zlib" ,zlib) ;for 'guix publish'
273 ("libgcrypt" ,libgcrypt)
277 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
279 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
280 ;; Some of the tests use "unshare" when it is available.
281 ("util-linux" ,util-linux)
282 ,@(if (and (not (%current-target-system))
283 (string=? (%current-system) "x86_64-linux"))
284 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
288 ("guile-gcrypt" ,guile-gcrypt)
289 ("guile-json" ,guile-json)
290 ("guile-sqlite3" ,guile-sqlite3)
291 ("guile-ssh" ,guile-ssh)
292 ("guile-git" ,guile-git)))
294 (home-page "https://www.gnu.org/software/guix/")
295 (synopsis "Functional package manager for installed software packages and versions")
297 "GNU Guix is a functional package manager for the GNU system, and is
298 also a distribution thereof. It includes a virtual machine image. Besides
299 the usual package management features, it also supports transactional
300 upgrades and roll-backs, per-user profiles, and much more. It is based on
301 the Nix package manager.")
302 (license license:gpl3+)
303 (properties '((ftp-server . "alpha.gnu.org"))))))
305 (define-public guix-daemon
306 ;; This package is for internal consumption: it allows us to quickly build
307 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
311 (properties `((hidden? . #t)))
314 ;; Use a minimum set of dependencies.
316 (fold alist-delete (package-native-inputs guix)
317 '("po4a" "graphviz" "help2man")))
320 ("guile-git" ,guile-git)
321 ("guile-json" ,guile-json)
322 ("guile-gcrypt" ,guile-gcrypt)
323 ,@(fold alist-delete (package-inputs guix)
324 '("boot-guile" "boot-guile/i686" "util-linux"))))
326 (propagated-inputs '())
329 (substitute-keyword-arguments (package-arguments guix)
330 ((#:configure-flags flags '())
331 ;; Pretend we have those libraries; we don't actually need them.
333 '("guix_cv_have_recent_guile_sqlite3=yes"
334 "guix_cv_have_recent_guile_ssh=yes")))
337 ((#:phases phases '%standard-phases)
338 `(modify-phases ,phases
341 (invoke "make" "nix/libstore/schema.sql.hh")
342 (invoke "make" "-j" (number->string
343 (parallel-job-count))
345 (delete 'copy-bootstrap-guile)
347 (lambda* (#:key outputs #:allow-other-keys)
348 (invoke "make" "install-binPROGRAMS"
349 "install-nodist_pkglibexecSCRIPTS")
351 ;; We need to tell 'guix-daemon' which 'guix' command to use.
352 ;; Here we use a questionable hack where we hard-code root's
353 ;; current guix, which could be wrong (XXX). Note that scripts
354 ;; like 'guix perform-download' do not run as root so we assume
355 ;; that they have access to /var/guix/profiles/per-user/root.
356 (let ((out (assoc-ref outputs "out")))
357 (substitute* (find-files (string-append out "/libexec"))
358 (("exec \".*/bin/guix\"")
359 "exec /var/guix/profiles/per-user/root/current-guix/bin/guix"))
361 (delete 'wrap-program)))))))
363 (define-public guile2.0-guix
364 (deprecated-package "guile2.0-guix" guix))
366 (define-public guix-minimal
367 ;; A version of Guix which is built with the minimal set of dependencies, as
368 ;; outlined in the README "Requirements" section. Intended as a CI job, so
373 (name "guix-minimal")
375 `(("guile" ,guile-2.2)
376 ,@(alist-delete "guile" (package-inputs guix))))
379 (package-propagated-inputs guix)
382 (define (source-file? file stat)
383 "Return true if FILE is likely a source file, false if it is a typical
385 (define (wrong-extension? file)
386 (or (string-suffix? "~" file)
387 (member (file-extension file)
388 '("o" "a" "lo" "so" "go"))))
390 (match (basename file)
391 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
393 ((? wrong-extension?)
398 (define-public current-guix-package
399 ;; This parameter allows callers to override the package that 'current-guix'
400 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
401 ;; for instance because it's not running from a source code checkout.
404 (define-public current-guix
405 (let* ((repository-root (canonicalize-path
406 (string-append (current-source-directory)
408 (select? (delay (or (git-predicate repository-root)
411 "Return a package representing Guix built from the current source tree.
412 This works by adding the current source tree to the store (after filtering it
413 out) and returning a package that uses that as its 'source'."
414 (or (current-guix-package)
417 (version (string-append (package-version guix) "+"))
418 (source (local-file repository-root "guix-current"
420 #:select? (force select?))))))))
433 (uri (string-append "http://nixos.org/releases/nix/nix-"
434 version "/nix-" version ".tar.xz"))
437 "0ss9svxlh1pvrdmnqjvjyqjmbqmrdbyfarvbb14i9d4bggzl0r8n"))))
438 (build-system gnu-build-system)
439 (native-inputs `(("pkg-config" ,pkg-config)))
440 (inputs `(("curl" ,curl)
443 ("libseccomp" ,libseccomp)
444 ("libsodium" ,libsodium)
448 (home-page "https://nixos.org/nix/")
449 (synopsis "The Nix package manager")
451 "Nix is a purely functional package manager. This means that it treats
452 packages like values in purely functional programming languages such as
453 Haskell—they are built by functions that don't have side-effects, and they
454 never change after they have been built. Nix stores packages in the Nix
455 store, usually the directory /nix/store, where each package has its own unique
457 (license license:lgpl2.1+)))
465 (uri (string-append "mirror://gnu/stow/stow-"
469 "1pvky9fayms4r6fhns8jd0vavszd7d979w62vfd5n88v614pdxz2"))))
470 (build-system gnu-build-system)
474 `(("perl-test-simple" ,perl-test-simple)
475 ("perl-test-output" ,perl-test-output)
476 ("perl-capture-tiny" ,perl-capture-tiny)
477 ("perl-io-stringy" ,perl-io-stringy)))
478 (home-page "https://www.gnu.org/software/stow/")
479 (synopsis "Managing installed software packages")
481 "GNU Stow is a symlink manager. It generates symlinks to directories
482 of data and makes them appear to be merged into the same directory. It is
483 typically used for managing software packages installed from source, by
484 letting you install them apart in distinct directories and then create
485 symlinks to the files in a common directory such as /usr/local.")
486 (license license:gpl2+)))
494 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
495 (version-major+minor version) ".x/rpm-"
499 "0armd7dqr8bl0isx8l4xlylm7dikasmxhhcbz336fkp2x30w5jw0"))))
500 (build-system gnu-build-system)
502 '(#:configure-flags '("--with-external-db" ;use the system's bdb
505 #:phases (modify-phases %standard-phases
506 (add-before 'configure 'set-nss-library-path
507 (lambda* (#:key inputs #:allow-other-keys)
508 (let ((nss (assoc-ref inputs "nss")))
509 (setenv "LIBRARY_PATH"
510 (string-append (getenv "LIBRARY_PATH") ":"
514 `(("pkg-config" ,pkg-config)))
516 `(("python" ,python-2)
522 ("libarchive" ,libarchive)
523 ("nettle" ,nettle) ;XXX: actually a dependency of libarchive
528 (home-page "http://rpm.org/")
529 (synopsis "The RPM Package Manager")
531 "The RPM Package Manager (RPM) is a command-line driven package
532 management system capable of installing, uninstalling, verifying, querying,
533 and updating computer software packages. Each software package consists of an
534 archive of files along with information about the package like its version, a
535 description. There is also a library permitting developers to manage such
536 transactions from C or Python.")
538 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
539 (license license:gpl2+)))
541 (define-public diffoscope
547 (uri (pypi-uri name version))
550 "0qrfp7nha2n2s9h5ibcf7rqji1amh4cqbcf80m6anim6p3ik26da"))))
551 (build-system python-build-system)
553 `(#:phases (modify-phases %standard-phases
554 ;; setup.py mistakenly requires python-magic from PyPi, even
555 ;; though the Python bindings of `file` are sufficient.
556 ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844
557 (add-after 'unpack 'dependency-on-python-magic
559 (substitute* "setup.py"
560 (("'python-magic',") ""))))
561 ;; This test is broken because our `file` package has a
562 ;; bug in berkeley-db file type detection.
563 (add-after 'unpack 'remove-berkeley-test
565 (delete-file "tests/comparators/test_berkeley_db.py")
567 (add-after 'unpack 'embed-tool-references
568 (lambda* (#:key inputs #:allow-other-keys)
569 (substitute* "diffoscope/comparators/utils/compare.py"
571 (string-append "['" (which "xxd") "',")))
572 (substitute* "diffoscope/comparators/elf.py"
573 (("@tool_required\\('readelf'\\)") "")
574 (("get_tool_name\\('readelf'\\)")
575 (string-append "'" (which "readelf") "'")))
576 (substitute* "diffoscope/comparators/directory.py"
577 (("@tool_required\\('stat'\\)") "")
578 (("@tool_required\\('getfacl'\\)") "")
580 (string-append "['" (which "stat") "',"))
582 (string-append "['" (which "getfacl") "',")))
584 (add-before 'check 'delete-failing-test
586 (delete-file "tests/test_tools.py") ;this requires /sbin to be on the path
588 (inputs `(("rpm" ,rpm) ;for rpm-python
589 ("python-file" ,python-file)
590 ("python-debian" ,python-debian)
591 ("python-libarchive-c" ,python-libarchive-c)
592 ("python-tlsh" ,python-tlsh)
593 ("acl" ,acl) ;for getfacl
594 ("colordiff" ,colordiff)
597 ;; Below are modules used for tests.
598 ("python-pytest" ,python-pytest)
599 ("python-chardet" ,python-chardet)))
600 (home-page "https://diffoscope.org/")
601 (synopsis "Compare files, archives, and directories in depth")
603 "Diffoscope tries to get to the bottom of what makes files or directories
604 different. It recursively unpacks archives of many kinds and transforms
605 various binary formats into more human readable forms to compare them. It can
606 compare two tarballs, ISO images, or PDFs just as easily.")
607 (license license:gpl3+)))
609 (define-public python-anaconda-client
611 (name "python-anaconda-client")
616 (uri (string-append "https://github.com/Anaconda-Platform/"
617 "anaconda-client/archive/" version ".tar.gz"))
618 (file-name (string-append name "-" version ".tar.gz"))
621 "1wv4wi6k5jz7rlwfgvgfdizv77x3cr1wa2aj0k1595g7fbhkjhz2"))))
622 (build-system python-build-system)
624 `(("python-pyyaml" ,python-pyyaml)
625 ("python-requests" ,python-requests)
626 ("python-clyent" ,python-clyent)))
628 `(("python-pytz" ,python-pytz)
629 ("python-dateutil" ,python-dateutil)
630 ("python-mock" ,python-mock)
631 ("python-coverage" ,python-coverage)
632 ("python-pillow" ,python-pillow)))
635 (modify-phases %standard-phases
636 ;; This is needed for some tests.
637 (add-before 'check 'set-up-home
638 (lambda* _ (setenv "HOME" "/tmp") #t))
639 (add-before 'check 'remove-network-tests
641 ;; Remove tests requiring a network connection
642 (let ((network-tests '("tests/test_upload.py"
643 "tests/test_authorizations.py"
644 "tests/test_login.py"
645 "tests/test_whoami.py"
646 "utils/notebook/tests/test_data_uri.py"
647 "utils/notebook/tests/test_base.py"
648 "utils/notebook/tests/test_downloader.py"
649 "inspect_package/tests/test_conda.py")))
650 (with-directory-excursion "binstar_client"
651 (for-each delete-file network-tests)))
653 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
654 (synopsis "Anaconda Cloud command line client library")
656 "Anaconda Cloud command line client library provides an interface to
657 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
659 (license license:bsd-3)))
661 (define-public python2-anaconda-client
662 (package-with-python2 python-anaconda-client))
664 (define-public python-conda
666 (name "python-conda")
671 (uri (string-append "https://github.com/conda/conda/archive/"
673 (file-name (string-append name "-" version ".tar.gz"))
676 "1jq8hyrc5npb5sf4vw6s6by4602yj8f79vzpbwdfgpkn02nfk1dv"))))
677 (build-system python-build-system)
680 (modify-phases %standard-phases
681 (add-before 'build 'create-version-file
683 (with-output-to-file "conda/.version"
684 (lambda () (display ,version)))
686 (add-before 'check 'remove-failing-tests
688 ;; These tests require internet/network access
689 (let ((network-tests '("test_cli.py"
697 "conda_env/test_cli.py"
698 "conda_env/test_create.py"
699 "conda_env/specs/test_notebook.py"
700 "conda_env/utils/test_notebooks.py"
702 "core/test_repodata.py")))
703 (with-directory-excursion "tests"
704 (for-each delete-file network-tests)
706 ;; FIXME: This test creates a file, then deletes it and tests
707 ;; that the file was deleted. For some reason it fails when
708 ;; building with guix, but does not when you run it in the
709 ;; directory left when you build with the --keep-failed
711 (delete-file "gateways/disk/test_delete.py")
715 (setenv "HOME" "/tmp")
716 (invoke "py.test"))))))
718 `(("python-cytoolz" ,python-cytoolz)
719 ("python-ruamel.yaml" ,python-ruamel.yaml)
720 ("python-requests" ,python-requests)
721 ("python-pycosat" ,python-pycosat)
722 ("python-pytest" ,python-pytest)
723 ("python-responses" ,python-responses)
724 ("python-pyyaml" ,python-pyyaml)
725 ("python-anaconda-client" ,python-anaconda-client)))
726 (home-page "https://github.com/conda/conda")
727 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
729 "Conda is a cross-platform, Python-agnostic binary package manager. It
730 is the package manager used by Anaconda installations, but it may be used for
731 other systems as well. Conda makes environments first-class citizens, making
732 it easy to create independent environments even for C libraries. Conda is
733 written entirely in Python.
735 This package provides Conda as a library.")
736 (license license:bsd-3)))
738 (define-public python2-conda
739 (let ((base (package-with-python2
740 (strip-python2-variant python-conda))))
741 (package (inherit base)
743 `(("python2-enum34" ,python2-enum34)
744 ,@(package-native-inputs base))))))
747 (package (inherit python-conda)
750 (substitute-keyword-arguments (package-arguments python-conda)
752 `(modify-phases ,phases
754 (lambda* (#:key outputs #:allow-other-keys)
755 ;; This test fails when run before installation.
756 (delete-file "tests/test_activate.py")
758 ;; Fix broken defaults
759 (substitute* "conda/base/context.py"
760 (("return sys.prefix")
761 (string-append "return \"" (assoc-ref outputs "out") "\""))
762 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
763 (string-append "return False if self.root_prefix == self.conda_prefix else "
766 ;; The util/setup-testing.py is used to build conda in
767 ;; application form, rather than the default, library form.
768 ;; With this, we are able to run commands like `conda --help`
769 ;; directly on the command line
770 (invoke "python" "utils/setup-testing.py" "build_py")))
772 (lambda* (#:key inputs outputs #:allow-other-keys)
773 (let* ((out (assoc-ref outputs "out"))
774 (target (string-append out "/lib/python"
775 ((@@ (guix build python-build-system)
777 (assoc-ref inputs "python"))
779 ;; The installer aborts if the target directory is not on
782 (string-append target ":" (getenv "PYTHONPATH")))
784 ;; And it aborts if the directory doesn't exist.
786 (invoke "python" "utils/setup-testing.py" "install"
787 (string-append "--prefix=" out)))))
788 ;; The "activate" and "deactivate" scripts don't need wrapping.
789 ;; They also break when they are renamed.
790 (add-after 'wrap 'undo-wrap
791 (lambda* (#:key outputs #:allow-other-keys)
792 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
793 (delete-file "deactivate")
794 (rename-file ".deactivate-real" "deactivate")
795 (delete-file "activate")
796 (rename-file ".activate-real" "activate")
799 "Conda is a cross-platform, Python-agnostic binary package manager. It
800 is the package manager used by Anaconda installations, but it may be used for
801 other systems as well. Conda makes environments first-class citizens, making
802 it easy to create independent environments even for C libraries. Conda is
803 written entirely in Python.")))
811 (uri (string-append "https://www.guixwl.org/releases/gwl-"
815 "06pm967mq1wyggx7l0nfapw5s0k5qc5r9lawk2v3db868br779a7"))))
816 (build-system gnu-build-system)
818 `(("autoconf" ,autoconf)
819 ("automake" ,automake)
820 ("pkg-config" ,pkg-config)))
822 `(("guile" ,guile-2.2)))
825 ("guile-commonmark" ,guile-commonmark)))
826 (home-page "https://www.guixwl.org")
827 (synopsis "Workflow management extension for GNU Guix")
828 (description "This project provides two subcommands to GNU Guix and
829 introduces two record types that provide a workflow management extension built
830 on top of GNU Guix.")
831 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
832 ;; the web interface modules in gwl/ are licensed AGPL3+,
833 ;; and the fonts included in this package are licensed OFL1.1.
834 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
842 (uri (string-append "mirror://gnome/sources/" name "/"
843 version "/" name "-" version ".tar.xz"))
846 "0l19sr6pg0cfcddmi5n79d08mjjbhn427ip5jlsy9zddq9r24aqr"))
847 ;; gcab 1.1 has a hard dependency on git — even when building
848 ;; from a tarball. Remove it early so ‘guix environment gcab’
849 ;; can actually build what ‘guix build --source gcab’ returns.
850 (modules '((guix build utils)))
853 (substitute* "meson.build"
854 (("git_version = .*$") "git_version = []\n"))
856 (build-system meson-build-system)
858 `(("glib:bin" ,glib "bin") ; for glib-mkenums
859 ("intltool" ,intltool)
860 ("pkg-config" ,pkg-config)
867 ;; XXX This ‘documentation’ is for developers, and fails informatively:
868 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
870 "-Dintrospection=false")))
871 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
872 (synopsis "Microsoft Cabinet file manipulation library")
874 "The libgcab library provides GObject functions to read, write, and modify
875 Microsoft cabinet (.@dfn{CAB}) files.")
876 (license (list license:gpl2+ ; tests/testsuite.at
877 license:lgpl2.1+)))) ; the rest
879 (define-public msitools
885 (uri (string-append "mirror://gnome/sources/" name "/"
886 version "/" name "-" version ".tar.xz"))
889 "19wb3n3nwkpc6bjr0q3f1znaxsfaqgjbdxxnbx8ic8bb5b49hwac"))))
890 (build-system gnu-build-system)
892 `(("pkg-config" ,pkg-config)))
898 ("uuid" ,util-linux)))
899 (home-page "https://wiki.gnome.org/msitools")
900 (synopsis "Windows Installer file manipulation tool")
902 "msitools is a collection of command-line tools to inspect, extract, build,
903 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
904 for packaging and deployment of cross-compiled Windows applications.")
905 (license license:lgpl2.1+)))
907 (define-public libostree
914 "https://github.com/ostreedev/ostree/releases/download/v"
915 (version-major+minor version) "/libostree-" version ".tar.xz"))
918 "01mygpkbl9sk2vr3hjbpih6qlg8lwx0q5lklm09f7jfwfpnwyqzj"))))
919 (build-system gnu-build-system)
922 (modify-phases %standard-phases
923 (add-before 'check 'pre-check
925 ;; Don't try to use the non-existing '/var/tmp' as test
927 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
930 ;; tap-driver.sh: internal error getting exit status
931 ;; tap-driver.sh: fatal: I/O or internal error
934 `(("attr" ,attr) ; for tests
936 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
937 ("gobject-introspection" ,gobject-introspection)
938 ("pkg-config" ,pkg-config)
939 ("xsltproc" ,libxslt)))
942 ("docbook-xml" ,docbook-xml-4.2)
943 ("docbook-xsl" ,docbook-xsl)
944 ("e2fsprogs" ,e2fsprogs)
948 ("libarchive" ,libarchive)
950 ("nettle" ,nettle) ; required by 'libarchive.la'
951 ("util-linux" ,util-linux)))
952 (home-page "https://ostree.readthedocs.io/en/latest/")
953 (synopsis "Operating system and container binary deployment and upgrades")
955 "@code{libostree} is both a shared library and suite of command line
956 tools that combines a \"git-like\" model for committing and downloading
957 bootable filesystem trees, along with a layer for deploying them and managing
958 the bootloader configuration.")
959 (license license:lgpl2.0+)))
961 (define-public flatpak
968 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
969 version "/flatpak-" version ".tar.xz"))
972 "0bkjwh49kajyd78vdh0g9arb352a7rccaifas9zxa78phhja2v2p"))))
973 (build-system gnu-build-system)
975 '(#:tests? #f ;; Tests fail due to trying to create files where it can't.
976 #:configure-flags (list
977 "--enable-documentation=no" ;; FIXME
978 "--enable-system-helper=no"
979 "--localstatedir=/var"
980 (string-append "--with-system-bubblewrap="
981 (assoc-ref %build-inputs "bubblewrap")
983 (native-inputs `(("bison" ,bison)
984 ("gettext" ,gnu-gettext)
985 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
986 ("gobject-introspection" ,gobject-introspection)
988 ("pkg-config" ,pkg-config)))
989 (inputs `(("appstream-glib" ,appstream-glib)
990 ("bubblewrap" ,bubblewrap)
991 ("gdk-pixbuf" ,gdk-pixbuf)
993 ("json-glib" ,json-glib)
994 ("libarchive" ,libarchive)
995 ("libostree" ,libostree)
996 ("libseccomp" ,libseccomp)
1001 ("util-linux" ,util-linux)))
1002 (home-page "https://flatpak.org")
1003 (synopsis "System for building, distributing, and running sandboxed desktop
1005 (description "Flatpak is a system for building, distributing, and running
1006 sandboxed desktop applications on GNU/Linux.")
1007 (license license:lgpl2.1+)))