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 target inputs #:allow-other-keys)
187 ;; Copy the bootstrap guile tarball in the store
188 ;; used by the test suite.
189 (define (intern file recursive?)
190 ;; Note: don't use 'guix download' here because we
191 ;; need to set the 'recursive?' argument.
193 (strip-store-file-name file))
199 (let* ((item (add-to-store store ,base
202 (root (string-append "/tmp/gc-root-"
204 ;; Register a root so that the GC tests
205 ;; don't delete those.
207 (add-indirect-root store root)))))
209 (invoke "./test-env" "guile" "-c"
210 (object->string code)))
212 (intern (assoc-ref inputs "boot-guile") #f)
214 ;; On x86_64 some tests need the i686 Guile.
215 ,@(if (and (not (%current-target-system))
216 (string=? (%current-system)
218 '((intern (assoc-ref inputs "boot-guile/i686") #f))
221 ;; Copy the bootstrap executables.
222 (for-each (lambda (input)
223 (intern (assoc-ref inputs input) #t))
224 '("bootstrap/bash" "bootstrap/mkdir"
225 "bootstrap/tar" "bootstrap/xz"))))
227 (add-after 'unpack 'disable-failing-tests
228 ;; XXX FIXME: These tests fail within the build container.
230 (substitute* "tests/syscalls.scm"
231 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
232 (string-append "(test-skip 1)\n" all)))
233 (substitute* "tests/containers.scm"
234 (("^\\(test-(assert|equal)" all)
235 (string-append "(test-skip 1)\n" all)))
236 (when (file-exists? "tests/guix-environment-container.sh")
237 (substitute* "tests/guix-environment-container.sh"
238 (("guix environment --version")
241 (add-before 'check 'set-SHELL
243 ;; 'guix environment' tests rely on 'SHELL' having a
244 ;; correct value, so set it.
245 (setenv "SHELL" (which "sh"))
247 (add-after 'install 'wrap-program
248 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
249 ;; Make sure the 'guix' command finds GnuTLS,
250 ;; Guile-JSON, and Guile-Git automatically.
251 (let* ((out (assoc-ref outputs "out"))
252 (guile ,@(if (%current-target-system)
253 '((assoc-ref native-inputs "guile"))
254 '((assoc-ref inputs "guile"))))
255 (gcrypt (assoc-ref inputs "guile-gcrypt"))
256 (json (assoc-ref inputs "guile-json"))
257 (sqlite (assoc-ref inputs "guile-sqlite3"))
258 (git (assoc-ref inputs "guile-git"))
259 (bs (assoc-ref inputs
260 "guile-bytestructures"))
261 (ssh (assoc-ref inputs "guile-ssh"))
262 (gnutls (assoc-ref inputs "gnutls"))
263 (locales (assoc-ref inputs "glibc-utf8-locales"))
264 (deps (list gcrypt json sqlite gnutls
268 (open-pipe* OPEN_READ
269 (string-append guile "/bin/guile")
270 "-c" "(display (effective-version))")))
272 (map (cut string-append <>
278 (map (cut string-append <>
279 "/lib/guile/" effective
283 (locpath (string-append locales "/lib/locale")))
285 (wrap-program (string-append out "/bin/guix")
286 `("GUILE_LOAD_PATH" ":" prefix (,path))
287 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
288 `("GUIX_LOCPATH" ":" suffix (,locpath)))
291 (native-inputs `(("pkg-config" ,pkg-config)
293 ;; Guile libraries are needed here for
294 ;; cross-compilation.
297 ("guile-gcrypt" ,guile-gcrypt)
298 ("guile-json" ,guile-json-3)
299 ("guile-sqlite3" ,guile-sqlite3)
300 ("guile-ssh" ,guile-ssh)
301 ("guile-git" ,guile-git)
303 ;; XXX: Keep the development inputs here even though
304 ;; they're unnecessary, just so that 'guix environment
305 ;; guix' always contains them.
306 ("autoconf" ,autoconf-wrapper)
307 ("automake" ,automake)
308 ("gettext" ,gettext-minimal)
310 ("graphviz" ,graphviz)
311 ("help2man" ,help2man)
316 ("zlib" ,zlib) ;for 'guix publish'
317 ("lzlib" ,lzlib) ;for 'guix publish' and 'guix substitute'
320 ("libgcrypt" ,libgcrypt)
324 ;; Some of the tests use "unshare" when it is available.
325 ("util-linux" ,util-linux)
327 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
329 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
330 ,@(if (and (not (%current-target-system))
331 (string=? (%current-system) "x86_64-linux"))
332 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
335 ;; Tests also rely on these bootstrap executables.
336 ("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system)))
337 ("bootstrap/mkdir" ,(bootstrap-executable "mkdir" (%current-system)))
338 ("bootstrap/tar" ,(bootstrap-executable "tar" (%current-system)))
339 ("bootstrap/xz" ,(bootstrap-executable "xz" (%current-system)))
341 ("glibc-utf8-locales" ,glibc-utf8-locales)))
343 `(("gnutls" ,guile3.0-gnutls)
344 ("guile-gcrypt" ,guile-gcrypt)
345 ("guile-json" ,guile-json-3)
346 ("guile-sqlite3" ,guile-sqlite3)
347 ("guile-ssh" ,guile-ssh)
348 ("guile-git" ,guile-git)))
350 (home-page "https://www.gnu.org/software/guix/")
351 (synopsis "Functional package manager for installed software packages and versions")
353 "GNU Guix is a functional package manager for the GNU system, and is
354 also a distribution thereof. It includes a virtual machine image. Besides
355 the usual package management features, it also supports transactional
356 upgrades and roll-backs, per-user profiles, and much more. It is based on
357 the Nix package manager.")
358 (license license:gpl3+)
359 (properties '((ftp-server . "alpha.gnu.org"))))))
361 (define-public guix-daemon
362 ;; This package is for internal consumption: it allows us to quickly build
363 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
367 (properties `((hidden? . #t)))
370 ;; Use a minimum set of dependencies.
372 (fold alist-delete (package-native-inputs guix)
373 '("po4a" "graphviz" "help2man")))
375 `(("gnutls" ,guile3.0-gnutls)
376 ("guile-git" ,guile-git)
377 ("guile-json" ,guile-json-3)
378 ("guile-gcrypt" ,guile-gcrypt)
379 ,@(fold alist-delete (package-inputs guix)
380 '("boot-guile" "boot-guile/i686" "util-linux"))))
382 (propagated-inputs '())
385 (substitute-keyword-arguments (package-arguments guix)
386 ((#:configure-flags flags '())
387 ;; Pretend we have those libraries; we don't actually need them.
389 '("guix_cv_have_recent_guile_sqlite3=yes"
390 "guix_cv_have_recent_guile_ssh=yes")))
393 ((#:phases phases '%standard-phases)
394 `(modify-phases ,phases
395 (add-after 'unpack 'change-default-guix
397 ;; We need to tell 'guix-daemon' which 'guix' command to use.
398 ;; Here we use a questionable hack where we hard-code root's
399 ;; current guix, which could be wrong (XXX). Note that scripts
400 ;; like 'guix perform-download' do not run as root so we assume
401 ;; that they have access to /var/guix/profiles/per-user/root.
402 (substitute* "nix/libstore/globals.cc"
403 (("guixProgram = (.*)nixBinDir + \"/guix\"" _ before)
404 (string-append "guixProgram = " before
405 "/var/guix/profiles/per-user/root\
406 /current-guix/bin/guix")))
410 (invoke "make" "nix/libstore/schema.sql.hh")
411 (invoke "make" "-j" (number->string
412 (parallel-job-count))
414 (delete 'copy-bootstrap-guile)
416 (lambda* (#:key outputs #:allow-other-keys)
417 (invoke "make" "install-binPROGRAMS")))
418 (delete 'wrap-program)))))))
421 (define-public guile2.2-guix
424 (name "guile2.2-guix")
426 `(("guile" ,guile-2.2)
427 ("gnutls" ,guile2.2-gnutls)
428 ("guile-gcrypt" ,guile2.2-gcrypt)
429 ("guile-json" ,guile2.2-json)
430 ("guile-sqlite3" ,guile2.2-sqlite3)
431 ("guile-ssh" ,guile2.2-ssh)
432 ("guile-git" ,guile2.2-git)
433 ,@(fold alist-delete (package-native-inputs guix)
434 '("guile" "gnutls" "guile-gcrypt" "guile-json"
435 "guile-sqlite3" "guile-ssh" "guile-git"))))
437 `(("guile" ,guile-2.2)
438 ,@(alist-delete "guile" (package-inputs guix))))
441 ("guile-gcrypt" ,guile2.2-gcrypt)
442 ("guile-json" ,guile2.2-json)
443 ("guile-sqlite3" ,guile2.2-sqlite3)
444 ("guile-ssh" ,guile2.2-ssh)
445 ("guile-git" ,guile2.2-git)))))
447 (define-public guile3.0-guix
448 (deprecated-package "guile3.0-guix" guix))
450 (define-public guix-minimal
451 ;; A version of Guix which is built with the minimal set of dependencies, as
452 ;; outlined in the README "Requirements" section. Intended as a CI job, so
457 (name "guix-minimal")
459 `(("guile" ,guile-2.2)
460 ,@(alist-delete "guile" (package-inputs guix))))
463 (package-propagated-inputs guix)
466 (define (source-file? file stat)
467 "Return true if FILE is likely a source file, false if it is a typical
469 (define (wrong-extension? file)
470 (or (string-suffix? "~" file)
471 (member (file-extension file)
472 '("o" "a" "lo" "so" "go"))))
474 (match (basename file)
475 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
477 ((? wrong-extension?)
482 (define-public current-guix-package
483 ;; This parameter allows callers to override the package that 'current-guix'
484 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
485 ;; for instance because it's not running from a source code checkout.
488 (define-public current-guix
489 (let* ((repository-root (delay (canonicalize-path
490 (string-append (current-source-directory)
492 (select? (delay (or (git-predicate (force repository-root))
495 "Return a package representing Guix built from the current source tree.
496 This works by adding the current source tree to the store (after filtering it
497 out) and returning a package that uses that as its 'source'."
498 (or (current-guix-package)
501 (version (string-append (package-version guix) "+"))
502 (source (local-file (force repository-root) "guix-current"
504 #:select? (force select?))))))))
517 (uri (string-append "http://nixos.org/releases/nix/nix-"
518 version "/nix-" version ".tar.xz"))
521 "0ss9svxlh1pvrdmnqjvjyqjmbqmrdbyfarvbb14i9d4bggzl0r8n"))))
522 (build-system gnu-build-system)
523 (native-inputs `(("pkg-config" ,pkg-config)))
524 (inputs `(("curl" ,curl)
527 ("libseccomp" ,libseccomp)
528 ("libsodium" ,libsodium)
532 (home-page "https://nixos.org/nix/")
533 (synopsis "The Nix package manager")
535 "Nix is a purely functional package manager. This means that it treats
536 packages like values in purely functional programming languages such as
537 Haskell—they are built by functions that don't have side-effects, and they
538 never change after they have been built. Nix stores packages in the Nix
539 store, usually the directory /nix/store, where each package has its own unique
541 (license license:lgpl2.1+)))
549 (uri (string-append "mirror://gnu/stow/stow-"
553 "0jrxy12ywn7smdzdnvwzjw77l6knx6jkj2rckgykg1dpf6bdkm89"))))
554 (build-system gnu-build-system)
558 `(("perl-test-simple" ,perl-test-simple)
559 ("perl-test-output" ,perl-test-output)
560 ("perl-capture-tiny" ,perl-capture-tiny)
561 ("perl-io-stringy" ,perl-io-stringy)))
562 (home-page "https://www.gnu.org/software/stow/")
563 (synopsis "Managing installed software packages")
565 "GNU Stow is a symlink manager. It generates symlinks to directories
566 of data and makes them appear to be merged into the same directory. It is
567 typically used for managing software packages installed from source, by
568 letting you install them apart in distinct directories and then create
569 symlinks to the files in a common directory such as /usr/local.")
570 (license license:gpl3+)))
578 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
579 (version-major+minor version) ".x/rpm-"
583 "1nmck2fq9h85fgs3zhh6w1avlw5y16cbz5khd459ry3jfd5w4f8i"))))
584 (build-system gnu-build-system)
586 '(#:configure-flags '("--with-external-db" ;use the system's bdb
589 #:phases (modify-phases %standard-phases
590 (add-before 'configure 'set-nss-library-path
591 (lambda* (#:key inputs #:allow-other-keys)
592 (let ((nss (assoc-ref inputs "nss")))
593 (setenv "LIBRARY_PATH"
594 (string-append (getenv "LIBRARY_PATH") ":"
598 `(("pkg-config" ,pkg-config)))
606 ("libarchive" ,libarchive)
611 (home-page "https://rpm.org/")
612 (synopsis "The RPM Package Manager")
614 "The RPM Package Manager (RPM) is a command-line driven package
615 management system capable of installing, uninstalling, verifying, querying,
616 and updating computer software packages. Each software package consists of an
617 archive of files along with information about the package like its version, a
618 description. There is also a library permitting developers to manage such
619 transactions from C or Python.")
621 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
622 (license license:gpl2+)))
624 (define-public python-anaconda-client
626 (name "python-anaconda-client")
632 (url "https://github.com/Anaconda-Platform/anaconda-client")
634 (file-name (git-file-name name version))
637 "0w1bfxnydjl9qp53r2gcvr6vlpdqqilcrzqxrll9sgg6vwdyiyyp"))))
638 (build-system python-build-system)
640 `(("python-pyyaml" ,python-pyyaml)
641 ("python-requests" ,python-requests)
642 ("python-clyent" ,python-clyent)))
644 `(("python-pytz" ,python-pytz)
645 ("python-dateutil" ,python-dateutil)
646 ("python-mock" ,python-mock)
647 ("python-coverage" ,python-coverage)
648 ("python-pillow" ,python-pillow)))
651 (modify-phases %standard-phases
652 ;; This is needed for some tests.
653 (add-before 'check 'set-up-home
654 (lambda* _ (setenv "HOME" "/tmp") #t))
655 (add-before 'check 'remove-network-tests
657 ;; Remove tests requiring a network connection
658 (let ((network-tests '("tests/test_upload.py"
659 "tests/test_authorizations.py"
660 "tests/test_login.py"
661 "tests/test_whoami.py"
662 "utils/notebook/tests/test_data_uri.py"
663 "utils/notebook/tests/test_base.py"
664 "utils/notebook/tests/test_downloader.py"
665 "inspect_package/tests/test_conda.py")))
666 (with-directory-excursion "binstar_client"
667 (for-each delete-file network-tests)))
669 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
670 (synopsis "Anaconda Cloud command line client library")
672 "Anaconda Cloud command line client library provides an interface to
673 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
675 (license license:bsd-3)))
677 (define-public python2-anaconda-client
678 (package-with-python2 python-anaconda-client))
680 (define-public python-conda
682 (name "python-conda")
688 (url "https://github.com/conda/conda")
690 (file-name (git-file-name name version))
693 "1qwy0awx4qf2pbk8z2b7q6wdcq7mvwpxxjhg27mbirdvs5hw7hb2"))))
694 (build-system python-build-system)
697 (modify-phases %standard-phases
698 (add-before 'build 'create-version-file
700 (with-output-to-file "conda/.version"
701 (lambda () (display ,version)))
703 (add-before 'check 'remove-failing-tests
705 ;; These tests require internet/network access
706 (let ((network-tests '("test_cli.py"
714 "conda_env/test_cli.py"
715 "conda_env/test_create.py"
716 "conda_env/specs/test_notebook.py"
717 "conda_env/utils/test_notebooks.py"
719 "core/test_repodata.py")))
720 (with-directory-excursion "tests"
721 (for-each delete-file network-tests)
723 ;; FIXME: This test creates a file, then deletes it and tests
724 ;; that the file was deleted. For some reason it fails when
725 ;; building with guix, but does not when you run it in the
726 ;; directory left when you build with the --keep-failed
728 (delete-file "gateways/disk/test_delete.py")
729 ;; This file is no longer writable after downloading with 'git-fetch'
730 (make-file-writable "conda_env/support/saved-env/environment.yml")
734 (setenv "HOME" "/tmp")
735 (invoke "py.test"))))))
737 `(("python-cytoolz" ,python-cytoolz)
738 ("python-ruamel.yaml" ,python-ruamel.yaml)
739 ("python-requests" ,python-requests)
740 ("python-pycosat" ,python-pycosat)
741 ("python-pytest" ,python-pytest)
742 ("python-responses" ,python-responses)
743 ("python-pyyaml" ,python-pyyaml)
744 ("python-anaconda-client" ,python-anaconda-client)))
745 (home-page "https://github.com/conda/conda")
746 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
748 "Conda is a cross-platform, Python-agnostic binary package manager. It
749 is the package manager used by Anaconda installations, but it may be used for
750 other systems as well. Conda makes environments first-class citizens, making
751 it easy to create independent environments even for C libraries. Conda is
752 written entirely in Python.
754 This package provides Conda as a library.")
755 (license license:bsd-3)))
757 (define-public python2-conda
758 (let ((base (package-with-python2
759 (strip-python2-variant python-conda))))
760 (package (inherit base)
762 `(("python2-enum34" ,python2-enum34)
763 ,@(package-native-inputs base))))))
766 (package (inherit python-conda)
769 (substitute-keyword-arguments (package-arguments python-conda)
771 `(modify-phases ,phases
773 (lambda* (#:key outputs #:allow-other-keys)
774 ;; This test fails when run before installation.
775 (delete-file "tests/test_activate.py")
777 ;; Fix broken defaults
778 (substitute* "conda/base/context.py"
779 (("return sys.prefix")
780 (string-append "return \"" (assoc-ref outputs "out") "\""))
781 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
782 (string-append "return False if self.root_prefix == self.conda_prefix else "
785 ;; The util/setup-testing.py is used to build conda in
786 ;; application form, rather than the default, library form.
787 ;; With this, we are able to run commands like `conda --help`
788 ;; directly on the command line
789 (invoke "python" "utils/setup-testing.py" "build_py")))
791 (lambda* (#:key inputs outputs #:allow-other-keys)
792 (let* ((out (assoc-ref outputs "out"))
793 (target (string-append out "/lib/python"
795 (assoc-ref inputs "python"))
797 ;; The installer aborts if the target directory is not on
800 (string-append target ":" (getenv "PYTHONPATH")))
802 ;; And it aborts if the directory doesn't exist.
804 (invoke "python" "utils/setup-testing.py" "install"
805 (string-append "--prefix=" out)))))
806 ;; The "activate" and "deactivate" scripts don't need wrapping.
807 ;; They also break when they are renamed.
808 (add-after 'wrap 'undo-wrap
809 (lambda* (#:key outputs #:allow-other-keys)
810 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
811 (delete-file "deactivate")
812 (rename-file ".deactivate-real" "deactivate")
813 (delete-file "activate")
814 (rename-file ".activate-real" "activate")
817 "Conda is a cross-platform, Python-agnostic binary package manager. It
818 is the package manager used by Anaconda installations, but it may be used for
819 other systems as well. Conda makes environments first-class citizens, making
820 it easy to create independent environments even for C libraries. Conda is
821 written entirely in Python.")))
829 (uri (string-append "mirror://gnu/gwl/gwl-" version ".tar.gz"))
832 "1ji5jvzni8aml9fmimlr11g3k8isrnlvnbzhmwgdjh72hils0alc"))))
833 (build-system gnu-build-system)
836 (modify-phases %standard-phases
837 (add-before 'build 'fix-tests
839 ;; Avoid cross-device link.
840 (substitute* "tests/cache.scm"
841 (("/tmp/gwl-test-input-XXXXXX")
842 (string-append (getcwd) "/gwl-test-input-XXXXXX")))
845 `(("autoconf" ,autoconf)
846 ("automake" ,automake)
847 ("pkg-config" ,pkg-config)
849 ("graphviz" ,graphviz)))
851 `(("guile" ,guile-3.0)))
854 ("guile-commonmark" ,guile-commonmark)
855 ("guile-gcrypt" ,guile-gcrypt)
856 ("guile-pfds" ,guile-pfds)
857 ("guile-syntax-highlight" ,guile-syntax-highlight)
858 ("guile-wisp" ,guile-wisp)))
859 (home-page "https://workflows.guix.info")
860 (synopsis "Workflow management extension for GNU Guix")
861 (description "The @dfn{Guix Workflow Language} (GWL) provides an
862 extension to GNU Guix's declarative language for package management to
863 automate the execution of programs in scientific workflows. The GWL
864 can use process engines to integrate with various computing
866 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
867 ;; the web interface modules in gwl/ are licensed AGPL3+,
868 ;; and the fonts included in this package are licensed OFL1.1.
869 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
871 (define-public guix-jupyter
873 (name "guix-jupyter")
875 (home-page "https://gitlab.inria.fr/guix-hpc/guix-kernel")
878 (uri (git-reference (url home-page)
879 (commit (string-append "v" version))))
882 "01z7jjkc7r7lj6637rcgpz40v8xqqyfp6871h94yvcnwm7zy9h1n"))
883 (modules '((guix build utils)))
886 ;; Allow builds with Guile 3.0.
887 (substitute* "configure.ac"
889 "GUILE_PKG([3.0 2.2])\n"))
891 (file-name (string-append "guix-jupyter-" version "-checkout"))))
892 (build-system gnu-build-system)
894 `(#:modules ((srfi srfi-26)
899 (guix build gnu-build-system))
901 (modify-phases %standard-phases
902 (add-after 'install 'sed-kernel-json
903 (lambda* (#:key inputs outputs #:allow-other-keys)
904 (let* ((out (assoc-ref outputs "out"))
905 (guix (assoc-ref inputs "guix"))
906 (guile (assoc-ref inputs "guile"))
907 (json (assoc-ref inputs "guile-json"))
908 (git (assoc-ref inputs "guile-git"))
909 (bs (assoc-ref inputs "guile-bytestructures"))
910 (s-zmq (assoc-ref inputs "guile-simple-zmq"))
911 (gcrypt (assoc-ref inputs "guile-gcrypt"))
912 (deps (list out s-zmq guix json git bs gcrypt))
915 (open-pipe* OPEN_READ
916 (string-append guile "/bin/guile")
917 "-c" "(display (effective-version))")))
918 (path (map (cut string-append "-L\", \"" <>
922 (gopath (map (cut string-append "-C\", \"" <>
923 "/lib/guile/" effective
926 (kernel-dir (string-append out "/share/jupyter/kernels/guix/")))
927 (substitute* (string-append kernel-dir "kernel.json")
930 (list (string-join path "\",\n\t\t\"")
931 (string-join gopath "\",\n\t\t\"")
934 (("guix-jupyter-kernel.scm")
935 (string-append out "/share/guile/site/2.2/"
936 "guix-jupyter-kernel.scm")))
939 `(("autoconf" ,autoconf)
940 ("automake" ,automake)
941 ("pkg-config" ,pkg-config)
945 ("python-ipython" ,python-ipython)
946 ("python-ipykernel" ,python-ipykernel)))
949 ("guile" ,guile-3.0)))
951 `(("guile-json" ,guile-json-3)
952 ("guile-simple-zmq" ,guile-simple-zmq)
953 ("guile-gcrypt" ,guile-gcrypt)))
954 (synopsis "Guix kernel for Jupyter")
956 "Guix-Jupyter is a Jupyter kernel. It allows you to annotate notebooks
957 with information about their software dependencies, such that code is executed
958 in the right software environment. Guix-Jupyter spawns the actual kernels
959 such as @code{python-ipykernel} on behalf of the notebook user and runs them
960 in an isolated environment, in separate namespaces.")
961 (license license:gpl3+)))
969 (uri (string-append "mirror://gnome/sources/gcab/"
970 version "/gcab-" version ".tar.xz"))
973 "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"))))
974 (build-system meson-build-system)
976 `(("glib:bin" ,glib "bin") ; for glib-mkenums
977 ("intltool" ,intltool)
978 ("pkg-config" ,pkg-config)
985 ;; XXX This ‘documentation’ is for developers, and fails informatively:
986 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
988 "-Dintrospection=false")))
989 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
990 (synopsis "Microsoft Cabinet file manipulation library")
992 "The libgcab library provides GObject functions to read, write, and modify
993 Microsoft cabinet (.@dfn{CAB}) files.")
994 (license (list license:gpl2+ ; tests/testsuite.at
995 license:lgpl2.1+)))) ; the rest
997 (define-public msitools
1003 (uri (string-append "mirror://gnome/sources/msitools/"
1004 version "/msitools-" version ".tar.xz"))
1007 "1skq17qr2ic4qr3779j49byfm8rncwbsq9rj1a33ncn2m7isdwdv"))))
1008 (build-system gnu-build-system)
1011 ("pkg-config" ,pkg-config)))
1016 ("libxml2" ,libxml2)
1017 ("uuid" ,util-linux "lib")))
1018 (home-page "https://wiki.gnome.org/msitools")
1019 (synopsis "Windows Installer file manipulation tool")
1021 "msitools is a collection of command-line tools to inspect, extract, build,
1022 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
1023 for packaging and deployment of cross-compiled Windows applications.")
1024 (license license:lgpl2.1+)))
1026 (define-public libostree
1033 "https://github.com/ostreedev/ostree/releases/download/v"
1034 (version-major+minor version) "/libostree-" version ".tar.xz"))
1037 "01cch4as23xspq6pck59al7x5jj60wl21g8p3iqbdxcjl1p3jxsq"))))
1038 (build-system gnu-build-system)
1041 (modify-phases %standard-phases
1042 (add-before 'check 'pre-check
1044 ;; Don't try to use the non-existing '/var/tmp' as test
1046 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
1049 ;; tap-driver.sh: missing test plan
1050 ;; tap-driver.sh: internal error getting exit status
1051 ;; tap-driver.sh: fatal: I/O or internal error
1054 `(("attr" ,attr) ; for tests
1056 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
1057 ("gobject-introspection" ,gobject-introspection)
1058 ("pkg-config" ,pkg-config)
1059 ("xsltproc" ,libxslt)))
1062 ("docbook-xml" ,docbook-xml-4.2)
1063 ("docbook-xsl" ,docbook-xsl)
1064 ("e2fsprogs" ,e2fsprogs)
1068 ("libarchive" ,libarchive)
1069 ("libsoup" ,libsoup)
1070 ("util-linux" ,util-linux)))
1071 (home-page "https://ostree.readthedocs.io/en/latest/")
1072 (synopsis "Operating system and container binary deployment and upgrades")
1074 "@code{libostree} is both a shared library and suite of command line
1075 tools that combines a \"git-like\" model for committing and downloading
1076 bootable file system trees, along with a layer for deploying them and managing
1077 the boot loader configuration.")
1078 (license license:lgpl2.0+)))
1080 (define-public flatpak
1087 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
1088 version "/flatpak-" version ".tar.xz"))
1091 "11bfxmv8pxlb5x0lb2rsl45615fzfvq5r6wldf0l6ab2ngryd7i7"))))
1093 ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
1094 ;; find the TLS backend in glib-networking.
1095 (build-system glib-or-gtk-build-system)
1098 '(#:tests? #f ;; Tests fail due to trying to create files where it can't.
1099 #:configure-flags (list
1100 "--enable-documentation=no" ;; FIXME
1101 "--enable-system-helper=no"
1102 "--localstatedir=/var"
1103 (string-append "--with-system-bubblewrap="
1104 (assoc-ref %build-inputs "bubblewrap")
1106 (native-inputs `(("bison" ,bison)
1107 ("gettext" ,gettext-minimal)
1108 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
1109 ("gobject-introspection" ,gobject-introspection)
1111 ("pkg-config" ,pkg-config)))
1112 (propagated-inputs `(("glib-networking" ,glib-networking)
1114 ("gsettings-desktop-schemas"
1115 ,gsettings-desktop-schemas)))
1116 (inputs `(("appstream-glib" ,appstream-glib)
1117 ("bubblewrap" ,bubblewrap)
1120 ("gdk-pixbuf" ,gdk-pixbuf)
1122 ("json-glib" ,json-glib)
1123 ("libarchive" ,libarchive)
1124 ("libostree" ,libostree)
1125 ("libseccomp" ,libseccomp)
1126 ("libsoup" ,libsoup)
1128 ("libxml2" ,libxml2)
1129 ("util-linux" ,util-linux)))
1130 (home-page "https://flatpak.org")
1131 (synopsis "System for building, distributing, and running sandboxed desktop
1133 (description "Flatpak is a system for building, distributing, and running
1134 sandboxed desktop applications on GNU/Linux.")
1135 (license license:lgpl2.1+)))