1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015, 2017, 2020 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, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
9 ;;; Copyright © 2018, 2019 Rutger Helling <rhelling@mykolab.com>
10 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
11 ;;; Copyright © 2018, 2019 Eric Bavier <bavier@member.fsf.org>
12 ;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
14 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
15 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages package-management)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages acl)
35 #:use-module (gnu packages attr)
36 #:use-module (gnu packages avahi)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages backup)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages bdw-gc)
41 #:use-module (gnu packages bison)
42 #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
43 #:use-module (gnu packages check)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages cpio)
46 #:use-module (gnu packages crypto)
47 #:use-module (gnu packages curl)
48 #:use-module (gnu packages dbm)
49 #:use-module (gnu packages docbook)
50 #:use-module (gnu packages file)
51 #:use-module (gnu packages gettext)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gnome)
54 #:use-module (gnu packages gnupg)
55 #:use-module (gnu packages graphviz)
56 #:use-module (gnu packages gtk)
57 #:use-module (gnu packages guile)
58 #:use-module (gnu packages guile-xyz)
59 #:use-module (gnu packages linux)
60 #:use-module (gnu packages lisp)
61 #:use-module (gnu packages man)
62 #:use-module (gnu packages nettle)
63 #:use-module (gnu packages nss)
64 #:use-module (gnu packages patchutils)
65 #:use-module (gnu packages perl)
66 #:use-module (gnu packages perl-check)
67 #:use-module (gnu packages pkg-config)
68 #:use-module (gnu packages popt)
69 #:use-module (gnu packages python)
70 #:use-module (gnu packages python-web)
71 #:use-module (gnu packages python-xyz)
72 #:use-module (gnu packages serialization)
73 #:use-module (gnu packages sqlite)
74 #:use-module (gnu packages ssh)
75 #:use-module (gnu packages texinfo)
76 #:use-module (gnu packages time)
77 #:use-module (gnu packages tls)
78 #:use-module (gnu packages vim)
79 #:use-module (gnu packages virtualization)
80 #:use-module (gnu packages web)
81 #:use-module (gnu packages xml)
82 #:use-module (gnu packages xorg)
83 #:use-module (guix build-system glib-or-gtk)
84 #:use-module (guix build-system gnu)
85 #:use-module (guix build-system meson)
86 #:use-module (guix build-system python)
87 #:use-module (guix download)
88 #:use-module (guix gexp)
89 #:use-module (guix git-download)
90 #:use-module ((guix licenses) #:prefix license:)
91 #:use-module (guix packages)
92 #:use-module (guix utils)
93 #:use-module (ice-9 match)
94 #:use-module (srfi srfi-1))
96 (define (boot-guile-uri arch)
97 "Return the URI for the bootstrap Guile tarball for ARCH."
98 (cond ((string=? "armhf" arch)
99 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
101 "/20150101/guile-2.0.11.tar.xz"))
102 ((string=? "aarch64" arch)
103 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
104 arch "-linux/20170217/guile-2.0.14.tar.xz"))
106 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
108 "/20131110/guile-2.0.9.tar.xz"))))
111 ;; Latest version of Guix, which may or may not correspond to a release.
112 ;; Note: the 'update-guix-package.scm' script expects this definition to
113 ;; start precisely like this.
114 (let ((version "1.1.0")
115 (commit "7dd05396ef4539165f955d9ab57225091f801ce9")
120 (version (if (zero? revision)
122 (string-append version "-"
123 (number->string revision)
124 "." (string-take commit 7))))
128 (url "https://git.savannah.gnu.org/r/guix.git")
132 "110fz4qay4iywpynw1cbv6if8ac0pxp21zhzwvnp2jn1f6vbwf64"))
133 (file-name (string-append "guix-" version "-checkout"))))
134 (build-system gnu-build-system)
136 `(#:configure-flags (list
137 "--localstatedir=/var"
139 (string-append "--with-bash-completion-dir="
140 (assoc-ref %outputs "out")
141 "/etc/bash_completion.d")
143 ;; Set 'DOT_USER_PROGRAM' to the empty string so
144 ;; we don't keep a reference to Graphviz, whose
145 ;; closure is pretty big (too big for the Guix
146 ;; system installation image.)
147 "ac_cv_path_DOT_USER_PROGRAM=dot"
149 ;; To avoid problems with the length of shebangs,
150 ;; choose a fixed-width and short directory name
152 "ac_cv_guix_test_root=/tmp/guix-tests")
153 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
155 #:modules ((guix build gnu-build-system)
161 #:phases (modify-phases %standard-phases
164 ;; Make sure 'msgmerge' can modify the PO files.
165 (for-each (lambda (po)
167 (find-files "." "\\.po$"))
169 (patch-shebang "build-aux/git-version-gen")
171 (call-with-output-file ".tarball-version"
173 (display ,version port)))
175 ;; Install SysV init files to $(prefix)/etc rather
177 (substitute* "nix/local.mk"
178 (("^sysvinitservicedir = .*$")
179 (string-append "sysvinitservicedir = \
180 $(prefix)/etc/init.d\n")))
182 (invoke "sh" "bootstrap")))
183 (add-before 'check 'copy-bootstrap-guile
184 (lambda* (#:key system inputs #:allow-other-keys)
185 ;; Copy the bootstrap guile tarball in the store used
186 ;; by the test suite.
187 (define (intern file recursive?)
188 ;; Note: don't use 'guix download' here because we
189 ;; need to set the 'recursive?' argument.
191 (strip-store-file-name file))
197 (let* ((item (add-to-store store ,base
200 (root (string-append "/tmp/gc-root-"
202 ;; Register a root so that the GC tests
203 ;; don't delete those.
205 (add-indirect-root store root)))))
207 (invoke "./test-env" "guile" "-c"
208 (object->string code)))
210 (intern (assoc-ref inputs "boot-guile") #f)
212 ;; On x86_64 some tests need the i686 Guile.
213 ,@(if (and (not (%current-target-system))
214 (string=? (%current-system)
216 '((intern (assoc-ref inputs "boot-guile/i686") #f))
219 ;; Copy the bootstrap executables.
220 (for-each (lambda (input)
221 (intern (assoc-ref inputs input) #t))
222 '("bootstrap/bash" "bootstrap/mkdir"
223 "bootstrap/tar" "bootstrap/xz"))
225 (add-after 'unpack 'disable-failing-tests
226 ;; XXX FIXME: These tests fail within the build container.
228 (substitute* "tests/syscalls.scm"
229 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
230 (string-append "(test-skip 1)\n" all)))
231 (substitute* "tests/containers.scm"
232 (("^\\(test-(assert|equal)" all)
233 (string-append "(test-skip 1)\n" all)))
234 (when (file-exists? "tests/guix-environment-container.sh")
235 (substitute* "tests/guix-environment-container.sh"
236 (("guix environment --version")
239 (add-before 'check 'set-SHELL
241 ;; 'guix environment' tests rely on 'SHELL' having a
242 ;; correct value, so set it.
243 (setenv "SHELL" (which "sh"))
245 (add-after 'install 'wrap-program
246 (lambda* (#:key inputs outputs #:allow-other-keys)
247 ;; Make sure the 'guix' command finds GnuTLS,
248 ;; Guile-JSON, and Guile-Git automatically.
249 (let* ((out (assoc-ref outputs "out"))
250 (guile (assoc-ref inputs "guile"))
251 (gcrypt (assoc-ref inputs "guile-gcrypt"))
252 (json (assoc-ref inputs "guile-json"))
253 (sqlite (assoc-ref inputs "guile-sqlite3"))
254 (git (assoc-ref inputs "guile-git"))
255 (bs (assoc-ref inputs
256 "guile-bytestructures"))
257 (ssh (assoc-ref inputs "guile-ssh"))
258 (gnutls (assoc-ref inputs "gnutls"))
259 (locales (assoc-ref inputs "glibc-utf8-locales"))
260 (deps (list gcrypt json sqlite gnutls
264 (open-pipe* OPEN_READ
265 (string-append guile "/bin/guile")
266 "-c" "(display (effective-version))")))
268 (map (cut string-append <>
274 (map (cut string-append <>
275 "/lib/guile/" effective
279 (locpath (string-append locales "/lib/locale")))
281 (wrap-program (string-append out "/bin/guix")
282 `("GUILE_LOAD_PATH" ":" prefix (,path))
283 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
284 `("GUIX_LOCPATH" ":" suffix (,locpath)))
287 (native-inputs `(("pkg-config" ,pkg-config)
289 ;; Guile libraries are needed here for
290 ;; cross-compilation.
293 ("guile-gcrypt" ,guile-gcrypt)
294 ("guile-json" ,guile-json-3)
295 ("guile-sqlite3" ,guile-sqlite3)
296 ("guile-ssh" ,guile-ssh)
297 ("guile-git" ,guile-git)
299 ;; XXX: Keep the development inputs here even though
300 ;; they're unnecessary, just so that 'guix environment
301 ;; guix' always contains them.
302 ("autoconf" ,autoconf-wrapper)
303 ("automake" ,automake)
304 ("gettext" ,gettext-minimal)
306 ("graphviz" ,graphviz)
307 ("help2man" ,help2man)
312 ("zlib" ,zlib) ;for 'guix publish'
313 ("lzlib" ,lzlib) ;for 'guix publish' and 'guix substitute'
316 ("libgcrypt" ,libgcrypt)
320 ;; Some of the tests use "unshare" when it is available.
321 ("util-linux" ,util-linux)
323 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
325 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
326 ,@(if (and (not (%current-target-system))
327 (string=? (%current-system) "x86_64-linux"))
328 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
331 ;; Tests also rely on these bootstrap executables.
332 ("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system)))
333 ("bootstrap/mkdir" ,(bootstrap-executable "mkdir" (%current-system)))
334 ("bootstrap/tar" ,(bootstrap-executable "tar" (%current-system)))
335 ("bootstrap/xz" ,(bootstrap-executable "xz" (%current-system)))
337 ("glibc-utf8-locales" ,glibc-utf8-locales)))
339 `(("gnutls" ,guile3.0-gnutls)
340 ("guile-gcrypt" ,guile-gcrypt)
341 ("guile-json" ,guile-json-3)
342 ("guile-sqlite3" ,guile-sqlite3)
343 ("guile-ssh" ,guile-ssh)
344 ("guile-git" ,guile-git)))
346 (home-page "https://www.gnu.org/software/guix/")
347 (synopsis "Functional package manager for installed software packages and versions")
349 "GNU Guix is a functional package manager for the GNU system, and is
350 also a distribution thereof. It includes a virtual machine image. Besides
351 the usual package management features, it also supports transactional
352 upgrades and roll-backs, per-user profiles, and much more. It is based on
353 the Nix package manager.")
354 (license license:gpl3+)
355 (properties '((ftp-server . "alpha.gnu.org"))))))
357 (define-public guix-daemon
358 ;; This package is for internal consumption: it allows us to quickly build
359 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
363 (properties `((hidden? . #t)))
366 ;; Use a minimum set of dependencies.
368 (fold alist-delete (package-native-inputs guix)
369 '("po4a" "graphviz" "help2man")))
371 `(("gnutls" ,guile3.0-gnutls)
372 ("guile-git" ,guile-git)
373 ("guile-json" ,guile-json-3)
374 ("guile-gcrypt" ,guile-gcrypt)
375 ,@(fold alist-delete (package-inputs guix)
376 '("boot-guile" "boot-guile/i686" "util-linux"))))
378 (propagated-inputs '())
381 (substitute-keyword-arguments (package-arguments guix)
382 ((#:configure-flags flags '())
383 ;; Pretend we have those libraries; we don't actually need them.
385 '("guix_cv_have_recent_guile_sqlite3=yes"
386 "guix_cv_have_recent_guile_ssh=yes")))
389 ((#:phases phases '%standard-phases)
390 `(modify-phases ,phases
391 (add-after 'unpack 'change-default-guix
393 ;; We need to tell 'guix-daemon' which 'guix' command to use.
394 ;; Here we use a questionable hack where we hard-code root's
395 ;; current guix, which could be wrong (XXX). Note that scripts
396 ;; like 'guix perform-download' do not run as root so we assume
397 ;; that they have access to /var/guix/profiles/per-user/root.
398 (substitute* "nix/libstore/globals.cc"
399 (("guixProgram = (.*)nixBinDir + \"/guix\"" _ before)
400 (string-append "guixProgram = " before
401 "/var/guix/profiles/per-user/root\
402 /current-guix/bin/guix")))
406 (invoke "make" "nix/libstore/schema.sql.hh")
407 (invoke "make" "-j" (number->string
408 (parallel-job-count))
410 (delete 'copy-bootstrap-guile)
412 (lambda* (#:key outputs #:allow-other-keys)
413 (invoke "make" "install-binPROGRAMS")))
414 (delete 'wrap-program)))))))
417 (define-public guile2.2-guix
420 (name "guile2.2-guix")
422 `(("guile" ,guile-2.2)
423 ("gnutls" ,guile2.2-gnutls)
424 ("guile-gcrypt" ,guile2.2-gcrypt)
425 ("guile-json" ,guile2.2-json)
426 ("guile-sqlite3" ,guile2.2-sqlite3)
427 ("guile-ssh" ,guile2.2-ssh)
428 ("guile-git" ,guile2.2-git)
429 ,@(fold alist-delete (package-native-inputs guix)
430 '("guile" "gnutls" "guile-gcrypt" "guile-json"
431 "guile-sqlite3" "guile-ssh" "guile-git"))))
433 `(("guile" ,guile-2.2)
434 ,@(alist-delete "guile" (package-inputs guix))))
437 ("guile-gcrypt" ,guile2.2-gcrypt)
438 ("guile-json" ,guile2.2-json)
439 ("guile-sqlite3" ,guile2.2-sqlite3)
440 ("guile-ssh" ,guile2.2-ssh)
441 ("guile-git" ,guile2.2-git)))))
443 (define-public guile3.0-guix
444 (deprecated-package "guile3.0-guix" guix))
446 (define-public guix-minimal
447 ;; A version of Guix which is built with the minimal set of dependencies, as
448 ;; outlined in the README "Requirements" section. Intended as a CI job, so
453 (name "guix-minimal")
455 `(("guile" ,guile-2.2)
456 ,@(alist-delete "guile" (package-inputs guix))))
459 (package-propagated-inputs guix)
462 (define (source-file? file stat)
463 "Return true if FILE is likely a source file, false if it is a typical
465 (define (wrong-extension? file)
466 (or (string-suffix? "~" file)
467 (member (file-extension file)
468 '("o" "a" "lo" "so" "go"))))
470 (match (basename file)
471 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
473 ((? wrong-extension?)
478 (define-public current-guix-package
479 ;; This parameter allows callers to override the package that 'current-guix'
480 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
481 ;; for instance because it's not running from a source code checkout.
484 (define-public current-guix
485 (let* ((repository-root (delay (canonicalize-path
486 (string-append (current-source-directory)
488 (select? (delay (or (git-predicate (force repository-root))
491 "Return a package representing Guix built from the current source tree.
492 This works by adding the current source tree to the store (after filtering it
493 out) and returning a package that uses that as its 'source'."
494 (or (current-guix-package)
497 (version (string-append (package-version guix) "+"))
498 (source (local-file (force repository-root) "guix-current"
500 #:select? (force select?))))))))
513 (uri (string-append "http://nixos.org/releases/nix/nix-"
514 version "/nix-" version ".tar.xz"))
517 "0ss9svxlh1pvrdmnqjvjyqjmbqmrdbyfarvbb14i9d4bggzl0r8n"))))
518 (build-system gnu-build-system)
519 (native-inputs `(("pkg-config" ,pkg-config)))
520 (inputs `(("curl" ,curl)
523 ("libseccomp" ,libseccomp)
524 ("libsodium" ,libsodium)
528 (home-page "https://nixos.org/nix/")
529 (synopsis "The Nix package manager")
531 "Nix is a purely functional package manager. This means that it treats
532 packages like values in purely functional programming languages such as
533 Haskell—they are built by functions that don't have side-effects, and they
534 never change after they have been built. Nix stores packages in the Nix
535 store, usually the directory /nix/store, where each package has its own unique
537 (license license:lgpl2.1+)))
545 (uri (string-append "mirror://gnu/stow/stow-"
549 "0jrxy12ywn7smdzdnvwzjw77l6knx6jkj2rckgykg1dpf6bdkm89"))))
550 (build-system gnu-build-system)
554 `(("perl-test-simple" ,perl-test-simple)
555 ("perl-test-output" ,perl-test-output)
556 ("perl-capture-tiny" ,perl-capture-tiny)
557 ("perl-io-stringy" ,perl-io-stringy)))
558 (home-page "https://www.gnu.org/software/stow/")
559 (synopsis "Managing installed software packages")
561 "GNU Stow is a symlink manager. It generates symlinks to directories
562 of data and makes them appear to be merged into the same directory. It is
563 typically used for managing software packages installed from source, by
564 letting you install them apart in distinct directories and then create
565 symlinks to the files in a common directory such as /usr/local.")
566 (license license:gpl3+)))
574 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
575 (version-major+minor version) ".x/rpm-"
579 "1nmck2fq9h85fgs3zhh6w1avlw5y16cbz5khd459ry3jfd5w4f8i"))))
580 (build-system gnu-build-system)
582 '(#:configure-flags '("--with-external-db" ;use the system's bdb
585 #:phases (modify-phases %standard-phases
586 (add-before 'configure 'set-nss-library-path
587 (lambda* (#:key inputs #:allow-other-keys)
588 (let ((nss (assoc-ref inputs "nss")))
589 (setenv "LIBRARY_PATH"
590 (string-append (getenv "LIBRARY_PATH") ":"
594 `(("pkg-config" ,pkg-config)))
602 ("libarchive" ,libarchive)
607 (home-page "https://rpm.org/")
608 (synopsis "The RPM Package Manager")
610 "The RPM Package Manager (RPM) is a command-line driven package
611 management system capable of installing, uninstalling, verifying, querying,
612 and updating computer software packages. Each software package consists of an
613 archive of files along with information about the package like its version, a
614 description. There is also a library permitting developers to manage such
615 transactions from C or Python.")
617 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
618 (license license:gpl2+)))
620 (define-public python-anaconda-client
622 (name "python-anaconda-client")
628 (url "https://github.com/Anaconda-Platform/anaconda-client")
630 (file-name (git-file-name name version))
633 "0w1bfxnydjl9qp53r2gcvr6vlpdqqilcrzqxrll9sgg6vwdyiyyp"))))
634 (build-system python-build-system)
636 `(("python-pyyaml" ,python-pyyaml)
637 ("python-requests" ,python-requests)
638 ("python-clyent" ,python-clyent)))
640 `(("python-pytz" ,python-pytz)
641 ("python-dateutil" ,python-dateutil)
642 ("python-mock" ,python-mock)
643 ("python-coverage" ,python-coverage)
644 ("python-pillow" ,python-pillow)))
647 (modify-phases %standard-phases
648 ;; This is needed for some tests.
649 (add-before 'check 'set-up-home
650 (lambda* _ (setenv "HOME" "/tmp") #t))
651 (add-before 'check 'remove-network-tests
653 ;; Remove tests requiring a network connection
654 (let ((network-tests '("tests/test_upload.py"
655 "tests/test_authorizations.py"
656 "tests/test_login.py"
657 "tests/test_whoami.py"
658 "utils/notebook/tests/test_data_uri.py"
659 "utils/notebook/tests/test_base.py"
660 "utils/notebook/tests/test_downloader.py"
661 "inspect_package/tests/test_conda.py")))
662 (with-directory-excursion "binstar_client"
663 (for-each delete-file network-tests)))
665 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
666 (synopsis "Anaconda Cloud command line client library")
668 "Anaconda Cloud command line client library provides an interface to
669 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
671 (license license:bsd-3)))
673 (define-public python2-anaconda-client
674 (package-with-python2 python-anaconda-client))
676 (define-public python-conda
678 (name "python-conda")
684 (url "https://github.com/conda/conda")
686 (file-name (git-file-name name version))
689 "1qwy0awx4qf2pbk8z2b7q6wdcq7mvwpxxjhg27mbirdvs5hw7hb2"))))
690 (build-system python-build-system)
693 (modify-phases %standard-phases
694 (add-before 'build 'create-version-file
696 (with-output-to-file "conda/.version"
697 (lambda () (display ,version)))
699 (add-before 'check 'remove-failing-tests
701 ;; These tests require internet/network access
702 (let ((network-tests '("test_cli.py"
710 "conda_env/test_cli.py"
711 "conda_env/test_create.py"
712 "conda_env/specs/test_notebook.py"
713 "conda_env/utils/test_notebooks.py"
715 "core/test_repodata.py")))
716 (with-directory-excursion "tests"
717 (for-each delete-file network-tests)
719 ;; FIXME: This test creates a file, then deletes it and tests
720 ;; that the file was deleted. For some reason it fails when
721 ;; building with guix, but does not when you run it in the
722 ;; directory left when you build with the --keep-failed
724 (delete-file "gateways/disk/test_delete.py")
725 ;; This file is no longer writable after downloading with 'git-fetch'
726 (make-file-writable "conda_env/support/saved-env/environment.yml")
730 (setenv "HOME" "/tmp")
731 (invoke "py.test"))))))
733 `(("python-cytoolz" ,python-cytoolz)
734 ("python-ruamel.yaml" ,python-ruamel.yaml)
735 ("python-requests" ,python-requests)
736 ("python-pycosat" ,python-pycosat)
737 ("python-pytest" ,python-pytest)
738 ("python-responses" ,python-responses)
739 ("python-pyyaml" ,python-pyyaml)
740 ("python-anaconda-client" ,python-anaconda-client)))
741 (home-page "https://github.com/conda/conda")
742 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
744 "Conda is a cross-platform, Python-agnostic binary package manager. It
745 is the package manager used by Anaconda installations, but it may be used for
746 other systems as well. Conda makes environments first-class citizens, making
747 it easy to create independent environments even for C libraries. Conda is
748 written entirely in Python.
750 This package provides Conda as a library.")
751 (license license:bsd-3)))
753 (define-public python2-conda
754 (let ((base (package-with-python2
755 (strip-python2-variant python-conda))))
756 (package (inherit base)
758 `(("python2-enum34" ,python2-enum34)
759 ,@(package-native-inputs base))))))
762 (package (inherit python-conda)
765 (substitute-keyword-arguments (package-arguments python-conda)
767 `(modify-phases ,phases
769 (lambda* (#:key outputs #:allow-other-keys)
770 ;; This test fails when run before installation.
771 (delete-file "tests/test_activate.py")
773 ;; Fix broken defaults
774 (substitute* "conda/base/context.py"
775 (("return sys.prefix")
776 (string-append "return \"" (assoc-ref outputs "out") "\""))
777 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
778 (string-append "return False if self.root_prefix == self.conda_prefix else "
781 ;; The util/setup-testing.py is used to build conda in
782 ;; application form, rather than the default, library form.
783 ;; With this, we are able to run commands like `conda --help`
784 ;; directly on the command line
785 (invoke "python" "utils/setup-testing.py" "build_py")))
787 (lambda* (#:key inputs outputs #:allow-other-keys)
788 (let* ((out (assoc-ref outputs "out"))
789 (target (string-append out "/lib/python"
791 (assoc-ref inputs "python"))
793 ;; The installer aborts if the target directory is not on
796 (string-append target ":" (getenv "PYTHONPATH")))
798 ;; And it aborts if the directory doesn't exist.
800 (invoke "python" "utils/setup-testing.py" "install"
801 (string-append "--prefix=" out)))))
802 ;; The "activate" and "deactivate" scripts don't need wrapping.
803 ;; They also break when they are renamed.
804 (add-after 'wrap 'undo-wrap
805 (lambda* (#:key outputs #:allow-other-keys)
806 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
807 (delete-file "deactivate")
808 (rename-file ".deactivate-real" "deactivate")
809 (delete-file "activate")
810 (rename-file ".activate-real" "activate")
813 "Conda is a cross-platform, Python-agnostic binary package manager. It
814 is the package manager used by Anaconda installations, but it may be used for
815 other systems as well. Conda makes environments first-class citizens, making
816 it easy to create independent environments even for C libraries. Conda is
817 written entirely in Python.")))
825 (uri (string-append "mirror://gnu/gwl/gwl-" version ".tar.gz"))
828 "1ji5jvzni8aml9fmimlr11g3k8isrnlvnbzhmwgdjh72hils0alc"))))
829 (build-system gnu-build-system)
832 (modify-phases %standard-phases
833 (add-before 'build 'fix-tests
835 ;; Avoid cross-device link.
836 (substitute* "tests/cache.scm"
837 (("/tmp/gwl-test-input-XXXXXX")
838 (string-append (getcwd) "/gwl-test-input-XXXXXX")))
841 `(("autoconf" ,autoconf)
842 ("automake" ,automake)
843 ("pkg-config" ,pkg-config)
845 ("graphviz" ,graphviz)))
847 `(("guile" ,guile-3.0)))
850 ("guile-commonmark" ,guile-commonmark)
851 ("guile-gcrypt" ,guile-gcrypt)
852 ("guile-pfds" ,guile-pfds)
853 ("guile-syntax-highlight" ,guile-syntax-highlight)
854 ("guile-wisp" ,guile-wisp)))
855 (home-page "https://workflows.guix.info")
856 (synopsis "Workflow management extension for GNU Guix")
857 (description "The @dfn{Guix Workflow Language} (GWL) provides an
858 extension to GNU Guix's declarative language for package management to
859 automate the execution of programs in scientific workflows. The GWL
860 can use process engines to integrate with various computing
862 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
863 ;; the web interface modules in gwl/ are licensed AGPL3+,
864 ;; and the fonts included in this package are licensed OFL1.1.
865 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
867 (define-public guix-jupyter
869 (name "guix-jupyter")
871 (home-page "https://gitlab.inria.fr/guix-hpc/guix-kernel")
874 (uri (git-reference (url home-page)
875 (commit (string-append "v" version))))
878 "01z7jjkc7r7lj6637rcgpz40v8xqqyfp6871h94yvcnwm7zy9h1n"))
879 (modules '((guix build utils)))
882 ;; Allow builds with Guile 3.0.
883 (substitute* "configure.ac"
885 "GUILE_PKG([3.0 2.2])\n"))
887 (file-name (string-append "guix-jupyter-" version "-checkout"))))
888 (build-system gnu-build-system)
890 `(#:modules ((srfi srfi-26)
895 (guix build gnu-build-system))
897 (modify-phases %standard-phases
898 (add-after 'install 'sed-kernel-json
899 (lambda* (#:key inputs outputs #:allow-other-keys)
900 (let* ((out (assoc-ref outputs "out"))
901 (guix (assoc-ref inputs "guix"))
902 (guile (assoc-ref inputs "guile"))
903 (json (assoc-ref inputs "guile-json"))
904 (git (assoc-ref inputs "guile-git"))
905 (bs (assoc-ref inputs "guile-bytestructures"))
906 (s-zmq (assoc-ref inputs "guile-simple-zmq"))
907 (gcrypt (assoc-ref inputs "guile-gcrypt"))
908 (deps (list out s-zmq guix json git bs gcrypt))
911 (open-pipe* OPEN_READ
912 (string-append guile "/bin/guile")
913 "-c" "(display (effective-version))")))
914 (path (map (cut string-append "-L\", \"" <>
918 (gopath (map (cut string-append "-C\", \"" <>
919 "/lib/guile/" effective
922 (kernel-dir (string-append out "/share/jupyter/kernels/guix/")))
923 (substitute* (string-append kernel-dir "kernel.json")
926 (list (string-join path "\",\n\t\t\"")
927 (string-join gopath "\",\n\t\t\"")
930 (("guix-jupyter-kernel.scm")
931 (string-append out "/share/guile/site/2.2/"
932 "guix-jupyter-kernel.scm")))
935 `(("autoconf" ,autoconf)
936 ("automake" ,automake)
937 ("pkg-config" ,pkg-config)
941 ("python-ipython" ,python-ipython)
942 ("python-ipykernel" ,python-ipykernel)))
945 ("guile" ,guile-3.0)))
947 `(("guile-json" ,guile-json-3)
948 ("guile-simple-zmq" ,guile-simple-zmq)
949 ("guile-gcrypt" ,guile-gcrypt)))
950 (synopsis "Guix kernel for Jupyter")
952 "Guix-Jupyter is a Jupyter kernel. It allows you to annotate notebooks
953 with information about their software dependencies, such that code is executed
954 in the right software environment. Guix-Jupyter spawns the actual kernels
955 such as @code{python-ipykernel} on behalf of the notebook user and runs them
956 in an isolated environment, in separate namespaces.")
957 (license license:gpl3+)))
965 (uri (string-append "mirror://gnome/sources/gcab/"
966 version "/gcab-" version ".tar.xz"))
969 "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"))))
970 (build-system meson-build-system)
972 `(("glib:bin" ,glib "bin") ; for glib-mkenums
973 ("intltool" ,intltool)
974 ("pkg-config" ,pkg-config)
981 ;; XXX This ‘documentation’ is for developers, and fails informatively:
982 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
984 "-Dintrospection=false")))
985 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
986 (synopsis "Microsoft Cabinet file manipulation library")
988 "The libgcab library provides GObject functions to read, write, and modify
989 Microsoft cabinet (.@dfn{CAB}) files.")
990 (license (list license:gpl2+ ; tests/testsuite.at
991 license:lgpl2.1+)))) ; the rest
993 (define-public msitools
999 (uri (string-append "mirror://gnome/sources/msitools/"
1000 version "/msitools-" version ".tar.xz"))
1003 "1skq17qr2ic4qr3779j49byfm8rncwbsq9rj1a33ncn2m7isdwdv"))))
1004 (build-system gnu-build-system)
1007 ("pkg-config" ,pkg-config)))
1012 ("libxml2" ,libxml2)
1013 ("uuid" ,util-linux "lib")))
1014 (home-page "https://wiki.gnome.org/msitools")
1015 (synopsis "Windows Installer file manipulation tool")
1017 "msitools is a collection of command-line tools to inspect, extract, build,
1018 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
1019 for packaging and deployment of cross-compiled Windows applications.")
1020 (license license:lgpl2.1+)))
1022 (define-public libostree
1029 "https://github.com/ostreedev/ostree/releases/download/v"
1030 (version-major+minor version) "/libostree-" version ".tar.xz"))
1033 "01cch4as23xspq6pck59al7x5jj60wl21g8p3iqbdxcjl1p3jxsq"))))
1034 (build-system gnu-build-system)
1037 (modify-phases %standard-phases
1038 (add-before 'check 'pre-check
1040 ;; Don't try to use the non-existing '/var/tmp' as test
1042 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
1045 ;; tap-driver.sh: missing test plan
1046 ;; tap-driver.sh: internal error getting exit status
1047 ;; tap-driver.sh: fatal: I/O or internal error
1050 `(("attr" ,attr) ; for tests
1052 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
1053 ("gobject-introspection" ,gobject-introspection)
1054 ("pkg-config" ,pkg-config)
1055 ("xsltproc" ,libxslt)))
1058 ("docbook-xml" ,docbook-xml-4.2)
1059 ("docbook-xsl" ,docbook-xsl)
1060 ("e2fsprogs" ,e2fsprogs)
1064 ("libarchive" ,libarchive)
1065 ("libsoup" ,libsoup)
1066 ("util-linux" ,util-linux)))
1067 (home-page "https://ostree.readthedocs.io/en/latest/")
1068 (synopsis "Operating system and container binary deployment and upgrades")
1070 "@code{libostree} is both a shared library and suite of command line
1071 tools that combines a \"git-like\" model for committing and downloading
1072 bootable file system trees, along with a layer for deploying them and managing
1073 the boot loader configuration.")
1074 (license license:lgpl2.0+)))
1076 (define-public flatpak
1083 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
1084 version "/flatpak-" version ".tar.xz"))
1087 "11bfxmv8pxlb5x0lb2rsl45615fzfvq5r6wldf0l6ab2ngryd7i7"))))
1089 ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
1090 ;; find the TLS backend in glib-networking.
1091 (build-system glib-or-gtk-build-system)
1094 '(#:tests? #f ;; Tests fail due to trying to create files where it can't.
1095 #:configure-flags (list
1096 "--enable-documentation=no" ;; FIXME
1097 "--enable-system-helper=no"
1098 "--localstatedir=/var"
1099 (string-append "--with-system-bubblewrap="
1100 (assoc-ref %build-inputs "bubblewrap")
1102 (native-inputs `(("bison" ,bison)
1103 ("gettext" ,gettext-minimal)
1104 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
1105 ("gobject-introspection" ,gobject-introspection)
1107 ("pkg-config" ,pkg-config)))
1108 (propagated-inputs `(("glib-networking" ,glib-networking)
1110 ("gsettings-desktop-schemas"
1111 ,gsettings-desktop-schemas)))
1112 (inputs `(("appstream-glib" ,appstream-glib)
1113 ("bubblewrap" ,bubblewrap)
1116 ("gdk-pixbuf" ,gdk-pixbuf)
1118 ("json-glib" ,json-glib)
1119 ("libarchive" ,libarchive)
1120 ("libostree" ,libostree)
1121 ("libseccomp" ,libseccomp)
1122 ("libsoup" ,libsoup)
1124 ("libxml2" ,libxml2)
1125 ("util-linux" ,util-linux)))
1126 (home-page "https://flatpak.org")
1127 (synopsis "System for building, distributing, and running sandboxed desktop
1129 (description "Flatpak is a system for building, distributing, and running
1130 sandboxed desktop applications on GNU/Linux.")
1131 (license license:lgpl2.1+)))