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>
16 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages package-management)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages acl)
36 #:use-module (gnu packages attr)
37 #:use-module (gnu packages avahi)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages backup)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages bash)
42 #:use-module (gnu packages bdw-gc)
43 #:use-module (gnu packages bison)
44 #:use-module (gnu packages boost)
45 #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
46 #:use-module (gnu packages check)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages cpio)
49 #:use-module (gnu packages crypto)
50 #:use-module (gnu packages curl)
51 #:use-module (gnu packages dbm)
52 #:use-module (gnu packages docbook)
53 #:use-module (gnu packages file)
54 #:use-module (gnu packages gettext)
55 #:use-module (gnu packages glib)
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages gnupg)
58 #:use-module (gnu packages graphviz)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages guile)
61 #:use-module (gnu packages guile-xyz)
62 #:use-module (gnu packages hurd)
63 #:use-module (gnu packages libedit)
64 #:use-module (gnu packages linux)
65 #:use-module (gnu packages lisp)
66 #:use-module (gnu packages man)
67 #:use-module (gnu packages nettle)
68 #:use-module (gnu packages networking)
69 #:use-module (gnu packages nss)
70 #:use-module (gnu packages patchutils)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages perl-check)
73 #:use-module (gnu packages pkg-config)
74 #:use-module (gnu packages popt)
75 #:use-module (gnu packages python)
76 #:use-module (gnu packages python-web)
77 #:use-module (gnu packages python-xyz)
78 #:use-module (gnu packages serialization)
79 #:use-module (gnu packages sqlite)
80 #:use-module (gnu packages ssh)
81 #:use-module (gnu packages texinfo)
82 #:use-module (gnu packages time)
83 #:use-module (gnu packages tls)
84 #:use-module (gnu packages vim)
85 #:use-module (gnu packages virtualization)
86 #:use-module (gnu packages web)
87 #:use-module (gnu packages xml)
88 #:use-module (gnu packages xorg)
89 #:use-module (guix build-system glib-or-gtk)
90 #:use-module (guix build-system gnu)
91 #:use-module (guix build-system meson)
92 #:use-module (guix build-system python)
93 #:use-module (guix download)
94 #:use-module (guix gexp)
95 #:use-module (guix git-download)
96 #:use-module ((guix licenses) #:prefix license:)
97 #:use-module (guix packages)
98 #:use-module (guix utils)
99 #:use-module (ice-9 match)
100 #:use-module (srfi srfi-1))
102 (define (boot-guile-uri arch)
103 "Return the URI for the bootstrap Guile tarball for ARCH."
104 (cond ((string=? "armhf" arch)
105 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
107 "/20150101/guile-2.0.11.tar.xz"))
108 ((string=? "aarch64" arch)
109 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
110 arch "-linux/20170217/guile-2.0.14.tar.xz"))
112 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
114 "/20131110/guile-2.0.9.tar.xz"))))
117 ;; Latest version of Guix, which may or may not correspond to a release.
118 ;; Note: the 'update-guix-package.scm' script expects this definition to
119 ;; start precisely like this.
120 (let ((version "1.1.0")
121 (commit "ab9e30039d9312285ea3f4ed43f81c9c2c0dae08")
126 (version (if (zero? revision)
128 (string-append version "-"
129 (number->string revision)
130 "." (string-take commit 7))))
134 (url "https://git.savannah.gnu.org/r/guix.git")
138 "0qb2haf5dyq5x1hcjyx58v455lzi6ffa68ldm0615jy25w5phmxq"))
139 (file-name (string-append "guix-" version "-checkout"))))
140 (build-system gnu-build-system)
142 `(#:configure-flags (list
143 "--localstatedir=/var"
145 (string-append "--with-bash-completion-dir="
146 (assoc-ref %outputs "out")
147 "/etc/bash_completion.d")
149 ;; Set 'DOT_USER_PROGRAM' to the empty string so
150 ;; we don't keep a reference to Graphviz, whose
151 ;; closure is pretty big (too big for the Guix
152 ;; system installation image.)
153 "ac_cv_path_DOT_USER_PROGRAM=dot"
155 ;; To avoid problems with the length of shebangs,
156 ;; choose a fixed-width and short directory name
158 "ac_cv_guix_test_root=/tmp/guix-tests"
159 ,@(if (hurd-target?) '("--with-courage") '()))
160 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
162 #:modules ((guix build gnu-build-system)
168 #:phases (modify-phases %standard-phases
171 ;; Make sure 'msgmerge' can modify the PO files.
172 (for-each (lambda (po)
174 (find-files "." "\\.po$"))
176 (patch-shebang "build-aux/git-version-gen")
178 (call-with-output-file ".tarball-version"
180 (display ,version port)))
182 ;; Install SysV init files to $(prefix)/etc rather
184 (substitute* "nix/local.mk"
185 (("^sysvinitservicedir = .*$")
186 (string-append "sysvinitservicedir = \
187 $(prefix)/etc/init.d\n")))
189 (invoke "sh" "bootstrap")))
190 (add-before 'build 'use-host-compressors
191 (lambda* (#:key inputs target #:allow-other-keys)
193 ;; Use host compressors.
194 (let ((bzip2 (assoc-ref inputs "bzip2"))
195 (gzip (assoc-ref inputs "gzip"))
196 (xz (assoc-ref inputs "xz")))
197 (substitute* "guix/config.scm"
198 (("\"[^\"]*/bin/bzip2")
199 (string-append "\"" bzip2 "/bin/bzip2"))
200 (("\"[^\"]*/bin/gzip") gzip
201 (string-append "\"" gzip "/bin/gzip"))
202 (("\"[^\"]*/bin//xz")
203 (string-append "\"" xz "/bin/xz")))))
205 (add-before 'check 'copy-bootstrap-guile
206 (lambda* (#:key system target inputs #:allow-other-keys)
207 ;; Copy the bootstrap guile tarball in the store
208 ;; used by the test suite.
209 (define (intern file recursive?)
210 ;; Note: don't use 'guix download' here because we
211 ;; need to set the 'recursive?' argument.
213 (strip-store-file-name file))
219 (let* ((item (add-to-store store ,base
222 (root (string-append "/tmp/gc-root-"
224 ;; Register a root so that the GC tests
225 ;; don't delete those.
227 (add-indirect-root store root)))))
229 (invoke "./test-env" "guile" "-c"
230 (object->string code)))
233 (intern (assoc-ref inputs "boot-guile") #f)
235 ;; On x86_64 some tests need the i686 Guile.
236 ,@(if (and (not (%current-target-system))
237 (string=? (%current-system)
239 '((intern (assoc-ref inputs "boot-guile/i686") #f))
242 ;; Copy the bootstrap executables.
243 (for-each (lambda (input)
244 (intern (assoc-ref inputs input) #t))
245 '("bootstrap/bash" "bootstrap/mkdir"
246 "bootstrap/tar" "bootstrap/xz")))
248 (add-after 'unpack 'disable-failing-tests
249 ;; XXX FIXME: These tests fail within the build container.
251 (substitute* "tests/syscalls.scm"
252 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
253 (string-append "(test-skip 1)\n" all)))
254 (substitute* "tests/containers.scm"
255 (("^\\(test-(assert|equal)" all)
256 (string-append "(test-skip 1)\n" all)))
257 (when (file-exists? "tests/guix-environment-container.sh")
258 (substitute* "tests/guix-environment-container.sh"
259 (("guix environment --version")
262 (add-before 'check 'set-SHELL
264 ;; 'guix environment' tests rely on 'SHELL' having a
265 ;; correct value, so set it.
266 (setenv "SHELL" (which "sh"))
268 (add-after 'install 'wrap-program
269 (lambda* (#:key inputs native-inputs outputs target
271 ;; Make sure the 'guix' command finds GnuTLS,
272 ;; Guile-JSON, and Guile-Git automatically.
273 (let* ((out (assoc-ref outputs "out"))
274 (guile ,@(if (%current-target-system)
275 '((assoc-ref native-inputs "guile"))
276 '((assoc-ref inputs "guile"))))
277 (gcrypt (assoc-ref inputs "guile-gcrypt"))
278 (json (assoc-ref inputs "guile-json"))
279 (sqlite (assoc-ref inputs "guile-sqlite3"))
280 (git (assoc-ref inputs "guile-git"))
281 (bs (assoc-ref inputs
282 "guile-bytestructures"))
283 (ssh (assoc-ref inputs "guile-ssh"))
284 (gnutls (assoc-ref inputs "gnutls"))
285 (locales (assoc-ref inputs "glibc-utf8-locales"))
286 (deps (list gcrypt json sqlite gnutls
290 (open-pipe* OPEN_READ
291 (string-append guile "/bin/guile")
292 "-c" "(display (effective-version))")))
294 (map (cut string-append <>
300 (map (cut string-append <>
301 "/lib/guile/" effective
305 (locpath (string-append locales "/lib/locale")))
307 (wrap-program (string-append out "/bin/guix")
308 `("GUILE_LOAD_PATH" ":" prefix (,path))
309 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
310 `("GUIX_LOCPATH" ":" suffix (,locpath)))
313 ;; XXX Touching wrap-program rebuilds world
314 (let ((bash (assoc-ref inputs "bash")))
315 (substitute* (string-append out "/bin/guix")
316 (("^#!.*/bash") (string-append "#! " bash "/bin/bash")))))
318 (native-inputs `(("pkg-config" ,pkg-config)
320 ;; Guile libraries are needed here for
321 ;; cross-compilation.
324 ("guile-gcrypt" ,guile-gcrypt)
325 ("guile-json" ,guile-json-4)
326 ("guile-sqlite3" ,guile-sqlite3)
327 ("guile-ssh" ,guile-ssh)
328 ("guile-git" ,guile-git)
330 ;; XXX: Keep the development inputs here even though
331 ;; they're unnecessary, just so that 'guix environment
332 ;; guix' always contains them.
333 ("autoconf" ,autoconf-wrapper)
334 ("automake" ,automake)
335 ("gettext" ,gettext-minimal)
337 ("graphviz" ,graphviz)
338 ("help2man" ,help2man)
343 ("zlib" ,zlib) ;for 'guix publish'
344 ("lzlib" ,lzlib) ;for 'guix publish' and 'guix substitute'
347 ("libgcrypt" ,libgcrypt)
351 ;; Some of the tests use "unshare" when it is available.
352 ("util-linux" ,util-linux)
354 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
356 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
357 ,@(if (and (not (%current-target-system))
358 (string=? (%current-system) "x86_64-linux"))
359 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
361 ,@(if (%current-target-system)
362 `(("bash" ,bash-minimal)
366 ;; Tests also rely on these bootstrap executables.
367 ("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system)))
368 ("bootstrap/mkdir" ,(bootstrap-executable "mkdir" (%current-system)))
369 ("bootstrap/tar" ,(bootstrap-executable "tar" (%current-system)))
370 ("bootstrap/xz" ,(bootstrap-executable "xz" (%current-system)))
372 ("glibc-utf8-locales" ,glibc-utf8-locales)))
374 `(("gnutls" ,(if (%current-target-system) gnutls-3.6.14 guile3.0-gnutls))
375 ("guile-gcrypt" ,guile-gcrypt)
376 ("guile-json" ,guile-json-4)
377 ("guile-sqlite3" ,guile-sqlite3)
378 ("guile-ssh" ,guile-ssh)
379 ("guile-git" ,guile-git)))
381 (home-page "https://www.gnu.org/software/guix/")
382 (synopsis "Functional package manager for installed software packages and versions")
384 "GNU Guix is a functional package manager for the GNU system, and is
385 also a distribution thereof. It includes a virtual machine image. Besides
386 the usual package management features, it also supports transactional
387 upgrades and roll-backs, per-user profiles, and much more. It is based on
388 the Nix package manager.")
389 (license license:gpl3+)
390 (properties '((ftp-server . "alpha.gnu.org"))))))
392 (define-public guix-daemon
393 ;; This package is for internal consumption: it allows us to quickly build
394 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
398 (properties `((hidden? . #t)))
401 ;; Use a minimum set of dependencies.
403 (fold alist-delete (package-native-inputs guix)
404 '("po4a" "graphviz" "help2man")))
406 `(("gnutls" ,guile3.0-gnutls)
407 ("guile-git" ,guile-git)
408 ("guile-json" ,guile-json-3)
409 ("guile-gcrypt" ,guile-gcrypt)
410 ,@(fold alist-delete (package-inputs guix)
411 '("boot-guile" "boot-guile/i686" "util-linux"))))
413 (propagated-inputs '())
416 (substitute-keyword-arguments (package-arguments guix)
417 ((#:configure-flags flags '())
418 ;; Pretend we have those libraries; we don't actually need them.
420 '("guix_cv_have_recent_guile_sqlite3=yes"
421 "guix_cv_have_recent_guile_ssh=yes")))
424 ((#:phases phases '%standard-phases)
425 `(modify-phases ,phases
426 (add-after 'unpack 'change-default-guix
428 ;; We need to tell 'guix-daemon' which 'guix' command to use.
429 ;; Here we use a questionable hack where we hard-code root's
430 ;; current guix, which could be wrong (XXX). Note that scripts
431 ;; like 'guix perform-download' do not run as root so we assume
432 ;; that they have access to /var/guix/profiles/per-user/root.
433 (substitute* "nix/libstore/globals.cc"
434 (("guixProgram = (.*)nixBinDir + \"/guix\"" _ before)
435 (string-append "guixProgram = " before
436 "/var/guix/profiles/per-user/root\
437 /current-guix/bin/guix")))
441 (invoke "make" "nix/libstore/schema.sql.hh")
442 (invoke "make" "-j" (number->string
443 (parallel-job-count))
445 (delete 'copy-bootstrap-guile)
447 (lambda* (#:key outputs #:allow-other-keys)
448 (invoke "make" "install-binPROGRAMS")))
449 (delete 'wrap-program)))))))
452 (define-public guile2.2-guix
455 (name "guile2.2-guix")
457 `(("guile" ,guile-2.2)
458 ("gnutls" ,guile2.2-gnutls)
459 ("guile-gcrypt" ,guile2.2-gcrypt)
460 ("guile-json" ,guile2.2-json)
461 ("guile-sqlite3" ,guile2.2-sqlite3)
462 ("guile-ssh" ,guile2.2-ssh)
463 ("guile-git" ,guile2.2-git)
464 ,@(fold alist-delete (package-native-inputs guix)
465 '("guile" "gnutls" "guile-gcrypt" "guile-json"
466 "guile-sqlite3" "guile-ssh" "guile-git"))))
468 `(("guile" ,guile-2.2)
469 ,@(alist-delete "guile" (package-inputs guix))))
472 ("guile-gcrypt" ,guile2.2-gcrypt)
473 ("guile-json" ,guile2.2-json)
474 ("guile-sqlite3" ,guile2.2-sqlite3)
475 ("guile-ssh" ,guile2.2-ssh)
476 ("guile-git" ,guile2.2-git)))))
478 (define-public guile3.0-guix
479 (deprecated-package "guile3.0-guix" guix))
481 (define-public guix-minimal
482 ;; A version of Guix which is built with the minimal set of dependencies, as
483 ;; outlined in the README "Requirements" section. Intended as a CI job, so
488 (name "guix-minimal")
490 `(("guile" ,guile-2.2)
491 ,@(alist-delete "guile" (package-inputs guix))))
494 (package-propagated-inputs guix)
497 (define (source-file? file stat)
498 "Return true if FILE is likely a source file, false if it is a typical
500 (define (wrong-extension? file)
501 (or (string-suffix? "~" file)
502 (member (file-extension file)
503 '("o" "a" "lo" "so" "go"))))
505 (match (basename file)
506 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
508 ((? wrong-extension?)
513 (define-public current-guix-package
514 ;; This parameter allows callers to override the package that 'current-guix'
515 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
516 ;; for instance because it's not running from a source code checkout.
519 (define-public current-guix
520 (let* ((repository-root (delay (canonicalize-path
521 (string-append (current-source-directory)
523 (select? (delay (or (git-predicate (force repository-root))
526 "Return a package representing Guix built from the current source tree.
527 This works by adding the current source tree to the store (after filtering it
528 out) and returning a package that uses that as its 'source'."
529 (or (current-guix-package)
532 (version (string-append (package-version guix) "+"))
533 (source (local-file (force repository-root) "guix-current"
535 #:select? (force select?))))))))
548 (uri (string-append "http://nixos.org/releases/nix/nix-"
549 version "/nix-" version ".tar.xz"))
552 "1hbqsrp1ii2sfq8x2mahjrl2182qck76n8blrl1jfz3xq99m6i15"))))
553 (build-system gnu-build-system)
554 (native-inputs `(("pkg-config" ,pkg-config)))
555 (inputs `(("boost" ,boost)
559 ("editline" ,editline)
561 ("libseccomp" ,libseccomp)
562 ("libsodium" ,libsodium)
566 (home-page "https://nixos.org/nix/")
567 (synopsis "The Nix package manager")
569 "Nix is a purely functional package manager. This means that it treats
570 packages like values in purely functional programming languages such as
571 Haskell—they are built by functions that don't have side-effects, and they
572 never change after they have been built. Nix stores packages in the Nix
573 store, usually the directory /nix/store, where each package has its own unique
575 (license license:lgpl2.1+)))
583 (uri (string-append "mirror://gnu/stow/stow-"
587 "0jrxy12ywn7smdzdnvwzjw77l6knx6jkj2rckgykg1dpf6bdkm89"))))
588 (build-system gnu-build-system)
592 `(("perl-test-simple" ,perl-test-simple)
593 ("perl-test-output" ,perl-test-output)
594 ("perl-capture-tiny" ,perl-capture-tiny)
595 ("perl-io-stringy" ,perl-io-stringy)))
596 (home-page "https://www.gnu.org/software/stow/")
597 (synopsis "Managing installed software packages")
599 "GNU Stow is a symlink manager. It generates symlinks to directories
600 of data and makes them appear to be merged into the same directory. It is
601 typically used for managing software packages installed from source, by
602 letting you install them apart in distinct directories and then create
603 symlinks to the files in a common directory such as /usr/local.")
604 (license license:gpl3+)))
612 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
613 (version-major+minor version) ".x/rpm-"
617 "1nmck2fq9h85fgs3zhh6w1avlw5y16cbz5khd459ry3jfd5w4f8i"))))
618 (build-system gnu-build-system)
620 '(#:configure-flags '("--with-external-db" ;use the system's bdb
623 #:phases (modify-phases %standard-phases
624 (add-before 'configure 'set-nss-library-path
625 (lambda* (#:key inputs #:allow-other-keys)
626 (let ((nss (assoc-ref inputs "nss")))
627 (setenv "LIBRARY_PATH"
628 (string-append (getenv "LIBRARY_PATH") ":"
632 `(("pkg-config" ,pkg-config)))
640 ("libarchive" ,libarchive)
645 (home-page "https://rpm.org/")
646 (synopsis "The RPM Package Manager")
648 "The RPM Package Manager (RPM) is a command-line driven package
649 management system capable of installing, uninstalling, verifying, querying,
650 and updating computer software packages. Each software package consists of an
651 archive of files along with information about the package like its version, a
652 description. There is also a library permitting developers to manage such
653 transactions from C or Python.")
655 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
656 (license license:gpl2+)))
658 (define-public python-anaconda-client
660 (name "python-anaconda-client")
666 (url "https://github.com/Anaconda-Platform/anaconda-client")
668 (file-name (git-file-name name version))
671 "0w1bfxnydjl9qp53r2gcvr6vlpdqqilcrzqxrll9sgg6vwdyiyyp"))))
672 (build-system python-build-system)
674 `(("python-pyyaml" ,python-pyyaml)
675 ("python-requests" ,python-requests)
676 ("python-clyent" ,python-clyent)))
678 `(("python-pytz" ,python-pytz)
679 ("python-dateutil" ,python-dateutil)
680 ("python-mock" ,python-mock)
681 ("python-coverage" ,python-coverage)
682 ("python-pillow" ,python-pillow)))
685 (modify-phases %standard-phases
686 ;; This is needed for some tests.
687 (add-before 'check 'set-up-home
688 (lambda* _ (setenv "HOME" "/tmp") #t))
689 (add-before 'check 'remove-network-tests
691 ;; Remove tests requiring a network connection
692 (let ((network-tests '("tests/test_upload.py"
693 "tests/test_authorizations.py"
694 "tests/test_login.py"
695 "tests/test_whoami.py"
696 "utils/notebook/tests/test_data_uri.py"
697 "utils/notebook/tests/test_base.py"
698 "utils/notebook/tests/test_downloader.py"
699 "inspect_package/tests/test_conda.py")))
700 (with-directory-excursion "binstar_client"
701 (for-each delete-file network-tests)))
703 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
704 (synopsis "Anaconda Cloud command line client library")
706 "Anaconda Cloud command line client library provides an interface to
707 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
709 (license license:bsd-3)))
711 (define-public python2-anaconda-client
712 (package-with-python2 python-anaconda-client))
714 (define-public python-conda
716 (name "python-conda")
722 (url "https://github.com/conda/conda")
724 (file-name (git-file-name name version))
727 "1qwy0awx4qf2pbk8z2b7q6wdcq7mvwpxxjhg27mbirdvs5hw7hb2"))))
728 (build-system python-build-system)
731 (modify-phases %standard-phases
732 (add-before 'build 'create-version-file
734 (with-output-to-file "conda/.version"
735 (lambda () (display ,version)))
737 (add-before 'check 'remove-failing-tests
739 ;; These tests require internet/network access
740 (let ((network-tests '("test_cli.py"
748 "conda_env/test_cli.py"
749 "conda_env/test_create.py"
750 "conda_env/specs/test_notebook.py"
751 "conda_env/utils/test_notebooks.py"
753 "core/test_repodata.py")))
754 (with-directory-excursion "tests"
755 (for-each delete-file network-tests)
757 ;; FIXME: This test creates a file, then deletes it and tests
758 ;; that the file was deleted. For some reason it fails when
759 ;; building with guix, but does not when you run it in the
760 ;; directory left when you build with the --keep-failed
762 (delete-file "gateways/disk/test_delete.py")
763 ;; This file is no longer writable after downloading with 'git-fetch'
764 (make-file-writable "conda_env/support/saved-env/environment.yml")
768 (setenv "HOME" "/tmp")
769 (invoke "py.test"))))))
771 `(("python-cytoolz" ,python-cytoolz)
772 ("python-ruamel.yaml" ,python-ruamel.yaml)
773 ("python-requests" ,python-requests)
774 ("python-pycosat" ,python-pycosat)
775 ("python-pytest" ,python-pytest)
776 ("python-responses" ,python-responses)
777 ("python-pyyaml" ,python-pyyaml)
778 ("python-anaconda-client" ,python-anaconda-client)))
779 (home-page "https://github.com/conda/conda")
780 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
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.
788 This package provides Conda as a library.")
789 (license license:bsd-3)))
791 (define-public python2-conda
792 (let ((base (package-with-python2
793 (strip-python2-variant python-conda))))
794 (package (inherit base)
796 `(("python2-enum34" ,python2-enum34)
797 ,@(package-native-inputs base))))))
800 (package (inherit python-conda)
803 (substitute-keyword-arguments (package-arguments python-conda)
805 `(modify-phases ,phases
807 (lambda* (#:key outputs #:allow-other-keys)
808 ;; This test fails when run before installation.
809 (delete-file "tests/test_activate.py")
811 ;; Fix broken defaults
812 (substitute* "conda/base/context.py"
813 (("return sys.prefix")
814 (string-append "return \"" (assoc-ref outputs "out") "\""))
815 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
816 (string-append "return False if self.root_prefix == self.conda_prefix else "
819 ;; The util/setup-testing.py is used to build conda in
820 ;; application form, rather than the default, library form.
821 ;; With this, we are able to run commands like `conda --help`
822 ;; directly on the command line
823 (invoke "python" "utils/setup-testing.py" "build_py")))
825 (lambda* (#:key inputs outputs #:allow-other-keys)
826 (let* ((out (assoc-ref outputs "out"))
827 (target (string-append out "/lib/python"
829 (assoc-ref inputs "python"))
831 ;; The installer aborts if the target directory is not on
834 (string-append target ":" (getenv "PYTHONPATH")))
836 ;; And it aborts if the directory doesn't exist.
838 (invoke "python" "utils/setup-testing.py" "install"
839 (string-append "--prefix=" out)))))
840 ;; The "activate" and "deactivate" scripts don't need wrapping.
841 ;; They also break when they are renamed.
842 (add-after 'wrap 'undo-wrap
843 (lambda* (#:key outputs #:allow-other-keys)
844 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
845 (delete-file "deactivate")
846 (rename-file ".deactivate-real" "deactivate")
847 (delete-file "activate")
848 (rename-file ".activate-real" "activate")
851 "Conda is a cross-platform, Python-agnostic binary package manager. It
852 is the package manager used by Anaconda installations, but it may be used for
853 other systems as well. Conda makes environments first-class citizens, making
854 it easy to create independent environments even for C libraries. Conda is
855 written entirely in Python.")))
863 (uri (string-append "mirror://gnu/gwl/gwl-" version ".tar.gz"))
866 "1ji5jvzni8aml9fmimlr11g3k8isrnlvnbzhmwgdjh72hils0alc"))))
867 (build-system gnu-build-system)
870 (modify-phases %standard-phases
871 (add-before 'build 'fix-tests
873 ;; Avoid cross-device link.
874 (substitute* "tests/cache.scm"
875 (("/tmp/gwl-test-input-XXXXXX")
876 (string-append (getcwd) "/gwl-test-input-XXXXXX")))
879 `(("autoconf" ,autoconf)
880 ("automake" ,automake)
881 ("pkg-config" ,pkg-config)
883 ("graphviz" ,graphviz)))
885 `(("guile" ,guile-3.0)))
888 ("guile-commonmark" ,guile-commonmark)
889 ("guile-gcrypt" ,guile-gcrypt)
890 ("guile-pfds" ,guile-pfds)
891 ("guile-syntax-highlight" ,guile-syntax-highlight)
892 ("guile-wisp" ,guile-wisp)))
893 (home-page "https://workflows.guix.info")
894 (synopsis "Workflow management extension for GNU Guix")
895 (description "The @dfn{Guix Workflow Language} (GWL) provides an
896 extension to GNU Guix's declarative language for package management to
897 automate the execution of programs in scientific workflows. The GWL
898 can use process engines to integrate with various computing
900 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
901 ;; the web interface modules in gwl/ are licensed AGPL3+,
902 ;; and the fonts included in this package are licensed OFL1.1.
903 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
905 (define-public guix-jupyter
907 (name "guix-jupyter")
909 (home-page "https://gitlab.inria.fr/guix-hpc/guix-kernel")
912 (uri (git-reference (url home-page)
913 (commit (string-append "v" version))))
916 "01z7jjkc7r7lj6637rcgpz40v8xqqyfp6871h94yvcnwm7zy9h1n"))
917 (modules '((guix build utils)))
920 ;; Allow builds with Guile 3.0.
921 (substitute* "configure.ac"
923 "GUILE_PKG([3.0 2.2])\n"))
925 (file-name (string-append "guix-jupyter-" version "-checkout"))))
926 (build-system gnu-build-system)
928 `(#:modules ((srfi srfi-26)
933 (guix build gnu-build-system))
935 (modify-phases %standard-phases
936 (add-after 'install 'sed-kernel-json
937 (lambda* (#:key inputs outputs #:allow-other-keys)
938 (let* ((out (assoc-ref outputs "out"))
939 (guix (assoc-ref inputs "guix"))
940 (guile (assoc-ref inputs "guile"))
941 (json (assoc-ref inputs "guile-json"))
942 (git (assoc-ref inputs "guile-git"))
943 (bs (assoc-ref inputs "guile-bytestructures"))
944 (s-zmq (assoc-ref inputs "guile-simple-zmq"))
945 (gcrypt (assoc-ref inputs "guile-gcrypt"))
946 (deps (list out s-zmq guix json git bs gcrypt))
949 (open-pipe* OPEN_READ
950 (string-append guile "/bin/guile")
951 "-c" "(display (effective-version))")))
952 (path (map (cut string-append "-L\", \"" <>
956 (gopath (map (cut string-append "-C\", \"" <>
957 "/lib/guile/" effective
960 (kernel-dir (string-append out "/share/jupyter/kernels/guix/")))
961 (substitute* (string-append kernel-dir "kernel.json")
964 (list (string-join path "\",\n\t\t\"")
965 (string-join gopath "\",\n\t\t\"")
968 (("guix-jupyter-kernel.scm")
969 (string-append out "/share/guile/site/2.2/"
970 "guix-jupyter-kernel.scm")))
973 `(("autoconf" ,autoconf)
974 ("automake" ,automake)
975 ("pkg-config" ,pkg-config)
979 ("python-ipython" ,python-ipython)
980 ("python-ipykernel" ,python-ipykernel)))
983 ("guile" ,guile-3.0)))
985 `(("guile-json" ,guile-json-4)
986 ("guile-simple-zmq" ,guile-simple-zmq)
987 ("guile-gcrypt" ,guile-gcrypt)))
988 (synopsis "Guix kernel for Jupyter")
990 "Guix-Jupyter is a Jupyter kernel. It allows you to annotate notebooks
991 with information about their software dependencies, such that code is executed
992 in the right software environment. Guix-Jupyter spawns the actual kernels
993 such as @code{python-ipykernel} on behalf of the notebook user and runs them
994 in an isolated environment, in separate namespaces.")
995 (license license:gpl3+)))
1003 (uri (string-append "mirror://gnome/sources/gcab/"
1004 version "/gcab-" version ".tar.xz"))
1007 "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"))))
1008 (build-system meson-build-system)
1010 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1011 ("intltool" ,intltool)
1012 ("pkg-config" ,pkg-config)
1019 ;; XXX This ‘documentation’ is for developers, and fails informatively:
1020 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
1021 (list "-Ddocs=false"
1022 "-Dintrospection=false")))
1023 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
1024 (synopsis "Microsoft Cabinet file manipulation library")
1026 "The libgcab library provides GObject functions to read, write, and modify
1027 Microsoft cabinet (.@dfn{CAB}) files.")
1028 (license (list license:gpl2+ ; tests/testsuite.at
1029 license:lgpl2.1+)))) ; the rest
1031 (define-public msitools
1037 (uri (string-append "mirror://gnome/sources/msitools/"
1038 version "/msitools-" version ".tar.xz"))
1041 "1skq17qr2ic4qr3779j49byfm8rncwbsq9rj1a33ncn2m7isdwdv"))))
1042 (build-system gnu-build-system)
1045 ("pkg-config" ,pkg-config)))
1050 ("libxml2" ,libxml2)
1051 ("uuid" ,util-linux "lib")))
1052 (home-page "https://wiki.gnome.org/msitools")
1053 (synopsis "Windows Installer file manipulation tool")
1055 "msitools is a collection of command-line tools to inspect, extract, build,
1056 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
1057 for packaging and deployment of cross-compiled Windows applications.")
1058 (license license:lgpl2.1+)))
1060 (define-public libostree
1067 "https://github.com/ostreedev/ostree/releases/download/v"
1068 (version-major+minor version) "/libostree-" version ".tar.xz"))
1071 "01cch4as23xspq6pck59al7x5jj60wl21g8p3iqbdxcjl1p3jxsq"))))
1072 (build-system gnu-build-system)
1075 (modify-phases %standard-phases
1076 (add-before 'check 'pre-check
1078 ;; Don't try to use the non-existing '/var/tmp' as test
1080 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
1083 ;; tap-driver.sh: missing test plan
1084 ;; tap-driver.sh: internal error getting exit status
1085 ;; tap-driver.sh: fatal: I/O or internal error
1088 `(("attr" ,attr) ; for tests
1090 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
1091 ("gobject-introspection" ,gobject-introspection)
1092 ("pkg-config" ,pkg-config)
1093 ("xsltproc" ,libxslt)))
1096 ("docbook-xml" ,docbook-xml-4.2)
1097 ("docbook-xsl" ,docbook-xsl)
1098 ("e2fsprogs" ,e2fsprogs)
1102 ("libarchive" ,libarchive)
1103 ("libsoup" ,libsoup)
1104 ("util-linux" ,util-linux)))
1105 (home-page "https://ostree.readthedocs.io/en/latest/")
1106 (synopsis "Operating system and container binary deployment and upgrades")
1108 "@code{libostree} is both a shared library and suite of command line
1109 tools that combines a \"git-like\" model for committing and downloading
1110 bootable file system trees, along with a layer for deploying them and managing
1111 the boot loader configuration.")
1112 (license license:lgpl2.0+)))
1114 (define-public flatpak
1121 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
1122 version "/flatpak-" version ".tar.xz"))
1125 "17s8nqdxd4xdy7ag9bw06adxccha78jmlsa3zpqnl3qh92pg0hji"))))
1127 ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
1128 ;; find the TLS backend in glib-networking.
1129 (build-system glib-or-gtk-build-system)
1134 "--enable-documentation=no" ;; FIXME
1135 "--enable-system-helper=no"
1136 "--localstatedir=/var"
1137 (string-append "--with-system-bubblewrap="
1138 (assoc-ref %build-inputs "bubblewrap")
1140 "--with-system-dbus-proxy")
1142 (modify-phases %standard-phases
1143 (add-after 'unpack 'fix-tests
1144 (lambda* (#:key inputs #:allow-other-keys)
1146 (string-append (assoc-ref inputs "glibc-utf8-locales")
1147 "/lib/locale/") "/tmp/locale")
1148 (for-each make-file-writable (find-files "/tmp"))
1149 (substitute* "tests/make-test-runtime.sh"
1150 (("cp `which.*") "echo guix\n")
1151 (("cp -r /usr/lib/locale/C\\.\\*")
1152 (string-append "mkdir ${DIR}/usr/lib/locale/en_US; \
1153 cp -r /tmp/locale/*/en_US.*")))
1154 (substitute* "tests/libtest.sh"
1155 (("/bin/kill") (which "kill"))
1156 (("/usr/bin/python3") (which "python3")))
1158 ;; Many tests fail for unknown reasons, so we just run a few basic
1162 (setenv "HOME" "/tmp")
1163 (invoke "make" "check"
1164 "TESTS=tests/test-basic.sh tests/test-config.sh testcommon"))))))
1167 ("dbus" ,dbus) ; for dbus-daemon
1168 ("gettext" ,gettext-minimal)
1169 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
1170 ("glibc-utf8-locales" ,glibc-utf8-locales)
1171 ("gobject-introspection" ,gobject-introspection)
1173 ("pkg-config" ,pkg-config)
1177 (propagated-inputs `(("glib-networking" ,glib-networking)
1179 ("gsettings-desktop-schemas"
1180 ,gsettings-desktop-schemas)))
1182 `(("appstream-glib" ,appstream-glib)
1183 ("bubblewrap" ,bubblewrap)
1186 ("gdk-pixbuf" ,gdk-pixbuf)
1188 ("json-glib" ,json-glib)
1189 ("libarchive" ,libarchive)
1190 ("libostree" ,libostree)
1191 ("libseccomp" ,libseccomp)
1192 ("libsoup" ,libsoup)
1194 ("libxml2" ,libxml2)
1195 ("util-linux" ,util-linux)
1196 ("xdg-dbus-proxy" ,xdg-dbus-proxy)))
1197 (home-page "https://flatpak.org")
1198 (synopsis "System for building, distributing, and running sandboxed desktop
1200 (description "Flatpak is a system for building, distributing, and running
1201 sandboxed desktop applications on GNU/Linux.")
1202 (license license:lgpl2.1+)))