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>
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 "1.0.1")
113 (commit "c2f9ea2b502a617bb69227d5f858eee9d4288a6a")
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 "0hg6yrqlzqiv4gmk9liqar6m9qhhn66q75jsmh86awjwq4qmvyab"))
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")
141 ;; Set 'DOT_USER_PROGRAM' to the empty string so
142 ;; we don't keep a reference to Graphviz, whose
143 ;; closure is pretty big (too big for the Guix
144 ;; system installation image.)
145 "ac_cv_path_DOT_USER_PROGRAM=dot"
147 ;; To avoid problems with the length of shebangs,
148 ;; choose a fixed-width and short directory name
150 "ac_cv_guix_test_root=/tmp/guix-tests")
151 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
153 #:modules ((guix build gnu-build-system)
159 #:phases (modify-phases %standard-phases
162 ;; Make sure 'msgmerge' can modify the PO files.
163 (for-each (lambda (po)
165 (find-files "." "\\.po$"))
167 (patch-shebang "build-aux/git-version-gen")
169 (call-with-output-file ".tarball-version"
171 (display ,version port)))
173 (invoke "sh" "bootstrap")))
174 (add-before 'check 'copy-bootstrap-guile
175 (lambda* (#:key system inputs #:allow-other-keys)
176 ;; Copy the bootstrap guile tarball in the store used
177 ;; by the test suite.
178 (define (intern file recursive?)
179 ;; Note: don't use 'guix download' here because we
180 ;; need to set the 'recursive?' argument.
182 (strip-store-file-name file))
188 (let* ((item (add-to-store store ,base
191 (root (string-append "/tmp/gc-root-"
193 ;; Register a root so that the GC tests
194 ;; don't delete those.
196 (add-indirect-root store root)))))
198 (invoke "./test-env" "guile" "-c"
199 (object->string code)))
201 (intern (assoc-ref inputs "boot-guile") #f)
203 ;; On x86_64 some tests need the i686 Guile.
204 ,@(if (and (not (%current-target-system))
205 (string=? (%current-system)
207 '((intern (assoc-ref inputs "boot-guile/i686") #f))
210 ;; Copy the bootstrap executables.
211 (for-each (lambda (input)
212 (intern (assoc-ref inputs input) #t))
213 '("bootstrap/bash" "bootstrap/mkdir"
214 "bootstrap/tar" "bootstrap/xz"))
216 (add-after 'unpack 'disable-failing-tests
217 ;; XXX FIXME: These tests fail within the build container.
219 (substitute* "tests/syscalls.scm"
220 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
221 (string-append "(test-skip 1)\n" all)))
222 (substitute* "tests/containers.scm"
223 (("^\\(test-(assert|equal)" all)
224 (string-append "(test-skip 1)\n" all)))
225 (when (file-exists? "tests/guix-environment-container.sh")
226 (substitute* "tests/guix-environment-container.sh"
227 (("guix environment --version")
230 (add-before 'check 'set-SHELL
232 ;; 'guix environment' tests rely on 'SHELL' having a
233 ;; correct value, so set it.
234 (setenv "SHELL" (which "sh"))
236 (add-after 'install 'wrap-program
237 (lambda* (#:key inputs outputs #:allow-other-keys)
238 ;; Make sure the 'guix' command finds GnuTLS,
239 ;; Guile-JSON, and Guile-Git automatically.
240 (let* ((out (assoc-ref outputs "out"))
241 (guile (assoc-ref inputs "guile"))
242 (gcrypt (assoc-ref inputs "guile-gcrypt"))
243 (json (assoc-ref inputs "guile-json"))
244 (sqlite (assoc-ref inputs "guile-sqlite3"))
245 (git (assoc-ref inputs "guile-git"))
246 (bs (assoc-ref inputs
247 "guile-bytestructures"))
248 (ssh (assoc-ref inputs "guile-ssh"))
249 (gnutls (assoc-ref inputs "gnutls"))
250 (locales (assoc-ref inputs "glibc-utf8-locales"))
251 (deps (list gcrypt json sqlite gnutls
255 (open-pipe* OPEN_READ
256 (string-append guile "/bin/guile")
257 "-c" "(display (effective-version))")))
259 (map (cut string-append <>
265 (map (cut string-append <>
266 "/lib/guile/" effective
270 (locpath (string-append locales "/lib/locale")))
272 (wrap-program (string-append out "/bin/guix")
273 `("GUILE_LOAD_PATH" ":" prefix (,path))
274 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
275 `("GUIX_LOCPATH" ":" suffix (,locpath)))
278 (native-inputs `(("pkg-config" ,pkg-config)
280 ;; XXX: Keep the development inputs here even though
281 ;; they're unnecessary, just so that 'guix environment
282 ;; guix' always contains them.
283 ("autoconf" ,autoconf-wrapper)
284 ("automake" ,automake)
285 ("gettext" ,gettext-minimal)
287 ("graphviz" ,graphviz)
288 ("help2man" ,help2man)
293 ("zlib" ,zlib) ;for 'guix publish'
294 ("lzlib" ,lzlib) ;for 'guix publish' and 'guix substitute'
297 ("libgcrypt" ,libgcrypt)
301 ;; Some of the tests use "unshare" when it is available.
302 ("util-linux" ,util-linux)
304 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
306 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
307 ,@(if (and (not (%current-target-system))
308 (string=? (%current-system) "x86_64-linux"))
309 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
312 ;; Tests also rely on these bootstrap executables.
313 ("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system)))
314 ("bootstrap/mkdir" ,(bootstrap-executable "mkdir" (%current-system)))
315 ("bootstrap/tar" ,(bootstrap-executable "tar" (%current-system)))
316 ("bootstrap/xz" ,(bootstrap-executable "xz" (%current-system)))
318 ("glibc-utf8-locales" ,glibc-utf8-locales)))
321 ("guile-gcrypt" ,guile-gcrypt)
322 ("guile-json" ,guile-json-3)
323 ("guile-sqlite3" ,guile-sqlite3)
324 ("guile-ssh" ,guile-ssh)
325 ("guile-git" ,guile-git)))
327 (home-page "https://www.gnu.org/software/guix/")
328 (synopsis "Functional package manager for installed software packages and versions")
330 "GNU Guix is a functional package manager for the GNU system, and is
331 also a distribution thereof. It includes a virtual machine image. Besides
332 the usual package management features, it also supports transactional
333 upgrades and roll-backs, per-user profiles, and much more. It is based on
334 the Nix package manager.")
335 (license license:gpl3+)
336 (properties '((ftp-server . "alpha.gnu.org"))))))
338 (define-public guix-daemon
339 ;; This package is for internal consumption: it allows us to quickly build
340 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
344 (properties `((hidden? . #t)))
347 ;; Use a minimum set of dependencies.
349 (fold alist-delete (package-native-inputs guix)
350 '("po4a" "graphviz" "help2man")))
353 ("guile-git" ,guile-git)
354 ("guile-json" ,guile-json-3)
355 ("guile-gcrypt" ,guile-gcrypt)
356 ,@(fold alist-delete (package-inputs guix)
357 '("boot-guile" "boot-guile/i686" "util-linux"))))
359 (propagated-inputs '())
362 (substitute-keyword-arguments (package-arguments guix)
363 ((#:configure-flags flags '())
364 ;; Pretend we have those libraries; we don't actually need them.
366 '("guix_cv_have_recent_guile_sqlite3=yes"
367 "guix_cv_have_recent_guile_ssh=yes")))
370 ((#:phases phases '%standard-phases)
371 `(modify-phases ,phases
372 (add-after 'unpack 'change-default-guix
374 ;; We need to tell 'guix-daemon' which 'guix' command to use.
375 ;; Here we use a questionable hack where we hard-code root's
376 ;; current guix, which could be wrong (XXX). Note that scripts
377 ;; like 'guix perform-download' do not run as root so we assume
378 ;; that they have access to /var/guix/profiles/per-user/root.
379 (substitute* "nix/libstore/globals.cc"
380 (("guixProgram = (.*)nixBinDir + \"/guix\"" _ before)
381 (string-append "guixProgram = " before
382 "/var/guix/profiles/per-user/root\
383 /current-guix/bin/guix")))
387 (invoke "make" "nix/libstore/schema.sql.hh")
388 (invoke "make" "-j" (number->string
389 (parallel-job-count))
391 (delete 'copy-bootstrap-guile)
393 (lambda* (#:key outputs #:allow-other-keys)
394 (invoke "make" "install-binPROGRAMS")))
395 (delete 'wrap-program)))))))
397 (define-public guile2.0-guix
398 (deprecated-package "guile2.0-guix" guix))
400 (define-public guile3.0-guix
403 (name "guile3.0-guix")
405 `(("guile" ,guile-3.0)
406 ,@(alist-delete "guile" (package-inputs guix))))
408 `(("gnutls" ,guile3.0-gnutls)
409 ("guile-gcrypt" ,guile3.0-gcrypt)
410 ("guile-json" ,guile3.0-json)
411 ("guile-sqlite3" ,guile3.0-sqlite3)
412 ("guile-ssh" ,guile3.0-ssh)
413 ("guile-git" ,guile3.0-git)))))
415 (define-public guix-minimal
416 ;; A version of Guix which is built with the minimal set of dependencies, as
417 ;; outlined in the README "Requirements" section. Intended as a CI job, so
422 (name "guix-minimal")
424 `(("guile" ,guile-2.2)
425 ,@(alist-delete "guile" (package-inputs guix))))
428 (package-propagated-inputs guix)
431 (define (source-file? file stat)
432 "Return true if FILE is likely a source file, false if it is a typical
434 (define (wrong-extension? file)
435 (or (string-suffix? "~" file)
436 (member (file-extension file)
437 '("o" "a" "lo" "so" "go"))))
439 (match (basename file)
440 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
442 ((? wrong-extension?)
447 (define-public current-guix-package
448 ;; This parameter allows callers to override the package that 'current-guix'
449 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
450 ;; for instance because it's not running from a source code checkout.
453 (define-public current-guix
454 (let* ((repository-root (delay (canonicalize-path
455 (string-append (current-source-directory)
457 (select? (delay (or (git-predicate (force repository-root))
460 "Return a package representing Guix built from the current source tree.
461 This works by adding the current source tree to the store (after filtering it
462 out) and returning a package that uses that as its 'source'."
463 (or (current-guix-package)
466 (version (string-append (package-version guix) "+"))
467 (source (local-file (force repository-root) "guix-current"
469 #:select? (force select?))))))))
482 (uri (string-append "http://nixos.org/releases/nix/nix-"
483 version "/nix-" version ".tar.xz"))
486 "0ss9svxlh1pvrdmnqjvjyqjmbqmrdbyfarvbb14i9d4bggzl0r8n"))))
487 (build-system gnu-build-system)
488 (native-inputs `(("pkg-config" ,pkg-config)))
489 (inputs `(("curl" ,curl)
492 ("libseccomp" ,libseccomp)
493 ("libsodium" ,libsodium)
497 (home-page "https://nixos.org/nix/")
498 (synopsis "The Nix package manager")
500 "Nix is a purely functional package manager. This means that it treats
501 packages like values in purely functional programming languages such as
502 Haskell—they are built by functions that don't have side-effects, and they
503 never change after they have been built. Nix stores packages in the Nix
504 store, usually the directory /nix/store, where each package has its own unique
506 (license license:lgpl2.1+)))
514 (uri (string-append "mirror://gnu/stow/stow-"
518 "0jrxy12ywn7smdzdnvwzjw77l6knx6jkj2rckgykg1dpf6bdkm89"))))
519 (build-system gnu-build-system)
523 `(("perl-test-simple" ,perl-test-simple)
524 ("perl-test-output" ,perl-test-output)
525 ("perl-capture-tiny" ,perl-capture-tiny)
526 ("perl-io-stringy" ,perl-io-stringy)))
527 (home-page "https://www.gnu.org/software/stow/")
528 (synopsis "Managing installed software packages")
530 "GNU Stow is a symlink manager. It generates symlinks to directories
531 of data and makes them appear to be merged into the same directory. It is
532 typically used for managing software packages installed from source, by
533 letting you install them apart in distinct directories and then create
534 symlinks to the files in a common directory such as /usr/local.")
535 (license license:gpl3+)))
543 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
544 (version-major+minor version) ".x/rpm-"
548 "1nmck2fq9h85fgs3zhh6w1avlw5y16cbz5khd459ry3jfd5w4f8i"))))
549 (build-system gnu-build-system)
551 '(#:configure-flags '("--with-external-db" ;use the system's bdb
554 #:phases (modify-phases %standard-phases
555 (add-before 'configure 'set-nss-library-path
556 (lambda* (#:key inputs #:allow-other-keys)
557 (let ((nss (assoc-ref inputs "nss")))
558 (setenv "LIBRARY_PATH"
559 (string-append (getenv "LIBRARY_PATH") ":"
563 `(("pkg-config" ,pkg-config)))
571 ("libarchive" ,libarchive)
576 (home-page "https://rpm.org/")
577 (synopsis "The RPM Package Manager")
579 "The RPM Package Manager (RPM) is a command-line driven package
580 management system capable of installing, uninstalling, verifying, querying,
581 and updating computer software packages. Each software package consists of an
582 archive of files along with information about the package like its version, a
583 description. There is also a library permitting developers to manage such
584 transactions from C or Python.")
586 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
587 (license license:gpl2+)))
589 (define-public python-anaconda-client
591 (name "python-anaconda-client")
597 (url "https://github.com/Anaconda-Platform/anaconda-client")
599 (file-name (git-file-name name version))
602 "0w1bfxnydjl9qp53r2gcvr6vlpdqqilcrzqxrll9sgg6vwdyiyyp"))))
603 (build-system python-build-system)
605 `(("python-pyyaml" ,python-pyyaml)
606 ("python-requests" ,python-requests)
607 ("python-clyent" ,python-clyent)))
609 `(("python-pytz" ,python-pytz)
610 ("python-dateutil" ,python-dateutil)
611 ("python-mock" ,python-mock)
612 ("python-coverage" ,python-coverage)
613 ("python-pillow" ,python-pillow)))
616 (modify-phases %standard-phases
617 ;; This is needed for some tests.
618 (add-before 'check 'set-up-home
619 (lambda* _ (setenv "HOME" "/tmp") #t))
620 (add-before 'check 'remove-network-tests
622 ;; Remove tests requiring a network connection
623 (let ((network-tests '("tests/test_upload.py"
624 "tests/test_authorizations.py"
625 "tests/test_login.py"
626 "tests/test_whoami.py"
627 "utils/notebook/tests/test_data_uri.py"
628 "utils/notebook/tests/test_base.py"
629 "utils/notebook/tests/test_downloader.py"
630 "inspect_package/tests/test_conda.py")))
631 (with-directory-excursion "binstar_client"
632 (for-each delete-file network-tests)))
634 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
635 (synopsis "Anaconda Cloud command line client library")
637 "Anaconda Cloud command line client library provides an interface to
638 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
640 (license license:bsd-3)))
642 (define-public python2-anaconda-client
643 (package-with-python2 python-anaconda-client))
645 (define-public python-conda
647 (name "python-conda")
653 (url "https://github.com/conda/conda")
655 (file-name (git-file-name name version))
658 "1qwy0awx4qf2pbk8z2b7q6wdcq7mvwpxxjhg27mbirdvs5hw7hb2"))))
659 (build-system python-build-system)
662 (modify-phases %standard-phases
663 (add-before 'build 'create-version-file
665 (with-output-to-file "conda/.version"
666 (lambda () (display ,version)))
668 (add-before 'check 'remove-failing-tests
670 ;; These tests require internet/network access
671 (let ((network-tests '("test_cli.py"
679 "conda_env/test_cli.py"
680 "conda_env/test_create.py"
681 "conda_env/specs/test_notebook.py"
682 "conda_env/utils/test_notebooks.py"
684 "core/test_repodata.py")))
685 (with-directory-excursion "tests"
686 (for-each delete-file network-tests)
688 ;; FIXME: This test creates a file, then deletes it and tests
689 ;; that the file was deleted. For some reason it fails when
690 ;; building with guix, but does not when you run it in the
691 ;; directory left when you build with the --keep-failed
693 (delete-file "gateways/disk/test_delete.py")
694 ;; This file is no longer writable after downloading with 'git-fetch'
695 (make-file-writable "conda_env/support/saved-env/environment.yml")
699 (setenv "HOME" "/tmp")
700 (invoke "py.test"))))))
702 `(("python-cytoolz" ,python-cytoolz)
703 ("python-ruamel.yaml" ,python-ruamel.yaml)
704 ("python-requests" ,python-requests)
705 ("python-pycosat" ,python-pycosat)
706 ("python-pytest" ,python-pytest)
707 ("python-responses" ,python-responses)
708 ("python-pyyaml" ,python-pyyaml)
709 ("python-anaconda-client" ,python-anaconda-client)))
710 (home-page "https://github.com/conda/conda")
711 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
713 "Conda is a cross-platform, Python-agnostic binary package manager. It
714 is the package manager used by Anaconda installations, but it may be used for
715 other systems as well. Conda makes environments first-class citizens, making
716 it easy to create independent environments even for C libraries. Conda is
717 written entirely in Python.
719 This package provides Conda as a library.")
720 (license license:bsd-3)))
722 (define-public python2-conda
723 (let ((base (package-with-python2
724 (strip-python2-variant python-conda))))
725 (package (inherit base)
727 `(("python2-enum34" ,python2-enum34)
728 ,@(package-native-inputs base))))))
731 (package (inherit python-conda)
734 (substitute-keyword-arguments (package-arguments python-conda)
736 `(modify-phases ,phases
738 (lambda* (#:key outputs #:allow-other-keys)
739 ;; This test fails when run before installation.
740 (delete-file "tests/test_activate.py")
742 ;; Fix broken defaults
743 (substitute* "conda/base/context.py"
744 (("return sys.prefix")
745 (string-append "return \"" (assoc-ref outputs "out") "\""))
746 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
747 (string-append "return False if self.root_prefix == self.conda_prefix else "
750 ;; The util/setup-testing.py is used to build conda in
751 ;; application form, rather than the default, library form.
752 ;; With this, we are able to run commands like `conda --help`
753 ;; directly on the command line
754 (invoke "python" "utils/setup-testing.py" "build_py")))
756 (lambda* (#:key inputs outputs #:allow-other-keys)
757 (let* ((out (assoc-ref outputs "out"))
758 (target (string-append out "/lib/python"
760 (assoc-ref inputs "python"))
762 ;; The installer aborts if the target directory is not on
765 (string-append target ":" (getenv "PYTHONPATH")))
767 ;; And it aborts if the directory doesn't exist.
769 (invoke "python" "utils/setup-testing.py" "install"
770 (string-append "--prefix=" out)))))
771 ;; The "activate" and "deactivate" scripts don't need wrapping.
772 ;; They also break when they are renamed.
773 (add-after 'wrap 'undo-wrap
774 (lambda* (#:key outputs #:allow-other-keys)
775 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
776 (delete-file "deactivate")
777 (rename-file ".deactivate-real" "deactivate")
778 (delete-file "activate")
779 (rename-file ".activate-real" "activate")
782 "Conda is a cross-platform, Python-agnostic binary package manager. It
783 is the package manager used by Anaconda installations, but it may be used for
784 other systems as well. Conda makes environments first-class citizens, making
785 it easy to create independent environments even for C libraries. Conda is
786 written entirely in Python.")))
794 (uri (string-append "mirror://gnu/gwl/gwl-" version ".tar.gz"))
797 "1ji5jvzni8aml9fmimlr11g3k8isrnlvnbzhmwgdjh72hils0alc"))))
798 (build-system gnu-build-system)
801 (modify-phases %standard-phases
802 (add-before 'build 'fix-tests
804 ;; Avoid cross-device link.
805 (substitute* "tests/cache.scm"
806 (("/tmp/gwl-test-input-XXXXXX")
807 (string-append (getcwd) "/gwl-test-input-XXXXXX")))
810 `(("autoconf" ,autoconf)
811 ("automake" ,automake)
812 ("pkg-config" ,pkg-config)
814 ("graphviz" ,graphviz)))
816 `(("guile" ,guile-3.0)))
818 `(("guix" ,guile3.0-guix)
819 ("guile-commonmark" ,guile3.0-commonmark)
820 ("guile-gcrypt" ,guile3.0-gcrypt)
821 ("guile-pfds" ,guile3.0-pfds)
822 ("guile-syntax-highlight" ,guile3.0-syntax-highlight)
823 ("guile-wisp" ,guile3.0-wisp)))
824 (home-page "https://workflows.guix.info")
825 (synopsis "Workflow management extension for GNU Guix")
826 (description "The @dfn{Guix Workflow Language} (GWL) provides an
827 extension to GNU Guix's declarative language for package management to
828 automate the execution of programs in scientific workflows. The GWL
829 can use process engines to integrate with various computing
831 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
832 ;; the web interface modules in gwl/ are licensed AGPL3+,
833 ;; and the fonts included in this package are licensed OFL1.1.
834 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
836 (define-public guix-jupyter
838 (name "guix-jupyter")
840 (home-page "https://gitlab.inria.fr/guix-hpc/guix-kernel")
843 (uri (git-reference (url home-page)
844 (commit (string-append "v" version))))
847 "01z7jjkc7r7lj6637rcgpz40v8xqqyfp6871h94yvcnwm7zy9h1n"))
848 (file-name (string-append "guix-jupyter-" version "-checkout"))))
849 (build-system gnu-build-system)
851 `(#:modules ((srfi srfi-26)
856 (guix build gnu-build-system))
858 (modify-phases %standard-phases
859 (add-after 'install 'sed-kernel-json
860 (lambda* (#:key inputs outputs #:allow-other-keys)
861 (let* ((out (assoc-ref outputs "out"))
862 (guix (assoc-ref inputs "guix"))
863 (guile (assoc-ref inputs "guile"))
864 (json (assoc-ref inputs "guile-json"))
865 (git (assoc-ref inputs "guile-git"))
866 (bs (assoc-ref inputs "guile-bytestructures"))
867 (s-zmq (assoc-ref inputs "guile-simple-zmq"))
868 (gcrypt (assoc-ref inputs "guile-gcrypt"))
869 (deps (list out s-zmq guix json git bs gcrypt))
872 (open-pipe* OPEN_READ
873 (string-append guile "/bin/guile")
874 "-c" "(display (effective-version))")))
875 (path (map (cut string-append "-L\", \"" <>
879 (gopath (map (cut string-append "-C\", \"" <>
880 "/lib/guile/" effective
883 (kernel-dir (string-append out "/share/jupyter/kernels/guix/")))
884 (substitute* (string-append kernel-dir "kernel.json")
887 (list (string-join path "\",\n\t\t\"")
888 (string-join gopath "\",\n\t\t\"")
891 (("guix-jupyter-kernel.scm")
892 (string-append out "/share/guile/site/2.2/"
893 "guix-jupyter-kernel.scm")))
896 `(("autoconf" ,autoconf)
897 ("automake" ,automake)
898 ("pkg-config" ,pkg-config)
902 ("python-ipython" ,python-ipython)
903 ("python-ipykernel" ,python-ipykernel)))
906 ("guile" ,guile-2.2)))
908 `(("guile-json" ,guile-json-3)
909 ("guile-simple-zmq" ,guile-simple-zmq)
910 ("guile-gcrypt" ,guile-gcrypt)))
911 (synopsis "Guix kernel for Jupyter")
913 "Guix-Jupyter is a Jupyter kernel. It allows you to annotate notebooks
914 with information about their software dependencies, such that code is executed
915 in the right software environment. Guix-Jupyter spawns the actual kernels
916 such as @code{python-ipykernel} on behalf of the notebook user and runs them
917 in an isolated environment, in separate namespaces.")
918 (license license:gpl3+)))
926 (uri (string-append "mirror://gnome/sources/gcab/"
927 version "/gcab-" version ".tar.xz"))
930 "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"))))
931 (build-system meson-build-system)
933 `(("glib:bin" ,glib "bin") ; for glib-mkenums
934 ("intltool" ,intltool)
935 ("pkg-config" ,pkg-config)
942 ;; XXX This ‘documentation’ is for developers, and fails informatively:
943 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
945 "-Dintrospection=false")))
946 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
947 (synopsis "Microsoft Cabinet file manipulation library")
949 "The libgcab library provides GObject functions to read, write, and modify
950 Microsoft cabinet (.@dfn{CAB}) files.")
951 (license (list license:gpl2+ ; tests/testsuite.at
952 license:lgpl2.1+)))) ; the rest
954 (define-public msitools
960 (uri (string-append "mirror://gnome/sources/msitools/"
961 version "/msitools-" version ".tar.xz"))
964 "1skq17qr2ic4qr3779j49byfm8rncwbsq9rj1a33ncn2m7isdwdv"))))
965 (build-system gnu-build-system)
968 ("pkg-config" ,pkg-config)))
974 ("uuid" ,util-linux "lib")))
975 (home-page "https://wiki.gnome.org/msitools")
976 (synopsis "Windows Installer file manipulation tool")
978 "msitools is a collection of command-line tools to inspect, extract, build,
979 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
980 for packaging and deployment of cross-compiled Windows applications.")
981 (license license:lgpl2.1+)))
983 (define-public libostree
990 "https://github.com/ostreedev/ostree/releases/download/v"
991 (version-major+minor version) "/libostree-" version ".tar.xz"))
994 "0sgx81w6skiivbr2gfhljf9nvnqfwwnwfgpqqa10fjdkjrqwvpk8"))))
995 (build-system gnu-build-system)
998 (modify-phases %standard-phases
999 (add-before 'check 'pre-check
1001 ;; Don't try to use the non-existing '/var/tmp' as test
1003 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
1006 ;; tap-driver.sh: missing test plan
1007 ;; tap-driver.sh: internal error getting exit status
1008 ;; tap-driver.sh: fatal: I/O or internal error
1011 `(("attr" ,attr) ; for tests
1013 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
1014 ("gobject-introspection" ,gobject-introspection)
1015 ("pkg-config" ,pkg-config)
1016 ("xsltproc" ,libxslt)))
1019 ("docbook-xml" ,docbook-xml-4.2)
1020 ("docbook-xsl" ,docbook-xsl)
1021 ("e2fsprogs" ,e2fsprogs)
1025 ("libarchive" ,libarchive)
1026 ("libsoup" ,libsoup)
1027 ("util-linux" ,util-linux)))
1028 (home-page "https://ostree.readthedocs.io/en/latest/")
1029 (synopsis "Operating system and container binary deployment and upgrades")
1031 "@code{libostree} is both a shared library and suite of command line
1032 tools that combines a \"git-like\" model for committing and downloading
1033 bootable file system trees, along with a layer for deploying them and managing
1034 the boot loader configuration.")
1035 (license license:lgpl2.0+)))
1037 (define-public flatpak
1044 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
1045 version "/flatpak-" version ".tar.xz"))
1048 "11bfxmv8pxlb5x0lb2rsl45615fzfvq5r6wldf0l6ab2ngryd7i7"))))
1050 ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
1051 ;; find the TLS backend in glib-networking.
1052 (build-system glib-or-gtk-build-system)
1055 '(#:tests? #f ;; Tests fail due to trying to create files where it can't.
1056 #:configure-flags (list
1057 "--enable-documentation=no" ;; FIXME
1058 "--enable-system-helper=no"
1059 "--localstatedir=/var"
1060 (string-append "--with-system-bubblewrap="
1061 (assoc-ref %build-inputs "bubblewrap")
1063 (native-inputs `(("bison" ,bison)
1064 ("gettext" ,gnu-gettext)
1065 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
1066 ("gobject-introspection" ,gobject-introspection)
1068 ("pkg-config" ,pkg-config)))
1069 (propagated-inputs `(("glib-networking" ,glib-networking)
1071 ("gsettings-desktop-schemas"
1072 ,gsettings-desktop-schemas)))
1073 (inputs `(("appstream-glib" ,appstream-glib)
1074 ("bubblewrap" ,bubblewrap)
1077 ("gdk-pixbuf" ,gdk-pixbuf)
1079 ("json-glib" ,json-glib)
1080 ("libarchive" ,libarchive)
1081 ("libostree" ,libostree)
1082 ("libseccomp" ,libseccomp)
1083 ("libsoup" ,libsoup)
1085 ("libxml2" ,libxml2)
1086 ("util-linux" ,util-linux)))
1087 (home-page "https://flatpak.org")
1088 (synopsis "System for building, distributing, and running sandboxed desktop
1090 (description "Flatpak is a system for building, distributing, and running
1091 sandboxed desktop applications on GNU/Linux.")
1092 (license license:lgpl2.1+)))