1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015, 2017, 2020 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
5 ;;; Copyright © 2017, 2018 Oleg Pykhalov <go.wigust@gmail.com>
6 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
7 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
9 ;;; Copyright © 2018, 2019 Rutger Helling <rhelling@mykolab.com>
10 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
11 ;;; Copyright © 2018, 2019 Eric Bavier <bavier@member.fsf.org>
12 ;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
14 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
15 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages package-management)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages acl)
35 #:use-module (gnu packages attr)
36 #:use-module (gnu packages avahi)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages backup)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages bash)
41 #:use-module (gnu packages bdw-gc)
42 #:use-module (gnu packages bison)
43 #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
44 #:use-module (gnu packages check)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages cpio)
47 #:use-module (gnu packages crypto)
48 #:use-module (gnu packages curl)
49 #:use-module (gnu packages dbm)
50 #:use-module (gnu packages docbook)
51 #:use-module (gnu packages file)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages gnome)
55 #:use-module (gnu packages gnupg)
56 #:use-module (gnu packages graphviz)
57 #:use-module (gnu packages gtk)
58 #:use-module (gnu packages guile)
59 #:use-module (gnu packages guile-xyz)
60 #:use-module (gnu packages linux)
61 #:use-module (gnu packages lisp)
62 #:use-module (gnu packages man)
63 #:use-module (gnu packages nettle)
64 #:use-module (gnu packages nss)
65 #:use-module (gnu packages patchutils)
66 #:use-module (gnu packages perl)
67 #:use-module (gnu packages perl-check)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages popt)
70 #:use-module (gnu packages python)
71 #:use-module (gnu packages python-web)
72 #:use-module (gnu packages python-xyz)
73 #:use-module (gnu packages serialization)
74 #:use-module (gnu packages sqlite)
75 #:use-module (gnu packages ssh)
76 #:use-module (gnu packages texinfo)
77 #:use-module (gnu packages time)
78 #:use-module (gnu packages tls)
79 #:use-module (gnu packages vim)
80 #:use-module (gnu packages virtualization)
81 #:use-module (gnu packages web)
82 #:use-module (gnu packages xml)
83 #:use-module (gnu packages xorg)
84 #:use-module (guix build-system glib-or-gtk)
85 #:use-module (guix build-system gnu)
86 #:use-module (guix build-system meson)
87 #:use-module (guix build-system python)
88 #:use-module (guix download)
89 #:use-module (guix gexp)
90 #:use-module (guix git-download)
91 #:use-module ((guix licenses) #:prefix license:)
92 #:use-module (guix packages)
93 #:use-module (guix utils)
94 #:use-module (ice-9 match)
95 #:use-module (srfi srfi-1))
97 (define (boot-guile-uri arch)
98 "Return the URI for the bootstrap Guile tarball for ARCH."
99 (cond ((string=? "armhf" arch)
100 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
102 "/20150101/guile-2.0.11.tar.xz"))
103 ((string=? "aarch64" arch)
104 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
105 arch "-linux/20170217/guile-2.0.14.tar.xz"))
107 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
109 "/20131110/guile-2.0.9.tar.xz"))))
112 ;; Latest version of Guix, which may or may not correspond to a release.
113 ;; Note: the 'update-guix-package.scm' script expects this definition to
114 ;; start precisely like this.
115 (let ((version "1.1.0")
116 (commit "619f9181a363576894a433206008b139255062dd")
121 (version (if (zero? revision)
123 (string-append version "-"
124 (number->string revision)
125 "." (string-take commit 7))))
129 (url "https://git.savannah.gnu.org/r/guix.git")
133 "1lk0h9zgry7m78nv70gxwb57pw1d5yzay477gxsc43v1aa7zg8sp"))
134 (file-name (string-append "guix-" version "-checkout"))))
135 (build-system gnu-build-system)
137 `(#:configure-flags (list
138 "--localstatedir=/var"
140 (string-append "--with-bash-completion-dir="
141 (assoc-ref %outputs "out")
142 "/etc/bash_completion.d")
144 ;; Set 'DOT_USER_PROGRAM' to the empty string so
145 ;; we don't keep a reference to Graphviz, whose
146 ;; closure is pretty big (too big for the Guix
147 ;; system installation image.)
148 "ac_cv_path_DOT_USER_PROGRAM=dot"
150 ;; To avoid problems with the length of shebangs,
151 ;; choose a fixed-width and short directory name
153 "ac_cv_guix_test_root=/tmp/guix-tests")
154 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
156 #:modules ((guix build gnu-build-system)
162 #:phases (modify-phases %standard-phases
165 ;; Make sure 'msgmerge' can modify the PO files.
166 (for-each (lambda (po)
168 (find-files "." "\\.po$"))
170 (patch-shebang "build-aux/git-version-gen")
172 (call-with-output-file ".tarball-version"
174 (display ,version port)))
176 ;; Install SysV init files to $(prefix)/etc rather
178 (substitute* "nix/local.mk"
179 (("^sysvinitservicedir = .*$")
180 (string-append "sysvinitservicedir = \
181 $(prefix)/etc/init.d\n")))
183 (invoke "sh" "bootstrap")))
184 (add-before 'build 'use-host-compressors
185 (lambda* (#:key inputs target #:allow-other-keys)
187 ;; Use host compressors.
188 (let ((bzip2 (assoc-ref inputs "bzip2"))
189 (gzip (assoc-ref inputs "gzip"))
190 (xz (assoc-ref inputs "xz")))
191 (substitute* "guix/config.scm"
192 (("\"[^\"]*/bin/bzip2")
193 (string-append "\"" bzip2 "/bin/bzip2"))
194 (("\"[^\"]*/bin/gzip") gzip
195 (string-append "\"" gzip "/bin/gzip"))
196 (("\"[^\"]*/bin//xz")
197 (string-append "\"" xz "/bin/xz")))))
199 (add-before 'check 'copy-bootstrap-guile
200 (lambda* (#:key system target inputs #:allow-other-keys)
201 ;; Copy the bootstrap guile tarball in the store
202 ;; used by the test suite.
203 (define (intern file recursive?)
204 ;; Note: don't use 'guix download' here because we
205 ;; need to set the 'recursive?' argument.
207 (strip-store-file-name file))
213 (let* ((item (add-to-store store ,base
216 (root (string-append "/tmp/gc-root-"
218 ;; Register a root so that the GC tests
219 ;; don't delete those.
221 (add-indirect-root store root)))))
223 (invoke "./test-env" "guile" "-c"
224 (object->string code)))
227 (intern (assoc-ref inputs "boot-guile") #f)
229 ;; On x86_64 some tests need the i686 Guile.
230 ,@(if (and (not (%current-target-system))
231 (string=? (%current-system)
233 '((intern (assoc-ref inputs "boot-guile/i686") #f))
236 ;; Copy the bootstrap executables.
237 (for-each (lambda (input)
238 (intern (assoc-ref inputs input) #t))
239 '("bootstrap/bash" "bootstrap/mkdir"
240 "bootstrap/tar" "bootstrap/xz")))
242 (add-after 'unpack 'disable-failing-tests
243 ;; XXX FIXME: These tests fail within the build container.
245 (substitute* "tests/syscalls.scm"
246 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
247 (string-append "(test-skip 1)\n" all)))
248 (substitute* "tests/containers.scm"
249 (("^\\(test-(assert|equal)" all)
250 (string-append "(test-skip 1)\n" all)))
251 (when (file-exists? "tests/guix-environment-container.sh")
252 (substitute* "tests/guix-environment-container.sh"
253 (("guix environment --version")
256 (add-before 'check 'set-SHELL
258 ;; 'guix environment' tests rely on 'SHELL' having a
259 ;; correct value, so set it.
260 (setenv "SHELL" (which "sh"))
262 (add-after 'install 'wrap-program
263 (lambda* (#:key inputs native-inputs outputs target
265 ;; Make sure the 'guix' command finds GnuTLS,
266 ;; Guile-JSON, and Guile-Git automatically.
267 (let* ((out (assoc-ref outputs "out"))
268 (guile ,@(if (%current-target-system)
269 '((assoc-ref native-inputs "guile"))
270 '((assoc-ref inputs "guile"))))
271 (gcrypt (assoc-ref inputs "guile-gcrypt"))
272 (json (assoc-ref inputs "guile-json"))
273 (sqlite (assoc-ref inputs "guile-sqlite3"))
274 (git (assoc-ref inputs "guile-git"))
275 (bs (assoc-ref inputs
276 "guile-bytestructures"))
277 (ssh (assoc-ref inputs "guile-ssh"))
278 (gnutls (assoc-ref inputs "gnutls"))
279 (locales (assoc-ref inputs "glibc-utf8-locales"))
280 (deps (list gcrypt json sqlite gnutls
284 (open-pipe* OPEN_READ
285 (string-append guile "/bin/guile")
286 "-c" "(display (effective-version))")))
288 (map (cut string-append <>
294 (map (cut string-append <>
295 "/lib/guile/" effective
299 (locpath (string-append locales "/lib/locale")))
301 (wrap-program (string-append out "/bin/guix")
302 `("GUILE_LOAD_PATH" ":" prefix (,path))
303 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
304 `("GUIX_LOCPATH" ":" suffix (,locpath)))
307 ;; XXX Touching wrap-program rebuilds world
308 (let ((bash (assoc-ref inputs "bash")))
309 (substitute* (string-append out "/bin/guix")
310 (("^#!.*/bash") (string-append "#! " bash "/bin/bash")))))
312 (native-inputs `(("pkg-config" ,pkg-config)
314 ;; Guile libraries are needed here for
315 ;; cross-compilation.
318 ("guile-gcrypt" ,guile-gcrypt)
319 ("guile-json" ,guile-json-3)
320 ("guile-sqlite3" ,guile-sqlite3)
321 ("guile-ssh" ,guile-ssh)
322 ("guile-git" ,guile-git)
324 ;; XXX: Keep the development inputs here even though
325 ;; they're unnecessary, just so that 'guix environment
326 ;; guix' always contains them.
327 ("autoconf" ,autoconf-wrapper)
328 ("automake" ,automake)
329 ("gettext" ,gettext-minimal)
331 ("graphviz" ,graphviz)
332 ("help2man" ,help2man)
337 ("zlib" ,zlib) ;for 'guix publish'
338 ("lzlib" ,lzlib) ;for 'guix publish' and 'guix substitute'
341 ("libgcrypt" ,libgcrypt)
345 ;; Some of the tests use "unshare" when it is available.
346 ("util-linux" ,util-linux)
348 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
350 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
351 ,@(if (and (not (%current-target-system))
352 (string=? (%current-system) "x86_64-linux"))
353 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
355 ,@(if (%current-target-system)
356 `(("bash" ,bash-minimal)
360 ;; Tests also rely on these bootstrap executables.
361 ("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system)))
362 ("bootstrap/mkdir" ,(bootstrap-executable "mkdir" (%current-system)))
363 ("bootstrap/tar" ,(bootstrap-executable "tar" (%current-system)))
364 ("bootstrap/xz" ,(bootstrap-executable "xz" (%current-system)))
366 ("glibc-utf8-locales" ,glibc-utf8-locales)))
368 `(("gnutls" ,(if (%current-target-system) gnutls-3.6.13 guile3.0-gnutls))
369 ("guile-gcrypt" ,guile-gcrypt)
370 ("guile-json" ,guile-json-3)
371 ("guile-sqlite3" ,guile-sqlite3)
372 ("guile-ssh" ,guile-ssh)
373 ("guile-git" ,guile-git)))
375 (home-page "https://www.gnu.org/software/guix/")
376 (synopsis "Functional package manager for installed software packages and versions")
378 "GNU Guix is a functional package manager for the GNU system, and is
379 also a distribution thereof. It includes a virtual machine image. Besides
380 the usual package management features, it also supports transactional
381 upgrades and roll-backs, per-user profiles, and much more. It is based on
382 the Nix package manager.")
383 (license license:gpl3+)
384 (properties '((ftp-server . "alpha.gnu.org"))))))
386 (define-public guix-daemon
387 ;; This package is for internal consumption: it allows us to quickly build
388 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
392 (properties `((hidden? . #t)))
395 ;; Use a minimum set of dependencies.
397 (fold alist-delete (package-native-inputs guix)
398 '("po4a" "graphviz" "help2man")))
400 `(("gnutls" ,guile3.0-gnutls)
401 ("guile-git" ,guile-git)
402 ("guile-json" ,guile-json-3)
403 ("guile-gcrypt" ,guile-gcrypt)
404 ,@(fold alist-delete (package-inputs guix)
405 '("boot-guile" "boot-guile/i686" "util-linux"))))
407 (propagated-inputs '())
410 (substitute-keyword-arguments (package-arguments guix)
411 ((#:configure-flags flags '())
412 ;; Pretend we have those libraries; we don't actually need them.
414 '("guix_cv_have_recent_guile_sqlite3=yes"
415 "guix_cv_have_recent_guile_ssh=yes")))
418 ((#:phases phases '%standard-phases)
419 `(modify-phases ,phases
420 (add-after 'unpack 'change-default-guix
422 ;; We need to tell 'guix-daemon' which 'guix' command to use.
423 ;; Here we use a questionable hack where we hard-code root's
424 ;; current guix, which could be wrong (XXX). Note that scripts
425 ;; like 'guix perform-download' do not run as root so we assume
426 ;; that they have access to /var/guix/profiles/per-user/root.
427 (substitute* "nix/libstore/globals.cc"
428 (("guixProgram = (.*)nixBinDir + \"/guix\"" _ before)
429 (string-append "guixProgram = " before
430 "/var/guix/profiles/per-user/root\
431 /current-guix/bin/guix")))
435 (invoke "make" "nix/libstore/schema.sql.hh")
436 (invoke "make" "-j" (number->string
437 (parallel-job-count))
439 (delete 'copy-bootstrap-guile)
441 (lambda* (#:key outputs #:allow-other-keys)
442 (invoke "make" "install-binPROGRAMS")))
443 (delete 'wrap-program)))))))
446 (define-public guile2.2-guix
449 (name "guile2.2-guix")
451 `(("guile" ,guile-2.2)
452 ("gnutls" ,guile2.2-gnutls)
453 ("guile-gcrypt" ,guile2.2-gcrypt)
454 ("guile-json" ,guile2.2-json)
455 ("guile-sqlite3" ,guile2.2-sqlite3)
456 ("guile-ssh" ,guile2.2-ssh)
457 ("guile-git" ,guile2.2-git)
458 ,@(fold alist-delete (package-native-inputs guix)
459 '("guile" "gnutls" "guile-gcrypt" "guile-json"
460 "guile-sqlite3" "guile-ssh" "guile-git"))))
462 `(("guile" ,guile-2.2)
463 ,@(alist-delete "guile" (package-inputs guix))))
466 ("guile-gcrypt" ,guile2.2-gcrypt)
467 ("guile-json" ,guile2.2-json)
468 ("guile-sqlite3" ,guile2.2-sqlite3)
469 ("guile-ssh" ,guile2.2-ssh)
470 ("guile-git" ,guile2.2-git)))))
472 (define-public guile3.0-guix
473 (deprecated-package "guile3.0-guix" guix))
475 (define-public guix-minimal
476 ;; A version of Guix which is built with the minimal set of dependencies, as
477 ;; outlined in the README "Requirements" section. Intended as a CI job, so
482 (name "guix-minimal")
484 `(("guile" ,guile-2.2)
485 ,@(alist-delete "guile" (package-inputs guix))))
488 (package-propagated-inputs guix)
491 (define (source-file? file stat)
492 "Return true if FILE is likely a source file, false if it is a typical
494 (define (wrong-extension? file)
495 (or (string-suffix? "~" file)
496 (member (file-extension file)
497 '("o" "a" "lo" "so" "go"))))
499 (match (basename file)
500 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
502 ((? wrong-extension?)
507 (define-public current-guix-package
508 ;; This parameter allows callers to override the package that 'current-guix'
509 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
510 ;; for instance because it's not running from a source code checkout.
513 (define-public current-guix
514 (let* ((repository-root (delay (canonicalize-path
515 (string-append (current-source-directory)
517 (select? (delay (or (git-predicate (force repository-root))
520 "Return a package representing Guix built from the current source tree.
521 This works by adding the current source tree to the store (after filtering it
522 out) and returning a package that uses that as its 'source'."
523 (or (current-guix-package)
526 (version (string-append (package-version guix) "+"))
527 (source (local-file (force repository-root) "guix-current"
529 #:select? (force select?))))))))
542 (uri (string-append "http://nixos.org/releases/nix/nix-"
543 version "/nix-" version ".tar.xz"))
546 "0ss9svxlh1pvrdmnqjvjyqjmbqmrdbyfarvbb14i9d4bggzl0r8n"))))
547 (build-system gnu-build-system)
548 (native-inputs `(("pkg-config" ,pkg-config)))
549 (inputs `(("curl" ,curl)
552 ("libseccomp" ,libseccomp)
553 ("libsodium" ,libsodium)
557 (home-page "https://nixos.org/nix/")
558 (synopsis "The Nix package manager")
560 "Nix is a purely functional package manager. This means that it treats
561 packages like values in purely functional programming languages such as
562 Haskell—they are built by functions that don't have side-effects, and they
563 never change after they have been built. Nix stores packages in the Nix
564 store, usually the directory /nix/store, where each package has its own unique
566 (license license:lgpl2.1+)))
574 (uri (string-append "mirror://gnu/stow/stow-"
578 "0jrxy12ywn7smdzdnvwzjw77l6knx6jkj2rckgykg1dpf6bdkm89"))))
579 (build-system gnu-build-system)
583 `(("perl-test-simple" ,perl-test-simple)
584 ("perl-test-output" ,perl-test-output)
585 ("perl-capture-tiny" ,perl-capture-tiny)
586 ("perl-io-stringy" ,perl-io-stringy)))
587 (home-page "https://www.gnu.org/software/stow/")
588 (synopsis "Managing installed software packages")
590 "GNU Stow is a symlink manager. It generates symlinks to directories
591 of data and makes them appear to be merged into the same directory. It is
592 typically used for managing software packages installed from source, by
593 letting you install them apart in distinct directories and then create
594 symlinks to the files in a common directory such as /usr/local.")
595 (license license:gpl3+)))
603 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
604 (version-major+minor version) ".x/rpm-"
608 "1nmck2fq9h85fgs3zhh6w1avlw5y16cbz5khd459ry3jfd5w4f8i"))))
609 (build-system gnu-build-system)
611 '(#:configure-flags '("--with-external-db" ;use the system's bdb
614 #:phases (modify-phases %standard-phases
615 (add-before 'configure 'set-nss-library-path
616 (lambda* (#:key inputs #:allow-other-keys)
617 (let ((nss (assoc-ref inputs "nss")))
618 (setenv "LIBRARY_PATH"
619 (string-append (getenv "LIBRARY_PATH") ":"
623 `(("pkg-config" ,pkg-config)))
631 ("libarchive" ,libarchive)
636 (home-page "https://rpm.org/")
637 (synopsis "The RPM Package Manager")
639 "The RPM Package Manager (RPM) is a command-line driven package
640 management system capable of installing, uninstalling, verifying, querying,
641 and updating computer software packages. Each software package consists of an
642 archive of files along with information about the package like its version, a
643 description. There is also a library permitting developers to manage such
644 transactions from C or Python.")
646 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
647 (license license:gpl2+)))
649 (define-public python-anaconda-client
651 (name "python-anaconda-client")
657 (url "https://github.com/Anaconda-Platform/anaconda-client")
659 (file-name (git-file-name name version))
662 "0w1bfxnydjl9qp53r2gcvr6vlpdqqilcrzqxrll9sgg6vwdyiyyp"))))
663 (build-system python-build-system)
665 `(("python-pyyaml" ,python-pyyaml)
666 ("python-requests" ,python-requests)
667 ("python-clyent" ,python-clyent)))
669 `(("python-pytz" ,python-pytz)
670 ("python-dateutil" ,python-dateutil)
671 ("python-mock" ,python-mock)
672 ("python-coverage" ,python-coverage)
673 ("python-pillow" ,python-pillow)))
676 (modify-phases %standard-phases
677 ;; This is needed for some tests.
678 (add-before 'check 'set-up-home
679 (lambda* _ (setenv "HOME" "/tmp") #t))
680 (add-before 'check 'remove-network-tests
682 ;; Remove tests requiring a network connection
683 (let ((network-tests '("tests/test_upload.py"
684 "tests/test_authorizations.py"
685 "tests/test_login.py"
686 "tests/test_whoami.py"
687 "utils/notebook/tests/test_data_uri.py"
688 "utils/notebook/tests/test_base.py"
689 "utils/notebook/tests/test_downloader.py"
690 "inspect_package/tests/test_conda.py")))
691 (with-directory-excursion "binstar_client"
692 (for-each delete-file network-tests)))
694 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
695 (synopsis "Anaconda Cloud command line client library")
697 "Anaconda Cloud command line client library provides an interface to
698 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
700 (license license:bsd-3)))
702 (define-public python2-anaconda-client
703 (package-with-python2 python-anaconda-client))
705 (define-public python-conda
707 (name "python-conda")
713 (url "https://github.com/conda/conda")
715 (file-name (git-file-name name version))
718 "1qwy0awx4qf2pbk8z2b7q6wdcq7mvwpxxjhg27mbirdvs5hw7hb2"))))
719 (build-system python-build-system)
722 (modify-phases %standard-phases
723 (add-before 'build 'create-version-file
725 (with-output-to-file "conda/.version"
726 (lambda () (display ,version)))
728 (add-before 'check 'remove-failing-tests
730 ;; These tests require internet/network access
731 (let ((network-tests '("test_cli.py"
739 "conda_env/test_cli.py"
740 "conda_env/test_create.py"
741 "conda_env/specs/test_notebook.py"
742 "conda_env/utils/test_notebooks.py"
744 "core/test_repodata.py")))
745 (with-directory-excursion "tests"
746 (for-each delete-file network-tests)
748 ;; FIXME: This test creates a file, then deletes it and tests
749 ;; that the file was deleted. For some reason it fails when
750 ;; building with guix, but does not when you run it in the
751 ;; directory left when you build with the --keep-failed
753 (delete-file "gateways/disk/test_delete.py")
754 ;; This file is no longer writable after downloading with 'git-fetch'
755 (make-file-writable "conda_env/support/saved-env/environment.yml")
759 (setenv "HOME" "/tmp")
760 (invoke "py.test"))))))
762 `(("python-cytoolz" ,python-cytoolz)
763 ("python-ruamel.yaml" ,python-ruamel.yaml)
764 ("python-requests" ,python-requests)
765 ("python-pycosat" ,python-pycosat)
766 ("python-pytest" ,python-pytest)
767 ("python-responses" ,python-responses)
768 ("python-pyyaml" ,python-pyyaml)
769 ("python-anaconda-client" ,python-anaconda-client)))
770 (home-page "https://github.com/conda/conda")
771 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
773 "Conda is a cross-platform, Python-agnostic binary package manager. It
774 is the package manager used by Anaconda installations, but it may be used for
775 other systems as well. Conda makes environments first-class citizens, making
776 it easy to create independent environments even for C libraries. Conda is
777 written entirely in Python.
779 This package provides Conda as a library.")
780 (license license:bsd-3)))
782 (define-public python2-conda
783 (let ((base (package-with-python2
784 (strip-python2-variant python-conda))))
785 (package (inherit base)
787 `(("python2-enum34" ,python2-enum34)
788 ,@(package-native-inputs base))))))
791 (package (inherit python-conda)
794 (substitute-keyword-arguments (package-arguments python-conda)
796 `(modify-phases ,phases
798 (lambda* (#:key outputs #:allow-other-keys)
799 ;; This test fails when run before installation.
800 (delete-file "tests/test_activate.py")
802 ;; Fix broken defaults
803 (substitute* "conda/base/context.py"
804 (("return sys.prefix")
805 (string-append "return \"" (assoc-ref outputs "out") "\""))
806 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
807 (string-append "return False if self.root_prefix == self.conda_prefix else "
810 ;; The util/setup-testing.py is used to build conda in
811 ;; application form, rather than the default, library form.
812 ;; With this, we are able to run commands like `conda --help`
813 ;; directly on the command line
814 (invoke "python" "utils/setup-testing.py" "build_py")))
816 (lambda* (#:key inputs outputs #:allow-other-keys)
817 (let* ((out (assoc-ref outputs "out"))
818 (target (string-append out "/lib/python"
820 (assoc-ref inputs "python"))
822 ;; The installer aborts if the target directory is not on
825 (string-append target ":" (getenv "PYTHONPATH")))
827 ;; And it aborts if the directory doesn't exist.
829 (invoke "python" "utils/setup-testing.py" "install"
830 (string-append "--prefix=" out)))))
831 ;; The "activate" and "deactivate" scripts don't need wrapping.
832 ;; They also break when they are renamed.
833 (add-after 'wrap 'undo-wrap
834 (lambda* (#:key outputs #:allow-other-keys)
835 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
836 (delete-file "deactivate")
837 (rename-file ".deactivate-real" "deactivate")
838 (delete-file "activate")
839 (rename-file ".activate-real" "activate")
842 "Conda is a cross-platform, Python-agnostic binary package manager. It
843 is the package manager used by Anaconda installations, but it may be used for
844 other systems as well. Conda makes environments first-class citizens, making
845 it easy to create independent environments even for C libraries. Conda is
846 written entirely in Python.")))
854 (uri (string-append "mirror://gnu/gwl/gwl-" version ".tar.gz"))
857 "1ji5jvzni8aml9fmimlr11g3k8isrnlvnbzhmwgdjh72hils0alc"))))
858 (build-system gnu-build-system)
861 (modify-phases %standard-phases
862 (add-before 'build 'fix-tests
864 ;; Avoid cross-device link.
865 (substitute* "tests/cache.scm"
866 (("/tmp/gwl-test-input-XXXXXX")
867 (string-append (getcwd) "/gwl-test-input-XXXXXX")))
870 `(("autoconf" ,autoconf)
871 ("automake" ,automake)
872 ("pkg-config" ,pkg-config)
874 ("graphviz" ,graphviz)))
876 `(("guile" ,guile-3.0)))
879 ("guile-commonmark" ,guile-commonmark)
880 ("guile-gcrypt" ,guile-gcrypt)
881 ("guile-pfds" ,guile-pfds)
882 ("guile-syntax-highlight" ,guile-syntax-highlight)
883 ("guile-wisp" ,guile-wisp)))
884 (home-page "https://workflows.guix.info")
885 (synopsis "Workflow management extension for GNU Guix")
886 (description "The @dfn{Guix Workflow Language} (GWL) provides an
887 extension to GNU Guix's declarative language for package management to
888 automate the execution of programs in scientific workflows. The GWL
889 can use process engines to integrate with various computing
891 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
892 ;; the web interface modules in gwl/ are licensed AGPL3+,
893 ;; and the fonts included in this package are licensed OFL1.1.
894 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
896 (define-public guix-jupyter
898 (name "guix-jupyter")
900 (home-page "https://gitlab.inria.fr/guix-hpc/guix-kernel")
903 (uri (git-reference (url home-page)
904 (commit (string-append "v" version))))
907 "01z7jjkc7r7lj6637rcgpz40v8xqqyfp6871h94yvcnwm7zy9h1n"))
908 (modules '((guix build utils)))
911 ;; Allow builds with Guile 3.0.
912 (substitute* "configure.ac"
914 "GUILE_PKG([3.0 2.2])\n"))
916 (file-name (string-append "guix-jupyter-" version "-checkout"))))
917 (build-system gnu-build-system)
919 `(#:modules ((srfi srfi-26)
924 (guix build gnu-build-system))
926 (modify-phases %standard-phases
927 (add-after 'install 'sed-kernel-json
928 (lambda* (#:key inputs outputs #:allow-other-keys)
929 (let* ((out (assoc-ref outputs "out"))
930 (guix (assoc-ref inputs "guix"))
931 (guile (assoc-ref inputs "guile"))
932 (json (assoc-ref inputs "guile-json"))
933 (git (assoc-ref inputs "guile-git"))
934 (bs (assoc-ref inputs "guile-bytestructures"))
935 (s-zmq (assoc-ref inputs "guile-simple-zmq"))
936 (gcrypt (assoc-ref inputs "guile-gcrypt"))
937 (deps (list out s-zmq guix json git bs gcrypt))
940 (open-pipe* OPEN_READ
941 (string-append guile "/bin/guile")
942 "-c" "(display (effective-version))")))
943 (path (map (cut string-append "-L\", \"" <>
947 (gopath (map (cut string-append "-C\", \"" <>
948 "/lib/guile/" effective
951 (kernel-dir (string-append out "/share/jupyter/kernels/guix/")))
952 (substitute* (string-append kernel-dir "kernel.json")
955 (list (string-join path "\",\n\t\t\"")
956 (string-join gopath "\",\n\t\t\"")
959 (("guix-jupyter-kernel.scm")
960 (string-append out "/share/guile/site/2.2/"
961 "guix-jupyter-kernel.scm")))
964 `(("autoconf" ,autoconf)
965 ("automake" ,automake)
966 ("pkg-config" ,pkg-config)
970 ("python-ipython" ,python-ipython)
971 ("python-ipykernel" ,python-ipykernel)))
974 ("guile" ,guile-3.0)))
976 `(("guile-json" ,guile-json-3)
977 ("guile-simple-zmq" ,guile-simple-zmq)
978 ("guile-gcrypt" ,guile-gcrypt)))
979 (synopsis "Guix kernel for Jupyter")
981 "Guix-Jupyter is a Jupyter kernel. It allows you to annotate notebooks
982 with information about their software dependencies, such that code is executed
983 in the right software environment. Guix-Jupyter spawns the actual kernels
984 such as @code{python-ipykernel} on behalf of the notebook user and runs them
985 in an isolated environment, in separate namespaces.")
986 (license license:gpl3+)))
994 (uri (string-append "mirror://gnome/sources/gcab/"
995 version "/gcab-" version ".tar.xz"))
998 "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"))))
999 (build-system meson-build-system)
1001 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1002 ("intltool" ,intltool)
1003 ("pkg-config" ,pkg-config)
1010 ;; XXX This ‘documentation’ is for developers, and fails informatively:
1011 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
1012 (list "-Ddocs=false"
1013 "-Dintrospection=false")))
1014 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
1015 (synopsis "Microsoft Cabinet file manipulation library")
1017 "The libgcab library provides GObject functions to read, write, and modify
1018 Microsoft cabinet (.@dfn{CAB}) files.")
1019 (license (list license:gpl2+ ; tests/testsuite.at
1020 license:lgpl2.1+)))) ; the rest
1022 (define-public msitools
1028 (uri (string-append "mirror://gnome/sources/msitools/"
1029 version "/msitools-" version ".tar.xz"))
1032 "1skq17qr2ic4qr3779j49byfm8rncwbsq9rj1a33ncn2m7isdwdv"))))
1033 (build-system gnu-build-system)
1036 ("pkg-config" ,pkg-config)))
1041 ("libxml2" ,libxml2)
1042 ("uuid" ,util-linux "lib")))
1043 (home-page "https://wiki.gnome.org/msitools")
1044 (synopsis "Windows Installer file manipulation tool")
1046 "msitools is a collection of command-line tools to inspect, extract, build,
1047 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
1048 for packaging and deployment of cross-compiled Windows applications.")
1049 (license license:lgpl2.1+)))
1051 (define-public libostree
1058 "https://github.com/ostreedev/ostree/releases/download/v"
1059 (version-major+minor version) "/libostree-" version ".tar.xz"))
1062 "01cch4as23xspq6pck59al7x5jj60wl21g8p3iqbdxcjl1p3jxsq"))))
1063 (build-system gnu-build-system)
1066 (modify-phases %standard-phases
1067 (add-before 'check 'pre-check
1069 ;; Don't try to use the non-existing '/var/tmp' as test
1071 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
1074 ;; tap-driver.sh: missing test plan
1075 ;; tap-driver.sh: internal error getting exit status
1076 ;; tap-driver.sh: fatal: I/O or internal error
1079 `(("attr" ,attr) ; for tests
1081 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
1082 ("gobject-introspection" ,gobject-introspection)
1083 ("pkg-config" ,pkg-config)
1084 ("xsltproc" ,libxslt)))
1087 ("docbook-xml" ,docbook-xml-4.2)
1088 ("docbook-xsl" ,docbook-xsl)
1089 ("e2fsprogs" ,e2fsprogs)
1093 ("libarchive" ,libarchive)
1094 ("libsoup" ,libsoup)
1095 ("util-linux" ,util-linux)))
1096 (home-page "https://ostree.readthedocs.io/en/latest/")
1097 (synopsis "Operating system and container binary deployment and upgrades")
1099 "@code{libostree} is both a shared library and suite of command line
1100 tools that combines a \"git-like\" model for committing and downloading
1101 bootable file system trees, along with a layer for deploying them and managing
1102 the boot loader configuration.")
1103 (license license:lgpl2.0+)))
1105 (define-public flatpak
1112 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
1113 version "/flatpak-" version ".tar.xz"))
1116 "11bfxmv8pxlb5x0lb2rsl45615fzfvq5r6wldf0l6ab2ngryd7i7"))))
1118 ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
1119 ;; find the TLS backend in glib-networking.
1120 (build-system glib-or-gtk-build-system)
1123 '(#:tests? #f ;; Tests fail due to trying to create files where it can't.
1124 #:configure-flags (list
1125 "--enable-documentation=no" ;; FIXME
1126 "--enable-system-helper=no"
1127 "--localstatedir=/var"
1128 (string-append "--with-system-bubblewrap="
1129 (assoc-ref %build-inputs "bubblewrap")
1131 (native-inputs `(("bison" ,bison)
1132 ("gettext" ,gettext-minimal)
1133 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
1134 ("gobject-introspection" ,gobject-introspection)
1136 ("pkg-config" ,pkg-config)))
1137 (propagated-inputs `(("glib-networking" ,glib-networking)
1139 ("gsettings-desktop-schemas"
1140 ,gsettings-desktop-schemas)))
1141 (inputs `(("appstream-glib" ,appstream-glib)
1142 ("bubblewrap" ,bubblewrap)
1145 ("gdk-pixbuf" ,gdk-pixbuf)
1147 ("json-glib" ,json-glib)
1148 ("libarchive" ,libarchive)
1149 ("libostree" ,libostree)
1150 ("libseccomp" ,libseccomp)
1151 ("libsoup" ,libsoup)
1153 ("libxml2" ,libxml2)
1154 ("util-linux" ,util-linux)))
1155 (home-page "https://flatpak.org")
1156 (synopsis "System for building, distributing, and running sandboxed desktop
1158 (description "Flatpak is a system for building, distributing, and running
1159 sandboxed desktop applications on GNU/Linux.")
1160 (license license:lgpl2.1+)))