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 Eric Bavier <bavier@member.fsf.org>
12 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019 Vagrant Cascadian <vagrant@reproducible-builds.org>
15 ;;; This file is part of GNU Guix.
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30 (define-module (gnu packages package-management)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages acl)
33 #:use-module (gnu packages attr)
34 #:use-module (gnu packages avahi)
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages backup)
37 #:use-module (gnu packages base)
38 #:use-module (gnu packages bdw-gc)
39 #:use-module (gnu packages bison)
40 #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
41 #:use-module (gnu packages check)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages cpio)
44 #:use-module (gnu packages crypto)
45 #:use-module (gnu packages curl)
46 #:use-module (gnu packages dbm)
47 #:use-module (gnu packages docbook)
48 #:use-module (gnu packages file)
49 #:use-module (gnu packages gettext)
50 #:use-module (gnu packages glib)
51 #:use-module (gnu packages gnome)
52 #:use-module (gnu packages gnupg)
53 #:use-module (gnu packages graphviz)
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages guile)
56 #:use-module (gnu packages guile-xyz)
57 #:use-module (gnu packages linux)
58 #:use-module (gnu packages lisp)
59 #:use-module (gnu packages man)
60 #:use-module (gnu packages nettle)
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 "0.16.0")
113 (commit "f970946c1d3dc6d20bd48ec6f42c82a43bb7696f")
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 "0v7qj2i9n52l1di8vk15nqdrlapfc22pcf5jl56fp4mqpq48ddrj"))
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")
140 (string-append "--with-libgcrypt-prefix="
141 (assoc-ref %build-inputs
144 ;; Set 'DOT_USER_PROGRAM' to the empty string so
145 ;; we don't keep a reference to Graphviz, whose
146 ;; closure is pretty big (too big for the Guix
147 ;; system installation image.)
148 "ac_cv_path_DOT_USER_PROGRAM=dot"
150 ;; To avoid problems with the length of shebangs,
151 ;; choose a fixed-width and short directory name
153 "ac_cv_guix_test_root=/tmp/guix-tests")
154 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
156 #:modules ((guix build gnu-build-system)
162 #:phases (modify-phases %standard-phases
165 ;; Make sure 'msgmerge' can modify the PO files.
166 (for-each (lambda (po)
168 (find-files "." "\\.po$"))
170 (patch-shebang "build-aux/git-version-gen")
172 (call-with-output-file ".tarball-version"
174 (display ,version port)))
176 (invoke "sh" "bootstrap")))
177 (add-before 'check 'copy-bootstrap-guile
178 (lambda* (#:key system inputs #:allow-other-keys)
179 ;; Copy the bootstrap guile tarball in the store used
180 ;; by the test suite.
181 (define (intern tarball)
182 (let ((base (strip-store-file-name tarball)))
183 (copy-file tarball base)
184 (invoke "./test-env" "guix" "download"
185 (string-append "file://" (getcwd)
190 (intern (assoc-ref inputs "boot-guile"))
192 ;; On x86_64 some tests need the i686 Guile.
193 ,@(if (and (not (%current-target-system))
194 (string=? (%current-system)
196 '((intern (assoc-ref inputs "boot-guile/i686")))
199 (add-after 'unpack 'disable-failing-tests
200 ;; XXX FIXME: These tests fail within the build container.
202 (substitute* "tests/syscalls.scm"
203 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
204 (string-append "(test-skip 1)\n" all)))
205 (substitute* "tests/containers.scm"
206 (("^\\(test-(assert|equal)" all)
207 (string-append "(test-skip 1)\n" all)))
208 (when (file-exists? "tests/guix-environment-container.sh")
209 (substitute* "tests/guix-environment-container.sh"
210 (("guix environment --version")
213 (add-before 'check 'set-SHELL
215 ;; 'guix environment' tests rely on 'SHELL' having a
216 ;; correct value, so set it.
217 (setenv "SHELL" (which "sh"))
219 (add-after 'install 'wrap-program
220 (lambda* (#:key inputs outputs #:allow-other-keys)
221 ;; Make sure the 'guix' command finds GnuTLS,
222 ;; Guile-JSON, and Guile-Git automatically.
223 (let* ((out (assoc-ref outputs "out"))
224 (guile (assoc-ref inputs "guile"))
225 (gcrypt (assoc-ref inputs "guile-gcrypt"))
226 (json (assoc-ref inputs "guile-json"))
227 (sqlite (assoc-ref inputs "guile-sqlite3"))
228 (git (assoc-ref inputs "guile-git"))
229 (bs (assoc-ref inputs
230 "guile-bytestructures"))
231 (ssh (assoc-ref inputs "guile-ssh"))
232 (gnutls (assoc-ref inputs "gnutls"))
233 (locales (assoc-ref inputs "glibc-utf8-locales"))
234 (deps (list gcrypt json sqlite gnutls
238 (open-pipe* OPEN_READ
239 (string-append guile "/bin/guile")
240 "-c" "(display (effective-version))")))
242 (map (cut string-append <>
248 (map (cut string-append <>
249 "/lib/guile/" effective
253 (locpath (string-append locales "/lib/locale")))
255 (wrap-program (string-append out "/bin/guix")
256 `("GUILE_LOAD_PATH" ":" prefix (,path))
257 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
258 `("GUIX_LOCPATH" ":" suffix (,locpath)))
261 (native-inputs `(("pkg-config" ,pkg-config)
263 ;; XXX: Keep the development inputs here even though
264 ;; they're unnecessary, just so that 'guix environment
265 ;; guix' always contains them.
266 ("autoconf" ,autoconf-wrapper)
267 ("automake" ,automake)
268 ("gettext" ,gettext-minimal)
270 ("graphviz" ,graphviz)
271 ("help2man" ,help2man)
276 ("zlib" ,zlib) ;for 'guix publish'
279 ("libgcrypt" ,libgcrypt)
283 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
285 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
286 ;; Some of the tests use "unshare" when it is available.
287 ("util-linux" ,util-linux)
288 ,@(if (and (not (%current-target-system))
289 (string=? (%current-system) "x86_64-linux"))
290 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
293 ("glibc-utf8-locales" ,glibc-utf8-locales)))
296 ("guile-gcrypt" ,guile-gcrypt)
297 ("guile-json" ,guile-json)
298 ("guile-sqlite3" ,guile-sqlite3)
299 ("guile-ssh" ,guile-ssh)
300 ("guile-git" ,guile-git)))
302 (home-page "https://www.gnu.org/software/guix/")
303 (synopsis "Functional package manager for installed software packages and versions")
305 "GNU Guix is a functional package manager for the GNU system, and is
306 also a distribution thereof. It includes a virtual machine image. Besides
307 the usual package management features, it also supports transactional
308 upgrades and roll-backs, per-user profiles, and much more. It is based on
309 the Nix package manager.")
310 (license license:gpl3+)
311 (properties '((ftp-server . "alpha.gnu.org"))))))
313 (define-public guix-daemon
314 ;; This package is for internal consumption: it allows us to quickly build
315 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
319 (properties `((hidden? . #t)))
322 ;; Use a minimum set of dependencies.
324 (fold alist-delete (package-native-inputs guix)
325 '("po4a" "graphviz" "help2man")))
328 ("guile-git" ,guile-git)
329 ("guile-json" ,guile-json)
330 ("guile-gcrypt" ,guile-gcrypt)
331 ,@(fold alist-delete (package-inputs guix)
332 '("boot-guile" "boot-guile/i686" "util-linux"))))
334 (propagated-inputs '())
337 (substitute-keyword-arguments (package-arguments guix)
338 ((#:configure-flags flags '())
339 ;; Pretend we have those libraries; we don't actually need them.
341 '("guix_cv_have_recent_guile_sqlite3=yes"
342 "guix_cv_have_recent_guile_ssh=yes")))
345 ((#:phases phases '%standard-phases)
346 `(modify-phases ,phases
349 (invoke "make" "nix/libstore/schema.sql.hh")
350 (invoke "make" "-j" (number->string
351 (parallel-job-count))
353 (delete 'copy-bootstrap-guile)
355 (lambda* (#:key outputs #:allow-other-keys)
356 (invoke "make" "install-binPROGRAMS"
357 "install-nodist_pkglibexecSCRIPTS")
359 ;; We need to tell 'guix-daemon' which 'guix' command to use.
360 ;; Here we use a questionable hack where we hard-code root's
361 ;; current guix, which could be wrong (XXX). Note that scripts
362 ;; like 'guix perform-download' do not run as root so we assume
363 ;; that they have access to /var/guix/profiles/per-user/root.
364 (let ((out (assoc-ref outputs "out")))
365 (substitute* (find-files (string-append out "/libexec"))
366 (("exec \".*/bin/guix\"")
367 "exec \"${GUIX:-/var/guix/profiles/per-user/root/current-guix/bin/guix}\""))
369 (delete 'wrap-program)))))))
371 (define-public guile2.0-guix
372 (deprecated-package "guile2.0-guix" guix))
374 (define-public guix-minimal
375 ;; A version of Guix which is built with the minimal set of dependencies, as
376 ;; outlined in the README "Requirements" section. Intended as a CI job, so
381 (name "guix-minimal")
383 `(("guile" ,guile-2.2)
384 ,@(alist-delete "guile" (package-inputs guix))))
387 (package-propagated-inputs guix)
390 (define (source-file? file stat)
391 "Return true if FILE is likely a source file, false if it is a typical
393 (define (wrong-extension? file)
394 (or (string-suffix? "~" file)
395 (member (file-extension file)
396 '("o" "a" "lo" "so" "go"))))
398 (match (basename file)
399 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
401 ((? wrong-extension?)
406 (define-public current-guix-package
407 ;; This parameter allows callers to override the package that 'current-guix'
408 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
409 ;; for instance because it's not running from a source code checkout.
412 (define-public current-guix
413 (let* ((repository-root (delay (canonicalize-path
414 (string-append (current-source-directory)
416 (select? (delay (or (git-predicate (force repository-root))
419 "Return a package representing Guix built from the current source tree.
420 This works by adding the current source tree to the store (after filtering it
421 out) and returning a package that uses that as its 'source'."
422 (or (current-guix-package)
425 (version (string-append (package-version guix) "+"))
426 (source (local-file (force repository-root) "guix-current"
428 #:select? (force select?))))))))
441 (uri (string-append "http://nixos.org/releases/nix/nix-"
442 version "/nix-" version ".tar.xz"))
445 "0ss9svxlh1pvrdmnqjvjyqjmbqmrdbyfarvbb14i9d4bggzl0r8n"))))
446 (build-system gnu-build-system)
447 (native-inputs `(("pkg-config" ,pkg-config)))
448 (inputs `(("curl" ,curl)
451 ("libseccomp" ,libseccomp)
452 ("libsodium" ,libsodium)
456 (home-page "https://nixos.org/nix/")
457 (synopsis "The Nix package manager")
459 "Nix is a purely functional package manager. This means that it treats
460 packages like values in purely functional programming languages such as
461 Haskell—they are built by functions that don't have side-effects, and they
462 never change after they have been built. Nix stores packages in the Nix
463 store, usually the directory /nix/store, where each package has its own unique
465 (license license:lgpl2.1+)))
473 (uri (string-append "mirror://gnu/stow/stow-"
477 "1pvky9fayms4r6fhns8jd0vavszd7d979w62vfd5n88v614pdxz2"))))
478 (build-system gnu-build-system)
482 `(("perl-test-simple" ,perl-test-simple)
483 ("perl-test-output" ,perl-test-output)
484 ("perl-capture-tiny" ,perl-capture-tiny)
485 ("perl-io-stringy" ,perl-io-stringy)))
486 (home-page "https://www.gnu.org/software/stow/")
487 (synopsis "Managing installed software packages")
489 "GNU Stow is a symlink manager. It generates symlinks to directories
490 of data and makes them appear to be merged into the same directory. It is
491 typically used for managing software packages installed from source, by
492 letting you install them apart in distinct directories and then create
493 symlinks to the files in a common directory such as /usr/local.")
494 (license license:gpl2+)))
502 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
503 (version-major+minor version) ".x/rpm-"
507 "0armd7dqr8bl0isx8l4xlylm7dikasmxhhcbz336fkp2x30w5jw0"))))
508 (build-system gnu-build-system)
510 '(#:configure-flags '("--with-external-db" ;use the system's bdb
513 #:phases (modify-phases %standard-phases
514 (add-before 'configure 'set-nss-library-path
515 (lambda* (#:key inputs #:allow-other-keys)
516 (let ((nss (assoc-ref inputs "nss")))
517 (setenv "LIBRARY_PATH"
518 (string-append (getenv "LIBRARY_PATH") ":"
522 `(("pkg-config" ,pkg-config)))
524 `(("python" ,python-2)
530 ("libarchive" ,libarchive)
531 ("nettle" ,nettle) ;XXX: actually a dependency of libarchive
536 (home-page "http://rpm.org/")
537 (synopsis "The RPM Package Manager")
539 "The RPM Package Manager (RPM) is a command-line driven package
540 management system capable of installing, uninstalling, verifying, querying,
541 and updating computer software packages. Each software package consists of an
542 archive of files along with information about the package like its version, a
543 description. There is also a library permitting developers to manage such
544 transactions from C or Python.")
546 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
547 (license license:gpl2+)))
549 (define-public diffoscope
555 (uri (pypi-uri name version))
558 "10wjri6vsqxf2nb7jjhsq38qlpf407b4qrdczrk696aa1v71i44w"))))
559 (build-system python-build-system)
561 `(#:phases (modify-phases %standard-phases
562 ;; setup.py mistakenly requires python-magic from PyPi, even
563 ;; though the Python bindings of `file` are sufficient.
564 ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844
565 (add-after 'unpack 'dependency-on-python-magic
567 (substitute* "setup.py"
568 (("'python-magic',") ""))))
569 ;; This test is broken because our `file` package has a
570 ;; bug in berkeley-db file type detection.
571 (add-after 'unpack 'remove-berkeley-test
573 (delete-file "tests/comparators/test_berkeley_db.py")
575 (add-after 'unpack 'embed-tool-references
576 (lambda* (#:key inputs #:allow-other-keys)
577 (substitute* "diffoscope/comparators/utils/compare.py"
579 (string-append "['" (which "xxd") "',")))
580 (substitute* "diffoscope/comparators/elf.py"
581 (("@tool_required\\('readelf'\\)") "")
582 (("get_tool_name\\('readelf'\\)")
583 (string-append "'" (which "readelf") "'")))
584 (substitute* "diffoscope/comparators/directory.py"
585 (("@tool_required\\('stat'\\)") "")
586 (("@tool_required\\('getfacl'\\)") "")
588 (string-append "['" (which "stat") "',"))
590 (string-append "['" (which "getfacl") "',")))
592 (add-before 'check 'delete-failing-test
594 (delete-file "tests/test_tools.py") ;this requires /sbin to be on the path
596 (inputs `(("rpm" ,rpm) ;for rpm-python
597 ("python-file" ,python-file)
598 ("python-debian" ,python-debian)
599 ("python-libarchive-c" ,python-libarchive-c)
600 ("python-tlsh" ,python-tlsh)
601 ("acl" ,acl) ;for getfacl
602 ("colordiff" ,colordiff)
605 ;; Below are modules used for tests.
606 ("python-pytest" ,python-pytest)
607 ("python-chardet" ,python-chardet)))
608 (home-page "https://diffoscope.org/")
609 (synopsis "Compare files, archives, and directories in depth")
611 "Diffoscope tries to get to the bottom of what makes files or directories
612 different. It recursively unpacks archives of many kinds and transforms
613 various binary formats into more human readable forms to compare them. It can
614 compare two tarballs, ISO images, or PDFs just as easily.")
615 (license license:gpl3+)))
617 (define-public trydiffoscope
619 (name "trydiffoscope")
625 (url "https://salsa.debian.org/reproducible-builds/trydiffoscope.git")
627 (file-name (git-file-name name version))
630 "03b66cjii7l2yiwffj6ym6mycd5drx7prfp4j2550281pias6mjh"))))
633 (modify-phases %standard-phases
634 (add-after 'install 'install-doc
635 (lambda* (#:key outputs #:allow-other-keys)
636 (let* ((share (string-append (assoc-ref outputs "out") "/share/")))
637 (mkdir-p (string-append share "/man/man1/" ))
639 "trydiffoscope.1.rst"
640 (string-append share "/man/man1/trydiffoscope.1"))
641 (mkdir-p (string-append share "/doc/" ,name "-" ,version))
642 (install-file "./README.rst"
643 (string-append share "/doc/" ,name "-" ,version)))
646 `(("python-requests" ,python-requests)))
649 ("python-docutils" ,python-docutils)))
650 (build-system python-build-system)
651 (home-page "https://try.diffoscope.org")
652 (synopsis "Client for remote diffoscope service")
653 (description "This is a client for the @url{https://try.diffoscope.org,
654 remote diffoscope service}.
656 Diffoscope tries to get to the bottom of what makes files or directories
657 different. It recursively unpacks archives of many kinds and transforms
658 various binary formats into more human readable forms to compare them. It can
659 compare two tarballs, ISO images, or PDFs just as easily.
661 Results are displayed by default, stored as local text or html files, or made
662 available via a URL on @url{https://try.diffoscope.org}. Results stored on the
663 server are purged after 30 days.")
664 (license license:gpl3+)))
666 (define-public python-anaconda-client
668 (name "python-anaconda-client")
673 (uri (string-append "https://github.com/Anaconda-Platform/"
674 "anaconda-client/archive/" version ".tar.gz"))
675 (file-name (string-append name "-" version ".tar.gz"))
678 "1wv4wi6k5jz7rlwfgvgfdizv77x3cr1wa2aj0k1595g7fbhkjhz2"))))
679 (build-system python-build-system)
681 `(("python-pyyaml" ,python-pyyaml)
682 ("python-requests" ,python-requests)
683 ("python-clyent" ,python-clyent)))
685 `(("python-pytz" ,python-pytz)
686 ("python-dateutil" ,python-dateutil)
687 ("python-mock" ,python-mock)
688 ("python-coverage" ,python-coverage)
689 ("python-pillow" ,python-pillow)))
692 (modify-phases %standard-phases
693 ;; This is needed for some tests.
694 (add-before 'check 'set-up-home
695 (lambda* _ (setenv "HOME" "/tmp") #t))
696 (add-before 'check 'remove-network-tests
698 ;; Remove tests requiring a network connection
699 (let ((network-tests '("tests/test_upload.py"
700 "tests/test_authorizations.py"
701 "tests/test_login.py"
702 "tests/test_whoami.py"
703 "utils/notebook/tests/test_data_uri.py"
704 "utils/notebook/tests/test_base.py"
705 "utils/notebook/tests/test_downloader.py"
706 "inspect_package/tests/test_conda.py")))
707 (with-directory-excursion "binstar_client"
708 (for-each delete-file network-tests)))
710 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
711 (synopsis "Anaconda Cloud command line client library")
713 "Anaconda Cloud command line client library provides an interface to
714 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
716 (license license:bsd-3)))
718 (define-public python2-anaconda-client
719 (package-with-python2 python-anaconda-client))
721 (define-public python-conda
723 (name "python-conda")
728 (uri (string-append "https://github.com/conda/conda/archive/"
730 (file-name (string-append name "-" version ".tar.gz"))
733 "1jq8hyrc5npb5sf4vw6s6by4602yj8f79vzpbwdfgpkn02nfk1dv"))))
734 (build-system python-build-system)
737 (modify-phases %standard-phases
738 (add-before 'build 'create-version-file
740 (with-output-to-file "conda/.version"
741 (lambda () (display ,version)))
743 (add-before 'check 'remove-failing-tests
745 ;; These tests require internet/network access
746 (let ((network-tests '("test_cli.py"
754 "conda_env/test_cli.py"
755 "conda_env/test_create.py"
756 "conda_env/specs/test_notebook.py"
757 "conda_env/utils/test_notebooks.py"
759 "core/test_repodata.py")))
760 (with-directory-excursion "tests"
761 (for-each delete-file network-tests)
763 ;; FIXME: This test creates a file, then deletes it and tests
764 ;; that the file was deleted. For some reason it fails when
765 ;; building with guix, but does not when you run it in the
766 ;; directory left when you build with the --keep-failed
768 (delete-file "gateways/disk/test_delete.py")
772 (setenv "HOME" "/tmp")
773 (invoke "py.test"))))))
775 `(("python-cytoolz" ,python-cytoolz)
776 ("python-ruamel.yaml" ,python-ruamel.yaml)
777 ("python-requests" ,python-requests)
778 ("python-pycosat" ,python-pycosat)
779 ("python-pytest" ,python-pytest)
780 ("python-responses" ,python-responses)
781 ("python-pyyaml" ,python-pyyaml)
782 ("python-anaconda-client" ,python-anaconda-client)))
783 (home-page "https://github.com/conda/conda")
784 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
786 "Conda is a cross-platform, Python-agnostic binary package manager. It
787 is the package manager used by Anaconda installations, but it may be used for
788 other systems as well. Conda makes environments first-class citizens, making
789 it easy to create independent environments even for C libraries. Conda is
790 written entirely in Python.
792 This package provides Conda as a library.")
793 (license license:bsd-3)))
795 (define-public python2-conda
796 (let ((base (package-with-python2
797 (strip-python2-variant python-conda))))
798 (package (inherit base)
800 `(("python2-enum34" ,python2-enum34)
801 ,@(package-native-inputs base))))))
804 (package (inherit python-conda)
807 (substitute-keyword-arguments (package-arguments python-conda)
809 `(modify-phases ,phases
811 (lambda* (#:key outputs #:allow-other-keys)
812 ;; This test fails when run before installation.
813 (delete-file "tests/test_activate.py")
815 ;; Fix broken defaults
816 (substitute* "conda/base/context.py"
817 (("return sys.prefix")
818 (string-append "return \"" (assoc-ref outputs "out") "\""))
819 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
820 (string-append "return False if self.root_prefix == self.conda_prefix else "
823 ;; The util/setup-testing.py is used to build conda in
824 ;; application form, rather than the default, library form.
825 ;; With this, we are able to run commands like `conda --help`
826 ;; directly on the command line
827 (invoke "python" "utils/setup-testing.py" "build_py")))
829 (lambda* (#:key inputs outputs #:allow-other-keys)
830 (let* ((out (assoc-ref outputs "out"))
831 (target (string-append out "/lib/python"
832 ((@@ (guix build python-build-system)
834 (assoc-ref inputs "python"))
836 ;; The installer aborts if the target directory is not on
839 (string-append target ":" (getenv "PYTHONPATH")))
841 ;; And it aborts if the directory doesn't exist.
843 (invoke "python" "utils/setup-testing.py" "install"
844 (string-append "--prefix=" out)))))
845 ;; The "activate" and "deactivate" scripts don't need wrapping.
846 ;; They also break when they are renamed.
847 (add-after 'wrap 'undo-wrap
848 (lambda* (#:key outputs #:allow-other-keys)
849 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
850 (delete-file "deactivate")
851 (rename-file ".deactivate-real" "deactivate")
852 (delete-file "activate")
853 (rename-file ".activate-real" "activate")
856 "Conda is a cross-platform, Python-agnostic binary package manager. It
857 is the package manager used by Anaconda installations, but it may be used for
858 other systems as well. Conda makes environments first-class citizens, making
859 it easy to create independent environments even for C libraries. Conda is
860 written entirely in Python.")))
868 (uri (string-append "https://www.guixwl.org/releases/gwl-"
872 "06pm967mq1wyggx7l0nfapw5s0k5qc5r9lawk2v3db868br779a7"))))
873 (build-system gnu-build-system)
875 `(("autoconf" ,autoconf)
876 ("automake" ,automake)
877 ("pkg-config" ,pkg-config)))
879 `(("guile" ,guile-2.2)))
882 ("guile-commonmark" ,guile-commonmark)))
883 (home-page "https://www.guixwl.org")
884 (synopsis "Workflow management extension for GNU Guix")
885 (description "This project provides two subcommands to GNU Guix and
886 introduces two record types that provide a workflow management extension built
887 on top of GNU Guix.")
888 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
889 ;; the web interface modules in gwl/ are licensed AGPL3+,
890 ;; and the fonts included in this package are licensed OFL1.1.
891 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
899 (uri (string-append "mirror://gnome/sources/gcab/"
900 version "/gcab-" version ".tar.xz"))
903 "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"))))
904 (build-system meson-build-system)
906 `(("glib:bin" ,glib "bin") ; for glib-mkenums
907 ("intltool" ,intltool)
908 ("pkg-config" ,pkg-config)
915 ;; XXX This ‘documentation’ is for developers, and fails informatively:
916 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
918 "-Dintrospection=false")))
919 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
920 (synopsis "Microsoft Cabinet file manipulation library")
922 "The libgcab library provides GObject functions to read, write, and modify
923 Microsoft cabinet (.@dfn{CAB}) files.")
924 (license (list license:gpl2+ ; tests/testsuite.at
925 license:lgpl2.1+)))) ; the rest
927 (define-public msitools
933 (uri (string-append "mirror://gnome/sources/msitools/"
934 version "/msitools-" version ".tar.xz"))
937 "0d9nidn5zc81bc30w119933rn2g87mrsqyqkndg20srkbsd96xfl"))))
938 (build-system gnu-build-system)
941 ("pkg-config" ,pkg-config)))
947 ("uuid" ,util-linux)))
948 (home-page "https://wiki.gnome.org/msitools")
949 (synopsis "Windows Installer file manipulation tool")
951 "msitools is a collection of command-line tools to inspect, extract, build,
952 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
953 for packaging and deployment of cross-compiled Windows applications.")
954 (license license:lgpl2.1+)))
956 (define-public libostree
963 "https://github.com/ostreedev/ostree/releases/download/v"
964 (version-major+minor version) "/libostree-" version ".tar.xz"))
967 "01mygpkbl9sk2vr3hjbpih6qlg8lwx0q5lklm09f7jfwfpnwyqzj"))))
968 (build-system gnu-build-system)
971 (modify-phases %standard-phases
972 (add-before 'check 'pre-check
974 ;; Don't try to use the non-existing '/var/tmp' as test
976 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
979 ;; tap-driver.sh: internal error getting exit status
980 ;; tap-driver.sh: fatal: I/O or internal error
983 `(("attr" ,attr) ; for tests
985 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
986 ("gobject-introspection" ,gobject-introspection)
987 ("pkg-config" ,pkg-config)
988 ("xsltproc" ,libxslt)))
991 ("docbook-xml" ,docbook-xml-4.2)
992 ("docbook-xsl" ,docbook-xsl)
993 ("e2fsprogs" ,e2fsprogs)
997 ("libarchive" ,libarchive)
999 ("nettle" ,nettle) ; required by 'libarchive.la'
1000 ("util-linux" ,util-linux)))
1001 (home-page "https://ostree.readthedocs.io/en/latest/")
1002 (synopsis "Operating system and container binary deployment and upgrades")
1004 "@code{libostree} is both a shared library and suite of command line
1005 tools that combines a \"git-like\" model for committing and downloading
1006 bootable filesystem trees, along with a layer for deploying them and managing
1007 the bootloader configuration.")
1008 (license license:lgpl2.0+)))
1010 (define-public flatpak
1017 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
1018 version "/flatpak-" version ".tar.xz"))
1021 "1qf3ys84fzv11z6f6li59rxjdjbyrv7cyi9539k73r9i9pckjr8v"))))
1023 ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
1024 ;; find the TLS backend in glib-networking.
1025 (build-system glib-or-gtk-build-system)
1028 '(#:tests? #f ;; Tests fail due to trying to create files where it can't.
1029 #:configure-flags (list
1030 "--enable-documentation=no" ;; FIXME
1031 "--enable-system-helper=no"
1032 "--localstatedir=/var"
1033 (string-append "--with-system-bubblewrap="
1034 (assoc-ref %build-inputs "bubblewrap")
1036 (native-inputs `(("bison" ,bison)
1037 ("gettext" ,gnu-gettext)
1038 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
1039 ("gobject-introspection" ,gobject-introspection)
1041 ("pkg-config" ,pkg-config)))
1042 (propagated-inputs `(("glib-networking" ,glib-networking)
1044 ("gsettings-desktop-schemas"
1045 ,gsettings-desktop-schemas)))
1046 (inputs `(("appstream-glib" ,appstream-glib)
1047 ("bubblewrap" ,bubblewrap)
1049 ("gdk-pixbuf" ,gdk-pixbuf)
1051 ("json-glib" ,json-glib)
1052 ("libarchive" ,libarchive)
1053 ("libostree" ,libostree)
1054 ("libseccomp" ,libseccomp)
1055 ("libsoup" ,libsoup)
1057 ("libxml2" ,libxml2)
1059 ("util-linux" ,util-linux)))
1060 (home-page "https://flatpak.org")
1061 (synopsis "System for building, distributing, and running sandboxed desktop
1063 (description "Flatpak is a system for building, distributing, and running
1064 sandboxed desktop applications on GNU/Linux.")
1065 (license license:lgpl2.1+)))