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>
17 ;;; Copyright © 2020 Jesse Gibbons <jgibbons2357+guix@gmail.com>
19 ;;; This file is part of GNU Guix.
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34 (define-module (gnu packages package-management)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages acl)
37 #:use-module (gnu packages attr)
38 #:use-module (gnu packages avahi)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages backup)
41 #:use-module (gnu packages base)
42 #:use-module (gnu packages bash)
43 #:use-module (gnu packages bdw-gc)
44 #:use-module (gnu packages bison)
45 #:use-module (gnu packages boost)
46 #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
47 #:use-module (gnu packages check)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages cpio)
50 #:use-module (gnu packages crypto)
51 #:use-module (gnu packages curl)
52 #:use-module (gnu packages dbm)
53 #:use-module (gnu packages docbook)
54 #:use-module (gnu packages file)
55 #:use-module (gnu packages gettext)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages gnupg)
59 #:use-module (gnu packages graphviz)
60 #:use-module (gnu packages gtk)
61 #:use-module (gnu packages guile)
62 #:use-module (gnu packages guile-xyz)
63 #:use-module (gnu packages hurd)
64 #:use-module (gnu packages libedit)
65 #:use-module (gnu packages linux)
66 #:use-module (gnu packages lisp)
67 #:use-module (gnu packages man)
68 #:use-module (gnu packages nettle)
69 #:use-module (gnu packages networking)
70 #:use-module (gnu packages nss)
71 #:use-module (gnu packages patchutils)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages perl-check)
74 #:use-module (gnu packages pkg-config)
75 #:use-module (gnu packages popt)
76 #:use-module (gnu packages python)
77 #:use-module (gnu packages python-web)
78 #:use-module (gnu packages python-xyz)
79 #:use-module (gnu packages serialization)
80 #:use-module (gnu packages sqlite)
81 #:use-module (gnu packages ssh)
82 #:use-module (gnu packages texinfo)
83 #:use-module (gnu packages time)
84 #:use-module (gnu packages tls)
85 #:use-module (gnu packages vim)
86 #:use-module (gnu packages virtualization)
87 #:use-module (gnu packages web)
88 #:use-module (gnu packages xml)
89 #:use-module (gnu packages xorg)
90 #:use-module (guix build-system glib-or-gtk)
91 #:use-module (guix build-system gnu)
92 #:use-module (guix build-system meson)
93 #:use-module (guix build-system python)
94 #:use-module (guix download)
95 #:use-module (guix gexp)
96 #:use-module (guix git-download)
97 #:use-module ((guix licenses) #:prefix license:)
98 #:use-module (guix packages)
99 #:use-module (guix utils)
100 #:use-module (ice-9 match)
101 #:use-module (srfi srfi-1))
103 (define (boot-guile-uri arch)
104 "Return the URI for the bootstrap Guile tarball for ARCH."
105 (cond ((string=? "armhf" arch)
106 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
108 "/20150101/guile-2.0.11.tar.xz"))
109 ((string=? "aarch64" arch)
110 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
111 arch "-linux/20170217/guile-2.0.14.tar.xz"))
113 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
115 "/20131110/guile-2.0.9.tar.xz"))))
118 ;; Latest version of Guix, which may or may not correspond to a release.
119 ;; Note: the 'update-guix-package.scm' script expects this definition to
120 ;; start precisely like this.
121 (let ((version "1.1.0")
122 (commit "218a67dfabcdf592325a8f8c49b86478f69ff589")
127 (version (if (zero? revision)
129 (string-append version "-"
130 (number->string revision)
131 "." (string-take commit 7))))
135 (url "https://git.savannah.gnu.org/r/guix.git")
139 "0zjpfagd377i977xv1ljzl0cj4vlrk4qpyqmlhclcdkjfbbachaq"))
140 (file-name (string-append "guix-" version "-checkout"))))
141 (build-system gnu-build-system)
143 `(#:configure-flags (list
144 "--localstatedir=/var"
146 (string-append "--with-bash-completion-dir="
147 (assoc-ref %outputs "out")
148 "/etc/bash_completion.d")
150 ;; Set 'DOT_USER_PROGRAM' to the empty string so
151 ;; we don't keep a reference to Graphviz, whose
152 ;; closure is pretty big (too big for the Guix
153 ;; system installation image.)
154 "ac_cv_path_DOT_USER_PROGRAM=dot"
156 ;; To avoid problems with the length of shebangs,
157 ;; choose a fixed-width and short directory name
159 "ac_cv_guix_test_root=/tmp/guix-tests"
160 ,@(if (hurd-target?) '("--with-courage") '()))
161 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
163 #:modules ((guix build gnu-build-system)
169 #:phases (modify-phases %standard-phases
172 ;; Make sure 'msgmerge' can modify the PO files.
173 (for-each (lambda (po)
175 (find-files "." "\\.po$"))
177 (patch-shebang "build-aux/git-version-gen")
179 (call-with-output-file ".tarball-version"
181 (display ,version port)))
183 ;; Install SysV init files to $(prefix)/etc rather
185 (substitute* "nix/local.mk"
186 (("^sysvinitservicedir = .*$")
187 (string-append "sysvinitservicedir = \
188 $(prefix)/etc/init.d\n")))
190 (invoke "sh" "bootstrap")))
191 (add-before 'build 'use-host-compressors
192 (lambda* (#:key inputs target #:allow-other-keys)
194 ;; Use host compressors.
195 (let ((bzip2 (assoc-ref inputs "bzip2"))
196 (gzip (assoc-ref inputs "gzip"))
197 (xz (assoc-ref inputs "xz")))
198 (substitute* "guix/config.scm"
199 (("\"[^\"]*/bin/bzip2")
200 (string-append "\"" bzip2 "/bin/bzip2"))
201 (("\"[^\"]*/bin/gzip") gzip
202 (string-append "\"" gzip "/bin/gzip"))
203 (("\"[^\"]*/bin//xz")
204 (string-append "\"" xz "/bin/xz")))))
206 (add-before 'check 'copy-bootstrap-guile
207 (lambda* (#:key system target inputs #:allow-other-keys)
208 ;; Copy the bootstrap guile tarball in the store
209 ;; used by the test suite.
210 (define (intern file recursive?)
211 ;; Note: don't use 'guix download' here because we
212 ;; need to set the 'recursive?' argument.
214 (strip-store-file-name file))
220 (let* ((item (add-to-store store ,base
223 (root (string-append "/tmp/gc-root-"
225 ;; Register a root so that the GC tests
226 ;; don't delete those.
228 (add-indirect-root store root)))))
230 (invoke "./test-env" "guile" "-c"
231 (object->string code)))
234 (intern (assoc-ref inputs "boot-guile") #f)
236 ;; On x86_64 some tests need the i686 Guile.
237 ,@(if (and (not (%current-target-system))
238 (string=? (%current-system)
240 '((intern (assoc-ref inputs "boot-guile/i686") #f))
243 ;; Copy the bootstrap executables.
244 (for-each (lambda (input)
245 (intern (assoc-ref inputs input) #t))
246 '("bootstrap/bash" "bootstrap/mkdir"
247 "bootstrap/tar" "bootstrap/xz")))
249 (add-after 'unpack 'disable-failing-tests
250 ;; XXX FIXME: These tests fail within the build container.
252 (substitute* "tests/syscalls.scm"
253 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
254 (string-append "(test-skip 1)\n" all)))
255 (substitute* "tests/containers.scm"
256 (("^\\(test-(assert|equal)" all)
257 (string-append "(test-skip 1)\n" all)))
258 (when (file-exists? "tests/guix-environment-container.sh")
259 (substitute* "tests/guix-environment-container.sh"
260 (("guix environment --version")
263 (add-before 'check 'set-SHELL
265 ;; 'guix environment' tests rely on 'SHELL' having a
266 ;; correct value, so set it.
267 (setenv "SHELL" (which "sh"))
269 (add-after 'install 'wrap-program
270 (lambda* (#:key inputs native-inputs outputs target
272 ;; Make sure the 'guix' command finds GnuTLS,
273 ;; Guile-JSON, and Guile-Git automatically.
274 (let* ((out (assoc-ref outputs "out"))
275 (guile ,@(if (%current-target-system)
276 '((assoc-ref native-inputs "guile"))
277 '((assoc-ref inputs "guile"))))
278 (gcrypt (assoc-ref inputs "guile-gcrypt"))
279 (json (assoc-ref inputs "guile-json"))
280 (sqlite (assoc-ref inputs "guile-sqlite3"))
281 (git (assoc-ref inputs "guile-git"))
282 (bs (assoc-ref inputs
283 "guile-bytestructures"))
284 (ssh (assoc-ref inputs "guile-ssh"))
285 (gnutls (assoc-ref inputs "gnutls"))
286 (locales (assoc-ref inputs "glibc-utf8-locales"))
287 (deps (list gcrypt json sqlite gnutls
291 (open-pipe* OPEN_READ
292 (string-append guile "/bin/guile")
293 "-c" "(display (effective-version))")))
295 (map (cut string-append <>
301 (map (cut string-append <>
302 "/lib/guile/" effective
306 (locpath (string-append locales "/lib/locale")))
308 (wrap-program (string-append out "/bin/guix")
309 `("GUILE_LOAD_PATH" ":" prefix (,path))
310 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
311 `("GUIX_LOCPATH" ":" suffix (,locpath)))
314 ;; XXX Touching wrap-program rebuilds world
315 (let ((bash (assoc-ref inputs "bash")))
316 (substitute* (string-append out "/bin/guix")
317 (("^#!.*/bash") (string-append "#! " bash "/bin/bash")))))
319 (native-inputs `(("pkg-config" ,pkg-config)
321 ;; Guile libraries are needed here for
322 ;; cross-compilation.
323 ("guile" ,guile-3.0-latest) ;for faster builds
325 ("guile-gcrypt" ,guile-gcrypt)
326 ("guile-json" ,guile-json-4)
327 ("guile-sqlite3" ,guile-sqlite3)
328 ("guile-ssh" ,guile-ssh)
329 ("guile-git" ,guile-git)
331 ;; XXX: Keep the development inputs here even though
332 ;; they're unnecessary, just so that 'guix environment
333 ;; guix' always contains them.
334 ("autoconf" ,autoconf-wrapper)
335 ("automake" ,automake)
336 ("gettext" ,gettext-minimal)
338 ("graphviz" ,graphviz)
339 ("help2man" ,help2man)
344 ("zlib" ,zlib) ;for 'guix publish'
345 ("lzlib" ,lzlib) ;for 'guix publish' and 'guix substitute'
348 ("libgcrypt" ,libgcrypt)
350 ("guile" ,guile-3.0-latest)
352 ;; Some of the tests use "unshare" when it is available.
353 ("util-linux" ,util-linux)
355 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
357 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
358 ,@(if (and (not (%current-target-system))
359 (string=? (%current-system) "x86_64-linux"))
360 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
362 ,@(if (%current-target-system)
363 `(("bash" ,bash-minimal)
367 ;; Tests also rely on these bootstrap executables.
368 ("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system)))
369 ("bootstrap/mkdir" ,(bootstrap-executable "mkdir" (%current-system)))
370 ("bootstrap/tar" ,(bootstrap-executable "tar" (%current-system)))
371 ("bootstrap/xz" ,(bootstrap-executable "xz" (%current-system)))
373 ("glibc-utf8-locales" ,glibc-utf8-locales)))
375 `(("gnutls" ,(if (%current-target-system) gnutls-3.6.14 guile3.0-gnutls))
376 ("guile-gcrypt" ,guile-gcrypt)
377 ("guile-json" ,guile-json-4)
378 ("guile-sqlite3" ,guile-sqlite3)
379 ("guile-ssh" ,guile-ssh)
380 ("guile-git" ,guile-git)))
382 (home-page "https://www.gnu.org/software/guix/")
383 (synopsis "Functional package manager for installed software packages and versions")
385 "GNU Guix is a functional package manager for the GNU system, and is
386 also a distribution thereof. It includes a virtual machine image. Besides
387 the usual package management features, it also supports transactional
388 upgrades and roll-backs, per-user profiles, and much more. It is based on
389 the Nix package manager.")
390 (license license:gpl3+)
391 (properties '((ftp-server . "alpha.gnu.org"))))))
393 (define-public guix-daemon
394 ;; This package is for internal consumption: it allows us to quickly build
395 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
399 (properties `((hidden? . #t)))
402 ;; Use a minimum set of dependencies.
404 (fold alist-delete (package-native-inputs guix)
405 '("po4a" "graphviz" "help2man")))
407 `(("gnutls" ,guile3.0-gnutls)
408 ("guile-git" ,guile-git)
409 ("guile-json" ,guile-json-3)
410 ("guile-gcrypt" ,guile-gcrypt)
411 ,@(fold alist-delete (package-inputs guix)
412 '("boot-guile" "boot-guile/i686" "util-linux"))))
414 (propagated-inputs '())
417 (substitute-keyword-arguments (package-arguments guix)
418 ((#:configure-flags flags '())
419 ;; Pretend we have those libraries; we don't actually need them.
421 '("guix_cv_have_recent_guile_sqlite3=yes"
422 "guix_cv_have_recent_guile_ssh=yes")))
425 ((#:phases phases '%standard-phases)
426 `(modify-phases ,phases
427 (add-after 'unpack 'change-default-guix
429 ;; We need to tell 'guix-daemon' which 'guix' command to use.
430 ;; Here we use a questionable hack where we hard-code root's
431 ;; current guix, which could be wrong (XXX). Note that scripts
432 ;; like 'guix perform-download' do not run as root so we assume
433 ;; that they have access to /var/guix/profiles/per-user/root.
434 (substitute* "nix/libstore/globals.cc"
435 (("guixProgram = (.*)nixBinDir + \"/guix\"" _ before)
436 (string-append "guixProgram = " before
437 "/var/guix/profiles/per-user/root\
438 /current-guix/bin/guix")))
442 (invoke "make" "nix/libstore/schema.sql.hh")
443 (invoke "make" "-j" (number->string
444 (parallel-job-count))
446 (delete 'copy-bootstrap-guile)
448 (lambda* (#:key outputs #:allow-other-keys)
449 (invoke "make" "install-binPROGRAMS")))
450 (delete 'wrap-program)))))))
453 (define-public guile2.2-guix
456 (name "guile2.2-guix")
458 `(("guile" ,guile-2.2)
459 ("gnutls" ,guile2.2-gnutls)
460 ("guile-gcrypt" ,guile2.2-gcrypt)
461 ("guile-json" ,guile2.2-json)
462 ("guile-sqlite3" ,guile2.2-sqlite3)
463 ("guile-ssh" ,guile2.2-ssh)
464 ("guile-git" ,guile2.2-git)
465 ,@(fold alist-delete (package-native-inputs guix)
466 '("guile" "gnutls" "guile-gcrypt" "guile-json"
467 "guile-sqlite3" "guile-ssh" "guile-git"))))
469 `(("guile" ,guile-2.2)
470 ,@(alist-delete "guile" (package-inputs guix))))
473 ("guile-gcrypt" ,guile2.2-gcrypt)
474 ("guile-json" ,guile2.2-json)
475 ("guile-sqlite3" ,guile2.2-sqlite3)
476 ("guile-ssh" ,guile2.2-ssh)
477 ("guile-git" ,guile2.2-git)))))
479 (define-public guile3.0-guix
480 (deprecated-package "guile3.0-guix" guix))
482 (define-public guix-minimal
483 ;; A version of Guix which is built with the minimal set of dependencies, as
484 ;; outlined in the README "Requirements" section. Intended as a CI job, so
489 (name "guix-minimal")
492 (package-native-inputs guix)
496 (package-propagated-inputs guix)
499 (define (source-file? file stat)
500 "Return true if FILE is likely a source file, false if it is a typical
502 (define (wrong-extension? file)
503 (or (string-suffix? "~" file)
504 (member (file-extension file)
505 '("o" "a" "lo" "so" "go"))))
507 (match (basename file)
508 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
510 ((? wrong-extension?)
515 (define-public current-guix-package
516 ;; This parameter allows callers to override the package that 'current-guix'
517 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
518 ;; for instance because it's not running from a source code checkout.
521 (define-public current-guix
522 (let* ((repository-root (delay (canonicalize-path
523 (string-append (current-source-directory)
525 (select? (delay (or (git-predicate (force repository-root))
528 "Return a package representing Guix built from the current source tree.
529 This works by adding the current source tree to the store (after filtering it
530 out) and returning a package that uses that as its 'source'."
531 (or (current-guix-package)
534 (version (string-append (package-version guix) "+"))
535 (source (local-file (force repository-root) "guix-current"
537 #:select? (force select?))))))))
550 (uri (string-append "http://nixos.org/releases/nix/nix-"
551 version "/nix-" version ".tar.xz"))
554 "128xf2as0y7hr28x575pbf9lkjpxr9hsxknbavv4p7ywr4lhbs85"))))
555 (build-system gnu-build-system)
558 (list "--sysconfdir=/etc")
560 (modify-phases %standard-phases
562 ;; Don't try & fail to create subdirectories in /etc, but keep them
563 ;; in the output as examples.
564 (lambda* (#:key (make-flags '()) outputs #:allow-other-keys)
565 (let* ((out (assoc-ref outputs "out"))
566 (etc (string-append out "/etc")))
567 (apply invoke "make" "install"
568 (string-append "sysconfdir=" etc)
569 (string-append "profiledir=" etc "/profile.d")
571 (native-inputs `(("pkg-config" ,pkg-config)))
572 (inputs `(("boost" ,boost)
576 ("editline" ,editline)
578 ("libseccomp" ,libseccomp)
579 ("libsodium" ,libsodium)
583 (home-page "https://nixos.org/nix/")
584 (synopsis "The Nix package manager")
586 "Nix is a purely functional package manager. This means that it treats
587 packages like values in purely functional programming languages such as
588 Haskell—they are built by functions that don't have side-effects, and they
589 never change after they have been built. Nix stores packages in the Nix
590 store, usually the directory /nix/store, where each package has its own unique
592 (license license:lgpl2.1+)))
600 (uri (string-append "mirror://gnu/stow/stow-"
604 "0jrxy12ywn7smdzdnvwzjw77l6knx6jkj2rckgykg1dpf6bdkm89"))))
605 (build-system gnu-build-system)
609 `(("perl-test-simple" ,perl-test-simple)
610 ("perl-test-output" ,perl-test-output)
611 ("perl-capture-tiny" ,perl-capture-tiny)
612 ("perl-io-stringy" ,perl-io-stringy)))
613 (home-page "https://www.gnu.org/software/stow/")
614 (synopsis "Managing installed software packages")
616 "GNU Stow is a symlink manager. It generates symlinks to directories
617 of data and makes them appear to be merged into the same directory. It is
618 typically used for managing software packages installed from source, by
619 letting you install them apart in distinct directories and then create
620 symlinks to the files in a common directory such as /usr/local.")
621 (license license:gpl3+)))
629 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
630 (version-major+minor version) ".x/rpm-"
634 "1nmck2fq9h85fgs3zhh6w1avlw5y16cbz5khd459ry3jfd5w4f8i"))))
635 (build-system gnu-build-system)
637 '(#:configure-flags '("--with-external-db" ;use the system's bdb
640 #:phases (modify-phases %standard-phases
641 (add-before 'configure 'set-nss-library-path
642 (lambda* (#:key inputs #:allow-other-keys)
643 (let ((nss (assoc-ref inputs "nss")))
644 (setenv "LIBRARY_PATH"
645 (string-append (getenv "LIBRARY_PATH") ":"
649 `(("pkg-config" ,pkg-config)))
657 ("libarchive" ,libarchive)
662 (home-page "https://rpm.org/")
663 (synopsis "The RPM Package Manager")
665 "The RPM Package Manager (RPM) is a command-line driven package
666 management system capable of installing, uninstalling, verifying, querying,
667 and updating computer software packages. Each software package consists of an
668 archive of files along with information about the package like its version, a
669 description. There is also a library permitting developers to manage such
670 transactions from C or Python.")
672 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
673 (license license:gpl2+)))
675 (define-public python-anaconda-client
677 (name "python-anaconda-client")
683 (url "https://github.com/Anaconda-Platform/anaconda-client")
685 (file-name (git-file-name name version))
688 "0w1bfxnydjl9qp53r2gcvr6vlpdqqilcrzqxrll9sgg6vwdyiyyp"))))
689 (build-system python-build-system)
691 `(("python-pyyaml" ,python-pyyaml)
692 ("python-requests" ,python-requests)
693 ("python-clyent" ,python-clyent)))
695 `(("python-pytz" ,python-pytz)
696 ("python-dateutil" ,python-dateutil)
697 ("python-mock" ,python-mock)
698 ("python-coverage" ,python-coverage)
699 ("python-pillow" ,python-pillow)))
702 (modify-phases %standard-phases
703 ;; This is needed for some tests.
704 (add-before 'check 'set-up-home
705 (lambda* _ (setenv "HOME" "/tmp") #t))
706 (add-before 'check 'remove-network-tests
708 ;; Remove tests requiring a network connection
709 (let ((network-tests '("tests/test_upload.py"
710 "tests/test_authorizations.py"
711 "tests/test_login.py"
712 "tests/test_whoami.py"
713 "utils/notebook/tests/test_data_uri.py"
714 "utils/notebook/tests/test_base.py"
715 "utils/notebook/tests/test_downloader.py"
716 "inspect_package/tests/test_conda.py")))
717 (with-directory-excursion "binstar_client"
718 (for-each delete-file network-tests)))
720 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
721 (synopsis "Anaconda Cloud command line client library")
723 "Anaconda Cloud command line client library provides an interface to
724 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
726 (license license:bsd-3)))
728 (define-public python2-anaconda-client
729 (package-with-python2 python-anaconda-client))
731 (define-public python-conda
733 (name "python-conda")
739 (url "https://github.com/conda/conda")
741 (file-name (git-file-name name version))
744 "1qwy0awx4qf2pbk8z2b7q6wdcq7mvwpxxjhg27mbirdvs5hw7hb2"))))
745 (build-system python-build-system)
748 (modify-phases %standard-phases
749 (add-before 'build 'create-version-file
751 (with-output-to-file "conda/.version"
752 (lambda () (display ,version)))
754 (add-before 'check 'remove-failing-tests
756 ;; These tests require internet/network access
757 (let ((network-tests '("test_cli.py"
765 "conda_env/test_cli.py"
766 "conda_env/test_create.py"
767 "conda_env/specs/test_notebook.py"
768 "conda_env/utils/test_notebooks.py"
770 "core/test_repodata.py")))
771 (with-directory-excursion "tests"
772 (for-each delete-file network-tests)
774 ;; FIXME: This test creates a file, then deletes it and tests
775 ;; that the file was deleted. For some reason it fails when
776 ;; building with guix, but does not when you run it in the
777 ;; directory left when you build with the --keep-failed
779 (delete-file "gateways/disk/test_delete.py")
780 ;; This file is no longer writable after downloading with 'git-fetch'
781 (make-file-writable "conda_env/support/saved-env/environment.yml")
785 (setenv "HOME" "/tmp")
786 (invoke "py.test"))))))
788 `(("python-cytoolz" ,python-cytoolz)
789 ("python-ruamel.yaml" ,python-ruamel.yaml)
790 ("python-requests" ,python-requests)
791 ("python-pycosat" ,python-pycosat)
792 ("python-pytest" ,python-pytest)
793 ("python-responses" ,python-responses)
794 ("python-pyyaml" ,python-pyyaml)
795 ("python-anaconda-client" ,python-anaconda-client)))
796 (home-page "https://github.com/conda/conda")
797 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
799 "Conda is a cross-platform, Python-agnostic binary package manager. It
800 is the package manager used by Anaconda installations, but it may be used for
801 other systems as well. Conda makes environments first-class citizens, making
802 it easy to create independent environments even for C libraries. Conda is
803 written entirely in Python.
805 This package provides Conda as a library.")
806 (license license:bsd-3)))
808 (define-public python2-conda
809 (let ((base (package-with-python2
810 (strip-python2-variant python-conda))))
811 (package (inherit base)
813 `(("python2-enum34" ,python2-enum34)
814 ,@(package-native-inputs base))))))
817 (package (inherit python-conda)
820 (substitute-keyword-arguments (package-arguments python-conda)
822 `(modify-phases ,phases
824 (lambda* (#:key outputs #:allow-other-keys)
825 ;; This test fails when run before installation.
826 (delete-file "tests/test_activate.py")
828 ;; Fix broken defaults
829 (substitute* "conda/base/context.py"
830 (("return sys.prefix")
831 (string-append "return \"" (assoc-ref outputs "out") "\""))
832 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
833 (string-append "return False if self.root_prefix == self.conda_prefix else "
836 ;; The util/setup-testing.py is used to build conda in
837 ;; application form, rather than the default, library form.
838 ;; With this, we are able to run commands like `conda --help`
839 ;; directly on the command line
840 (invoke "python" "utils/setup-testing.py" "build_py")))
842 (lambda* (#:key inputs outputs #:allow-other-keys)
843 (let* ((out (assoc-ref outputs "out"))
844 (target (string-append out "/lib/python"
846 (assoc-ref inputs "python"))
848 ;; The installer aborts if the target directory is not on
851 (string-append target ":" (getenv "PYTHONPATH")))
853 ;; And it aborts if the directory doesn't exist.
855 (invoke "python" "utils/setup-testing.py" "install"
856 (string-append "--prefix=" out)))))
857 ;; The "activate" and "deactivate" scripts don't need wrapping.
858 ;; They also break when they are renamed.
859 (add-after 'wrap 'undo-wrap
860 (lambda* (#:key outputs #:allow-other-keys)
861 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
862 (delete-file "deactivate")
863 (rename-file ".deactivate-real" "deactivate")
864 (delete-file "activate")
865 (rename-file ".activate-real" "activate")
868 "Conda is a cross-platform, Python-agnostic binary package manager. It
869 is the package manager used by Anaconda installations, but it may be used for
870 other systems as well. Conda makes environments first-class citizens, making
871 it easy to create independent environments even for C libraries. Conda is
872 written entirely in Python.")))
880 (uri (string-append "mirror://gnu/gwl/gwl-" version ".tar.gz"))
883 "1ji5jvzni8aml9fmimlr11g3k8isrnlvnbzhmwgdjh72hils0alc"))))
884 (build-system gnu-build-system)
887 (modify-phases %standard-phases
888 (add-before 'build 'fix-tests
890 ;; Avoid cross-device link.
891 (substitute* "tests/cache.scm"
892 (("/tmp/gwl-test-input-XXXXXX")
893 (string-append (getcwd) "/gwl-test-input-XXXXXX")))
896 `(("autoconf" ,autoconf)
897 ("automake" ,automake)
898 ("pkg-config" ,pkg-config)
900 ("graphviz" ,graphviz)))
902 `(("guile" ,@(assoc-ref (package-native-inputs guix) "guile"))))
905 ("guile-commonmark" ,guile-commonmark)
906 ("guile-gcrypt" ,guile-gcrypt)
907 ("guile-pfds" ,guile-pfds)
908 ("guile-syntax-highlight" ,guile-syntax-highlight)
909 ("guile-wisp" ,guile-wisp)))
910 (home-page "https://workflows.guix.info")
911 (synopsis "Workflow management extension for GNU Guix")
912 (description "The @dfn{Guix Workflow Language} (GWL) provides an
913 extension to GNU Guix's declarative language for package management to
914 automate the execution of programs in scientific workflows. The GWL
915 can use process engines to integrate with various computing
917 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
918 ;; the web interface modules in gwl/ are licensed AGPL3+,
919 ;; and the fonts included in this package are licensed OFL1.1.
920 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
922 (define-public guix-jupyter
924 (name "guix-jupyter")
926 (home-page "https://gitlab.inria.fr/guix-hpc/guix-kernel")
929 (uri (git-reference (url home-page)
930 (commit (string-append "v" version))))
933 "01z7jjkc7r7lj6637rcgpz40v8xqqyfp6871h94yvcnwm7zy9h1n"))
934 (modules '((guix build utils)))
937 ;; Allow builds with Guile 3.0.
938 (substitute* "configure.ac"
940 "GUILE_PKG([3.0 2.2])\n"))
942 (file-name (string-append "guix-jupyter-" version "-checkout"))))
943 (build-system gnu-build-system)
945 `(#:modules ((srfi srfi-26)
950 (guix build gnu-build-system))
952 (modify-phases %standard-phases
953 (add-after 'install 'sed-kernel-json
954 (lambda* (#:key inputs outputs #:allow-other-keys)
955 (let* ((out (assoc-ref outputs "out"))
956 (guix (assoc-ref inputs "guix"))
957 (guile (assoc-ref inputs "guile"))
958 (json (assoc-ref inputs "guile-json"))
959 (git (assoc-ref inputs "guile-git"))
960 (bs (assoc-ref inputs "guile-bytestructures"))
961 (s-zmq (assoc-ref inputs "guile-simple-zmq"))
962 (gcrypt (assoc-ref inputs "guile-gcrypt"))
963 (deps (list out s-zmq guix json git bs gcrypt))
966 (open-pipe* OPEN_READ
967 (string-append guile "/bin/guile")
968 "-c" "(display (effective-version))")))
969 (path (map (cut string-append "-L\", \"" <>
973 (gopath (map (cut string-append "-C\", \"" <>
974 "/lib/guile/" effective
977 (kernel-dir (string-append out "/share/jupyter/kernels/guix/")))
978 (substitute* (string-append kernel-dir "kernel.json")
981 (list (string-join path "\",\n\t\t\"")
982 (string-join gopath "\",\n\t\t\"")
985 (("guix-jupyter-kernel.scm")
986 (string-append out "/share/guile/site/3.0/"
987 "guix-jupyter-kernel.scm")))
990 `(("autoconf" ,autoconf)
991 ("automake" ,automake)
992 ("pkg-config" ,pkg-config)
996 ("python-ipython" ,python-ipython)
997 ("python-ipykernel" ,python-ipykernel)))
1000 ("guile" ,@(assoc-ref (package-native-inputs guix) "guile"))))
1002 `(("guile-json" ,guile-json-4)
1003 ("guile-simple-zmq" ,guile-simple-zmq)
1004 ("guile-gcrypt" ,guile-gcrypt)))
1005 (synopsis "Guix kernel for Jupyter")
1007 "Guix-Jupyter is a Jupyter kernel. It allows you to annotate notebooks
1008 with information about their software dependencies, such that code is executed
1009 in the right software environment. Guix-Jupyter spawns the actual kernels
1010 such as @code{python-ipykernel} on behalf of the notebook user and runs them
1011 in an isolated environment, in separate namespaces.")
1012 (license license:gpl3+)))
1020 (uri (string-append "mirror://gnome/sources/gcab/"
1021 version "/gcab-" version ".tar.xz"))
1024 "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"))))
1025 (build-system meson-build-system)
1027 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1028 ("intltool" ,intltool)
1029 ("pkg-config" ,pkg-config)
1036 ;; XXX This ‘documentation’ is for developers, and fails informatively:
1037 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
1038 (list "-Ddocs=false"
1039 "-Dintrospection=false")))
1040 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
1041 (synopsis "Microsoft Cabinet file manipulation library")
1043 "The libgcab library provides GObject functions to read, write, and modify
1044 Microsoft cabinet (.@dfn{CAB}) files.")
1045 (license (list license:gpl2+ ; tests/testsuite.at
1046 license:lgpl2.1+)))) ; the rest
1048 (define-public msitools
1054 (uri (string-append "mirror://gnome/sources/msitools/"
1055 version "/msitools-" version ".tar.xz"))
1058 "1skq17qr2ic4qr3779j49byfm8rncwbsq9rj1a33ncn2m7isdwdv"))))
1059 (build-system gnu-build-system)
1062 ("pkg-config" ,pkg-config)))
1067 ("libxml2" ,libxml2)
1068 ("uuid" ,util-linux "lib")))
1069 (home-page "https://wiki.gnome.org/msitools")
1070 (synopsis "Windows Installer file manipulation tool")
1072 "msitools is a collection of command-line tools to inspect, extract, build,
1073 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
1074 for packaging and deployment of cross-compiled Windows applications.")
1075 (license license:lgpl2.1+)))
1077 (define-public libostree
1084 "https://github.com/ostreedev/ostree/releases/download/v"
1085 (version-major+minor version) "/libostree-" version ".tar.xz"))
1088 "0s13cjrpx5r1dc9j9c9924zak45wl9nlbg9hiwgpsal80l92c39n"))))
1089 (build-system gnu-build-system)
1092 (modify-phases %standard-phases
1093 (add-before 'check 'pre-check
1095 ;; Don't try to use the non-existing '/var/tmp' as test
1097 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
1100 ;; tap-driver.sh: missing test plan
1101 ;; tap-driver.sh: internal error getting exit status
1102 ;; tap-driver.sh: fatal: I/O or internal error
1105 `(("attr" ,attr) ; for tests
1107 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
1108 ("gobject-introspection" ,gobject-introspection)
1109 ("pkg-config" ,pkg-config)
1110 ("xsltproc" ,libxslt)))
1113 ("docbook-xml" ,docbook-xml-4.2)
1114 ("docbook-xsl" ,docbook-xsl)
1115 ("e2fsprogs" ,e2fsprogs)
1119 ("libarchive" ,libarchive)
1120 ("libsoup" ,libsoup)
1121 ("util-linux" ,util-linux)))
1122 (home-page "https://ostree.readthedocs.io/en/latest/")
1123 (synopsis "Operating system and container binary deployment and upgrades")
1125 "@code{libostree} is both a shared library and suite of command line
1126 tools that combines a \"git-like\" model for committing and downloading
1127 bootable file system trees, along with a layer for deploying them and managing
1128 the boot loader configuration.")
1129 (license license:lgpl2.0+)))
1131 (define-public flatpak
1138 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
1139 version "/flatpak-" version ".tar.xz"))
1142 "0d4x79z96r60rc2gnf415da7z9x1my5hdyjdlklfiwll57jbqr23"))))
1144 ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
1145 ;; find the TLS backend in glib-networking.
1146 (build-system glib-or-gtk-build-system)
1151 "--enable-documentation=no" ;; FIXME
1152 "--enable-system-helper=no"
1153 "--localstatedir=/var"
1154 (string-append "--with-system-bubblewrap="
1155 (assoc-ref %build-inputs "bubblewrap")
1157 (string-append "--with-system-dbus-proxy="
1158 (assoc-ref %build-inputs "xdg-dbus-proxy")
1159 "/bin/xdg-dbus-proxy"))
1161 (modify-phases %standard-phases
1162 (add-after 'unpack 'fix-tests
1163 (lambda* (#:key inputs #:allow-other-keys)
1165 (string-append (assoc-ref inputs "glibc-utf8-locales")
1166 "/lib/locale/") "/tmp/locale")
1167 (for-each make-file-writable (find-files "/tmp"))
1168 (substitute* "tests/make-test-runtime.sh"
1169 (("cp `which.*") "echo guix\n")
1170 (("cp -r /usr/lib/locale/C\\.\\*")
1171 (string-append "mkdir ${DIR}/usr/lib/locale/en_US; \
1172 cp -r /tmp/locale/*/en_US.*")))
1173 (substitute* "tests/libtest.sh"
1174 (("/bin/kill") (which "kill"))
1175 (("/usr/bin/python3") (which "python3")))
1177 ;; Many tests fail for unknown reasons, so we just run a few basic
1181 (setenv "HOME" "/tmp")
1182 (invoke "make" "check"
1183 "TESTS=tests/test-basic.sh tests/test-config.sh testcommon"))))))
1186 ("dbus" ,dbus) ; for dbus-daemon
1187 ("gettext" ,gettext-minimal)
1188 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
1189 ("glibc-utf8-locales" ,glibc-utf8-locales)
1190 ("gobject-introspection" ,gobject-introspection)
1192 ("pkg-config" ,pkg-config)
1194 ("python-pyparsing" ,python-pyparsing)
1197 (propagated-inputs `(("glib-networking" ,glib-networking)
1199 ("gsettings-desktop-schemas"
1200 ,gsettings-desktop-schemas)))
1202 `(("appstream-glib" ,appstream-glib)
1203 ("bubblewrap" ,bubblewrap)
1206 ("gdk-pixbuf" ,gdk-pixbuf)
1208 ("json-glib" ,json-glib)
1209 ("libarchive" ,libarchive)
1210 ("libostree" ,libostree)
1211 ("libseccomp" ,libseccomp)
1212 ("libsoup" ,libsoup)
1214 ("libxml2" ,libxml2)
1215 ("util-linux" ,util-linux)
1216 ("xdg-dbus-proxy" ,xdg-dbus-proxy)))
1217 (home-page "https://flatpak.org")
1218 (synopsis "System for building, distributing, and running sandboxed desktop
1220 (description "Flatpak is a system for building, distributing, and running
1221 sandboxed desktop applications on GNU/Linux.")
1222 (license license:lgpl2.1+)))