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 hurd)
61 #:use-module (gnu packages linux)
62 #:use-module (gnu packages lisp)
63 #:use-module (gnu packages man)
64 #:use-module (gnu packages nettle)
65 #:use-module (gnu packages nss)
66 #:use-module (gnu packages patchutils)
67 #:use-module (gnu packages perl)
68 #:use-module (gnu packages perl-check)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages popt)
71 #:use-module (gnu packages python)
72 #:use-module (gnu packages python-web)
73 #:use-module (gnu packages python-xyz)
74 #:use-module (gnu packages serialization)
75 #:use-module (gnu packages sqlite)
76 #:use-module (gnu packages ssh)
77 #:use-module (gnu packages texinfo)
78 #:use-module (gnu packages time)
79 #:use-module (gnu packages tls)
80 #:use-module (gnu packages vim)
81 #:use-module (gnu packages virtualization)
82 #:use-module (gnu packages web)
83 #:use-module (gnu packages xml)
84 #:use-module (gnu packages xorg)
85 #:use-module (guix build-system glib-or-gtk)
86 #:use-module (guix build-system gnu)
87 #:use-module (guix build-system meson)
88 #:use-module (guix build-system python)
89 #:use-module (guix download)
90 #:use-module (guix gexp)
91 #:use-module (guix git-download)
92 #:use-module ((guix licenses) #:prefix license:)
93 #:use-module (guix packages)
94 #:use-module (guix utils)
95 #:use-module (ice-9 match)
96 #:use-module (srfi srfi-1))
98 (define (boot-guile-uri arch)
99 "Return the URI for the bootstrap Guile tarball for ARCH."
100 (cond ((string=? "armhf" arch)
101 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
103 "/20150101/guile-2.0.11.tar.xz"))
104 ((string=? "aarch64" arch)
105 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
106 arch "-linux/20170217/guile-2.0.14.tar.xz"))
108 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
110 "/20131110/guile-2.0.9.tar.xz"))))
113 ;; Latest version of Guix, which may or may not correspond to a release.
114 ;; Note: the 'update-guix-package.scm' script expects this definition to
115 ;; start precisely like this.
116 (let ((version "1.1.0")
117 (commit "52b01cb7007b793c5b21456ac8cdd9f9df5b8b16")
122 (version (if (zero? revision)
124 (string-append version "-"
125 (number->string revision)
126 "." (string-take commit 7))))
130 (url "https://git.savannah.gnu.org/r/guix.git")
134 "0rz5vnqvcrccbnrirhrsx3iw4jj75znh3ma9g7szjn313ii3hl1d"))
135 (file-name (string-append "guix-" version "-checkout"))))
136 (build-system gnu-build-system)
138 `(#:configure-flags (list
139 "--localstatedir=/var"
141 (string-append "--with-bash-completion-dir="
142 (assoc-ref %outputs "out")
143 "/etc/bash_completion.d")
145 ;; Set 'DOT_USER_PROGRAM' to the empty string so
146 ;; we don't keep a reference to Graphviz, whose
147 ;; closure is pretty big (too big for the Guix
148 ;; system installation image.)
149 "ac_cv_path_DOT_USER_PROGRAM=dot"
151 ;; To avoid problems with the length of shebangs,
152 ;; choose a fixed-width and short directory name
154 "ac_cv_guix_test_root=/tmp/guix-tests"
155 ,@(if (hurd-target?) '("--with-courage") '()))
156 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
158 #:modules ((guix build gnu-build-system)
164 #:phases (modify-phases %standard-phases
167 ;; Make sure 'msgmerge' can modify the PO files.
168 (for-each (lambda (po)
170 (find-files "." "\\.po$"))
172 (patch-shebang "build-aux/git-version-gen")
174 (call-with-output-file ".tarball-version"
176 (display ,version port)))
178 ;; Install SysV init files to $(prefix)/etc rather
180 (substitute* "nix/local.mk"
181 (("^sysvinitservicedir = .*$")
182 (string-append "sysvinitservicedir = \
183 $(prefix)/etc/init.d\n")))
185 (invoke "sh" "bootstrap")))
186 (add-before 'build 'use-host-compressors
187 (lambda* (#:key inputs target #:allow-other-keys)
189 ;; Use host compressors.
190 (let ((bzip2 (assoc-ref inputs "bzip2"))
191 (gzip (assoc-ref inputs "gzip"))
192 (xz (assoc-ref inputs "xz")))
193 (substitute* "guix/config.scm"
194 (("\"[^\"]*/bin/bzip2")
195 (string-append "\"" bzip2 "/bin/bzip2"))
196 (("\"[^\"]*/bin/gzip") gzip
197 (string-append "\"" gzip "/bin/gzip"))
198 (("\"[^\"]*/bin//xz")
199 (string-append "\"" xz "/bin/xz")))))
201 (add-before 'check 'copy-bootstrap-guile
202 (lambda* (#:key system target inputs #:allow-other-keys)
203 ;; Copy the bootstrap guile tarball in the store
204 ;; used by the test suite.
205 (define (intern file recursive?)
206 ;; Note: don't use 'guix download' here because we
207 ;; need to set the 'recursive?' argument.
209 (strip-store-file-name file))
215 (let* ((item (add-to-store store ,base
218 (root (string-append "/tmp/gc-root-"
220 ;; Register a root so that the GC tests
221 ;; don't delete those.
223 (add-indirect-root store root)))))
225 (invoke "./test-env" "guile" "-c"
226 (object->string code)))
229 (intern (assoc-ref inputs "boot-guile") #f)
231 ;; On x86_64 some tests need the i686 Guile.
232 ,@(if (and (not (%current-target-system))
233 (string=? (%current-system)
235 '((intern (assoc-ref inputs "boot-guile/i686") #f))
238 ;; Copy the bootstrap executables.
239 (for-each (lambda (input)
240 (intern (assoc-ref inputs input) #t))
241 '("bootstrap/bash" "bootstrap/mkdir"
242 "bootstrap/tar" "bootstrap/xz")))
244 (add-after 'unpack 'disable-failing-tests
245 ;; XXX FIXME: These tests fail within the build container.
247 (substitute* "tests/syscalls.scm"
248 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
249 (string-append "(test-skip 1)\n" all)))
250 (substitute* "tests/containers.scm"
251 (("^\\(test-(assert|equal)" all)
252 (string-append "(test-skip 1)\n" all)))
253 (when (file-exists? "tests/guix-environment-container.sh")
254 (substitute* "tests/guix-environment-container.sh"
255 (("guix environment --version")
258 (add-before 'check 'set-SHELL
260 ;; 'guix environment' tests rely on 'SHELL' having a
261 ;; correct value, so set it.
262 (setenv "SHELL" (which "sh"))
264 (add-after 'install 'wrap-program
265 (lambda* (#:key inputs native-inputs outputs target
267 ;; Make sure the 'guix' command finds GnuTLS,
268 ;; Guile-JSON, and Guile-Git automatically.
269 (let* ((out (assoc-ref outputs "out"))
270 (guile ,@(if (%current-target-system)
271 '((assoc-ref native-inputs "guile"))
272 '((assoc-ref inputs "guile"))))
273 (gcrypt (assoc-ref inputs "guile-gcrypt"))
274 (json (assoc-ref inputs "guile-json"))
275 (sqlite (assoc-ref inputs "guile-sqlite3"))
276 (git (assoc-ref inputs "guile-git"))
277 (bs (assoc-ref inputs
278 "guile-bytestructures"))
279 (ssh (assoc-ref inputs "guile-ssh"))
280 (gnutls (assoc-ref inputs "gnutls"))
281 (locales (assoc-ref inputs "glibc-utf8-locales"))
282 (deps (list gcrypt json sqlite gnutls
286 (open-pipe* OPEN_READ
287 (string-append guile "/bin/guile")
288 "-c" "(display (effective-version))")))
290 (map (cut string-append <>
296 (map (cut string-append <>
297 "/lib/guile/" effective
301 (locpath (string-append locales "/lib/locale")))
303 (wrap-program (string-append out "/bin/guix")
304 `("GUILE_LOAD_PATH" ":" prefix (,path))
305 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
306 `("GUIX_LOCPATH" ":" suffix (,locpath)))
309 ;; XXX Touching wrap-program rebuilds world
310 (let ((bash (assoc-ref inputs "bash")))
311 (substitute* (string-append out "/bin/guix")
312 (("^#!.*/bash") (string-append "#! " bash "/bin/bash")))))
314 (native-inputs `(("pkg-config" ,pkg-config)
316 ;; Guile libraries are needed here for
317 ;; cross-compilation.
320 ("guile-gcrypt" ,guile-gcrypt)
321 ("guile-json" ,guile-json-3)
322 ("guile-sqlite3" ,guile-sqlite3)
323 ("guile-ssh" ,guile-ssh)
324 ("guile-git" ,guile-git)
326 ;; XXX: Keep the development inputs here even though
327 ;; they're unnecessary, just so that 'guix environment
328 ;; guix' always contains them.
329 ("autoconf" ,autoconf-wrapper)
330 ("automake" ,automake)
331 ("gettext" ,gettext-minimal)
333 ("graphviz" ,graphviz)
334 ("help2man" ,help2man)
339 ("zlib" ,zlib) ;for 'guix publish'
340 ("lzlib" ,lzlib) ;for 'guix publish' and 'guix substitute'
343 ("libgcrypt" ,libgcrypt)
347 ;; Some of the tests use "unshare" when it is available.
348 ("util-linux" ,util-linux)
350 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
352 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
353 ,@(if (and (not (%current-target-system))
354 (string=? (%current-system) "x86_64-linux"))
355 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
357 ,@(if (%current-target-system)
358 `(("bash" ,bash-minimal)
362 ;; Tests also rely on these bootstrap executables.
363 ("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system)))
364 ("bootstrap/mkdir" ,(bootstrap-executable "mkdir" (%current-system)))
365 ("bootstrap/tar" ,(bootstrap-executable "tar" (%current-system)))
366 ("bootstrap/xz" ,(bootstrap-executable "xz" (%current-system)))
368 ("glibc-utf8-locales" ,glibc-utf8-locales)))
370 `(("gnutls" ,(if (%current-target-system) gnutls-3.6.13 guile3.0-gnutls))
371 ("guile-gcrypt" ,guile-gcrypt)
372 ("guile-json" ,guile-json-3)
373 ("guile-sqlite3" ,guile-sqlite3)
374 ("guile-ssh" ,guile-ssh)
375 ("guile-git" ,guile-git)))
377 (home-page "https://www.gnu.org/software/guix/")
378 (synopsis "Functional package manager for installed software packages and versions")
380 "GNU Guix is a functional package manager for the GNU system, and is
381 also a distribution thereof. It includes a virtual machine image. Besides
382 the usual package management features, it also supports transactional
383 upgrades and roll-backs, per-user profiles, and much more. It is based on
384 the Nix package manager.")
385 (license license:gpl3+)
386 (properties '((ftp-server . "alpha.gnu.org"))))))
388 (define-public guix-daemon
389 ;; This package is for internal consumption: it allows us to quickly build
390 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
394 (properties `((hidden? . #t)))
397 ;; Use a minimum set of dependencies.
399 (fold alist-delete (package-native-inputs guix)
400 '("po4a" "graphviz" "help2man")))
402 `(("gnutls" ,guile3.0-gnutls)
403 ("guile-git" ,guile-git)
404 ("guile-json" ,guile-json-3)
405 ("guile-gcrypt" ,guile-gcrypt)
406 ,@(fold alist-delete (package-inputs guix)
407 '("boot-guile" "boot-guile/i686" "util-linux"))))
409 (propagated-inputs '())
412 (substitute-keyword-arguments (package-arguments guix)
413 ((#:configure-flags flags '())
414 ;; Pretend we have those libraries; we don't actually need them.
416 '("guix_cv_have_recent_guile_sqlite3=yes"
417 "guix_cv_have_recent_guile_ssh=yes")))
420 ((#:phases phases '%standard-phases)
421 `(modify-phases ,phases
422 (add-after 'unpack 'change-default-guix
424 ;; We need to tell 'guix-daemon' which 'guix' command to use.
425 ;; Here we use a questionable hack where we hard-code root's
426 ;; current guix, which could be wrong (XXX). Note that scripts
427 ;; like 'guix perform-download' do not run as root so we assume
428 ;; that they have access to /var/guix/profiles/per-user/root.
429 (substitute* "nix/libstore/globals.cc"
430 (("guixProgram = (.*)nixBinDir + \"/guix\"" _ before)
431 (string-append "guixProgram = " before
432 "/var/guix/profiles/per-user/root\
433 /current-guix/bin/guix")))
437 (invoke "make" "nix/libstore/schema.sql.hh")
438 (invoke "make" "-j" (number->string
439 (parallel-job-count))
441 (delete 'copy-bootstrap-guile)
443 (lambda* (#:key outputs #:allow-other-keys)
444 (invoke "make" "install-binPROGRAMS")))
445 (delete 'wrap-program)))))))
448 (define-public guile2.2-guix
451 (name "guile2.2-guix")
453 `(("guile" ,guile-2.2)
454 ("gnutls" ,guile2.2-gnutls)
455 ("guile-gcrypt" ,guile2.2-gcrypt)
456 ("guile-json" ,guile2.2-json)
457 ("guile-sqlite3" ,guile2.2-sqlite3)
458 ("guile-ssh" ,guile2.2-ssh)
459 ("guile-git" ,guile2.2-git)
460 ,@(fold alist-delete (package-native-inputs guix)
461 '("guile" "gnutls" "guile-gcrypt" "guile-json"
462 "guile-sqlite3" "guile-ssh" "guile-git"))))
464 `(("guile" ,guile-2.2)
465 ,@(alist-delete "guile" (package-inputs guix))))
468 ("guile-gcrypt" ,guile2.2-gcrypt)
469 ("guile-json" ,guile2.2-json)
470 ("guile-sqlite3" ,guile2.2-sqlite3)
471 ("guile-ssh" ,guile2.2-ssh)
472 ("guile-git" ,guile2.2-git)))))
474 (define-public guile3.0-guix
475 (deprecated-package "guile3.0-guix" guix))
477 (define-public guix-minimal
478 ;; A version of Guix which is built with the minimal set of dependencies, as
479 ;; outlined in the README "Requirements" section. Intended as a CI job, so
484 (name "guix-minimal")
486 `(("guile" ,guile-2.2)
487 ,@(alist-delete "guile" (package-inputs guix))))
490 (package-propagated-inputs guix)
493 (define (source-file? file stat)
494 "Return true if FILE is likely a source file, false if it is a typical
496 (define (wrong-extension? file)
497 (or (string-suffix? "~" file)
498 (member (file-extension file)
499 '("o" "a" "lo" "so" "go"))))
501 (match (basename file)
502 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
504 ((? wrong-extension?)
509 (define-public current-guix-package
510 ;; This parameter allows callers to override the package that 'current-guix'
511 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
512 ;; for instance because it's not running from a source code checkout.
515 (define-public current-guix
516 (let* ((repository-root (delay (canonicalize-path
517 (string-append (current-source-directory)
519 (select? (delay (or (git-predicate (force repository-root))
522 "Return a package representing Guix built from the current source tree.
523 This works by adding the current source tree to the store (after filtering it
524 out) and returning a package that uses that as its 'source'."
525 (or (current-guix-package)
528 (version (string-append (package-version guix) "+"))
529 (source (local-file (force repository-root) "guix-current"
531 #:select? (force select?))))))))
544 (uri (string-append "http://nixos.org/releases/nix/nix-"
545 version "/nix-" version ".tar.xz"))
548 "0ss9svxlh1pvrdmnqjvjyqjmbqmrdbyfarvbb14i9d4bggzl0r8n"))))
549 (build-system gnu-build-system)
550 (native-inputs `(("pkg-config" ,pkg-config)))
551 (inputs `(("curl" ,curl)
554 ("libseccomp" ,libseccomp)
555 ("libsodium" ,libsodium)
559 (home-page "https://nixos.org/nix/")
560 (synopsis "The Nix package manager")
562 "Nix is a purely functional package manager. This means that it treats
563 packages like values in purely functional programming languages such as
564 Haskell—they are built by functions that don't have side-effects, and they
565 never change after they have been built. Nix stores packages in the Nix
566 store, usually the directory /nix/store, where each package has its own unique
568 (license license:lgpl2.1+)))
576 (uri (string-append "mirror://gnu/stow/stow-"
580 "0jrxy12ywn7smdzdnvwzjw77l6knx6jkj2rckgykg1dpf6bdkm89"))))
581 (build-system gnu-build-system)
585 `(("perl-test-simple" ,perl-test-simple)
586 ("perl-test-output" ,perl-test-output)
587 ("perl-capture-tiny" ,perl-capture-tiny)
588 ("perl-io-stringy" ,perl-io-stringy)))
589 (home-page "https://www.gnu.org/software/stow/")
590 (synopsis "Managing installed software packages")
592 "GNU Stow is a symlink manager. It generates symlinks to directories
593 of data and makes them appear to be merged into the same directory. It is
594 typically used for managing software packages installed from source, by
595 letting you install them apart in distinct directories and then create
596 symlinks to the files in a common directory such as /usr/local.")
597 (license license:gpl3+)))
605 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
606 (version-major+minor version) ".x/rpm-"
610 "1nmck2fq9h85fgs3zhh6w1avlw5y16cbz5khd459ry3jfd5w4f8i"))))
611 (build-system gnu-build-system)
613 '(#:configure-flags '("--with-external-db" ;use the system's bdb
616 #:phases (modify-phases %standard-phases
617 (add-before 'configure 'set-nss-library-path
618 (lambda* (#:key inputs #:allow-other-keys)
619 (let ((nss (assoc-ref inputs "nss")))
620 (setenv "LIBRARY_PATH"
621 (string-append (getenv "LIBRARY_PATH") ":"
625 `(("pkg-config" ,pkg-config)))
633 ("libarchive" ,libarchive)
638 (home-page "https://rpm.org/")
639 (synopsis "The RPM Package Manager")
641 "The RPM Package Manager (RPM) is a command-line driven package
642 management system capable of installing, uninstalling, verifying, querying,
643 and updating computer software packages. Each software package consists of an
644 archive of files along with information about the package like its version, a
645 description. There is also a library permitting developers to manage such
646 transactions from C or Python.")
648 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
649 (license license:gpl2+)))
651 (define-public python-anaconda-client
653 (name "python-anaconda-client")
659 (url "https://github.com/Anaconda-Platform/anaconda-client")
661 (file-name (git-file-name name version))
664 "0w1bfxnydjl9qp53r2gcvr6vlpdqqilcrzqxrll9sgg6vwdyiyyp"))))
665 (build-system python-build-system)
667 `(("python-pyyaml" ,python-pyyaml)
668 ("python-requests" ,python-requests)
669 ("python-clyent" ,python-clyent)))
671 `(("python-pytz" ,python-pytz)
672 ("python-dateutil" ,python-dateutil)
673 ("python-mock" ,python-mock)
674 ("python-coverage" ,python-coverage)
675 ("python-pillow" ,python-pillow)))
678 (modify-phases %standard-phases
679 ;; This is needed for some tests.
680 (add-before 'check 'set-up-home
681 (lambda* _ (setenv "HOME" "/tmp") #t))
682 (add-before 'check 'remove-network-tests
684 ;; Remove tests requiring a network connection
685 (let ((network-tests '("tests/test_upload.py"
686 "tests/test_authorizations.py"
687 "tests/test_login.py"
688 "tests/test_whoami.py"
689 "utils/notebook/tests/test_data_uri.py"
690 "utils/notebook/tests/test_base.py"
691 "utils/notebook/tests/test_downloader.py"
692 "inspect_package/tests/test_conda.py")))
693 (with-directory-excursion "binstar_client"
694 (for-each delete-file network-tests)))
696 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
697 (synopsis "Anaconda Cloud command line client library")
699 "Anaconda Cloud command line client library provides an interface to
700 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
702 (license license:bsd-3)))
704 (define-public python2-anaconda-client
705 (package-with-python2 python-anaconda-client))
707 (define-public python-conda
709 (name "python-conda")
715 (url "https://github.com/conda/conda")
717 (file-name (git-file-name name version))
720 "1qwy0awx4qf2pbk8z2b7q6wdcq7mvwpxxjhg27mbirdvs5hw7hb2"))))
721 (build-system python-build-system)
724 (modify-phases %standard-phases
725 (add-before 'build 'create-version-file
727 (with-output-to-file "conda/.version"
728 (lambda () (display ,version)))
730 (add-before 'check 'remove-failing-tests
732 ;; These tests require internet/network access
733 (let ((network-tests '("test_cli.py"
741 "conda_env/test_cli.py"
742 "conda_env/test_create.py"
743 "conda_env/specs/test_notebook.py"
744 "conda_env/utils/test_notebooks.py"
746 "core/test_repodata.py")))
747 (with-directory-excursion "tests"
748 (for-each delete-file network-tests)
750 ;; FIXME: This test creates a file, then deletes it and tests
751 ;; that the file was deleted. For some reason it fails when
752 ;; building with guix, but does not when you run it in the
753 ;; directory left when you build with the --keep-failed
755 (delete-file "gateways/disk/test_delete.py")
756 ;; This file is no longer writable after downloading with 'git-fetch'
757 (make-file-writable "conda_env/support/saved-env/environment.yml")
761 (setenv "HOME" "/tmp")
762 (invoke "py.test"))))))
764 `(("python-cytoolz" ,python-cytoolz)
765 ("python-ruamel.yaml" ,python-ruamel.yaml)
766 ("python-requests" ,python-requests)
767 ("python-pycosat" ,python-pycosat)
768 ("python-pytest" ,python-pytest)
769 ("python-responses" ,python-responses)
770 ("python-pyyaml" ,python-pyyaml)
771 ("python-anaconda-client" ,python-anaconda-client)))
772 (home-page "https://github.com/conda/conda")
773 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
775 "Conda is a cross-platform, Python-agnostic binary package manager. It
776 is the package manager used by Anaconda installations, but it may be used for
777 other systems as well. Conda makes environments first-class citizens, making
778 it easy to create independent environments even for C libraries. Conda is
779 written entirely in Python.
781 This package provides Conda as a library.")
782 (license license:bsd-3)))
784 (define-public python2-conda
785 (let ((base (package-with-python2
786 (strip-python2-variant python-conda))))
787 (package (inherit base)
789 `(("python2-enum34" ,python2-enum34)
790 ,@(package-native-inputs base))))))
793 (package (inherit python-conda)
796 (substitute-keyword-arguments (package-arguments python-conda)
798 `(modify-phases ,phases
800 (lambda* (#:key outputs #:allow-other-keys)
801 ;; This test fails when run before installation.
802 (delete-file "tests/test_activate.py")
804 ;; Fix broken defaults
805 (substitute* "conda/base/context.py"
806 (("return sys.prefix")
807 (string-append "return \"" (assoc-ref outputs "out") "\""))
808 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
809 (string-append "return False if self.root_prefix == self.conda_prefix else "
812 ;; The util/setup-testing.py is used to build conda in
813 ;; application form, rather than the default, library form.
814 ;; With this, we are able to run commands like `conda --help`
815 ;; directly on the command line
816 (invoke "python" "utils/setup-testing.py" "build_py")))
818 (lambda* (#:key inputs outputs #:allow-other-keys)
819 (let* ((out (assoc-ref outputs "out"))
820 (target (string-append out "/lib/python"
822 (assoc-ref inputs "python"))
824 ;; The installer aborts if the target directory is not on
827 (string-append target ":" (getenv "PYTHONPATH")))
829 ;; And it aborts if the directory doesn't exist.
831 (invoke "python" "utils/setup-testing.py" "install"
832 (string-append "--prefix=" out)))))
833 ;; The "activate" and "deactivate" scripts don't need wrapping.
834 ;; They also break when they are renamed.
835 (add-after 'wrap 'undo-wrap
836 (lambda* (#:key outputs #:allow-other-keys)
837 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
838 (delete-file "deactivate")
839 (rename-file ".deactivate-real" "deactivate")
840 (delete-file "activate")
841 (rename-file ".activate-real" "activate")
844 "Conda is a cross-platform, Python-agnostic binary package manager. It
845 is the package manager used by Anaconda installations, but it may be used for
846 other systems as well. Conda makes environments first-class citizens, making
847 it easy to create independent environments even for C libraries. Conda is
848 written entirely in Python.")))
856 (uri (string-append "mirror://gnu/gwl/gwl-" version ".tar.gz"))
859 "1ji5jvzni8aml9fmimlr11g3k8isrnlvnbzhmwgdjh72hils0alc"))))
860 (build-system gnu-build-system)
863 (modify-phases %standard-phases
864 (add-before 'build 'fix-tests
866 ;; Avoid cross-device link.
867 (substitute* "tests/cache.scm"
868 (("/tmp/gwl-test-input-XXXXXX")
869 (string-append (getcwd) "/gwl-test-input-XXXXXX")))
872 `(("autoconf" ,autoconf)
873 ("automake" ,automake)
874 ("pkg-config" ,pkg-config)
876 ("graphviz" ,graphviz)))
878 `(("guile" ,guile-3.0)))
881 ("guile-commonmark" ,guile-commonmark)
882 ("guile-gcrypt" ,guile-gcrypt)
883 ("guile-pfds" ,guile-pfds)
884 ("guile-syntax-highlight" ,guile-syntax-highlight)
885 ("guile-wisp" ,guile-wisp)))
886 (home-page "https://workflows.guix.info")
887 (synopsis "Workflow management extension for GNU Guix")
888 (description "The @dfn{Guix Workflow Language} (GWL) provides an
889 extension to GNU Guix's declarative language for package management to
890 automate the execution of programs in scientific workflows. The GWL
891 can use process engines to integrate with various computing
893 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
894 ;; the web interface modules in gwl/ are licensed AGPL3+,
895 ;; and the fonts included in this package are licensed OFL1.1.
896 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
898 (define-public guix-jupyter
900 (name "guix-jupyter")
902 (home-page "https://gitlab.inria.fr/guix-hpc/guix-kernel")
905 (uri (git-reference (url home-page)
906 (commit (string-append "v" version))))
909 "01z7jjkc7r7lj6637rcgpz40v8xqqyfp6871h94yvcnwm7zy9h1n"))
910 (modules '((guix build utils)))
913 ;; Allow builds with Guile 3.0.
914 (substitute* "configure.ac"
916 "GUILE_PKG([3.0 2.2])\n"))
918 (file-name (string-append "guix-jupyter-" version "-checkout"))))
919 (build-system gnu-build-system)
921 `(#:modules ((srfi srfi-26)
926 (guix build gnu-build-system))
928 (modify-phases %standard-phases
929 (add-after 'install 'sed-kernel-json
930 (lambda* (#:key inputs outputs #:allow-other-keys)
931 (let* ((out (assoc-ref outputs "out"))
932 (guix (assoc-ref inputs "guix"))
933 (guile (assoc-ref inputs "guile"))
934 (json (assoc-ref inputs "guile-json"))
935 (git (assoc-ref inputs "guile-git"))
936 (bs (assoc-ref inputs "guile-bytestructures"))
937 (s-zmq (assoc-ref inputs "guile-simple-zmq"))
938 (gcrypt (assoc-ref inputs "guile-gcrypt"))
939 (deps (list out s-zmq guix json git bs gcrypt))
942 (open-pipe* OPEN_READ
943 (string-append guile "/bin/guile")
944 "-c" "(display (effective-version))")))
945 (path (map (cut string-append "-L\", \"" <>
949 (gopath (map (cut string-append "-C\", \"" <>
950 "/lib/guile/" effective
953 (kernel-dir (string-append out "/share/jupyter/kernels/guix/")))
954 (substitute* (string-append kernel-dir "kernel.json")
957 (list (string-join path "\",\n\t\t\"")
958 (string-join gopath "\",\n\t\t\"")
961 (("guix-jupyter-kernel.scm")
962 (string-append out "/share/guile/site/2.2/"
963 "guix-jupyter-kernel.scm")))
966 `(("autoconf" ,autoconf)
967 ("automake" ,automake)
968 ("pkg-config" ,pkg-config)
972 ("python-ipython" ,python-ipython)
973 ("python-ipykernel" ,python-ipykernel)))
976 ("guile" ,guile-3.0)))
978 `(("guile-json" ,guile-json-3)
979 ("guile-simple-zmq" ,guile-simple-zmq)
980 ("guile-gcrypt" ,guile-gcrypt)))
981 (synopsis "Guix kernel for Jupyter")
983 "Guix-Jupyter is a Jupyter kernel. It allows you to annotate notebooks
984 with information about their software dependencies, such that code is executed
985 in the right software environment. Guix-Jupyter spawns the actual kernels
986 such as @code{python-ipykernel} on behalf of the notebook user and runs them
987 in an isolated environment, in separate namespaces.")
988 (license license:gpl3+)))
996 (uri (string-append "mirror://gnome/sources/gcab/"
997 version "/gcab-" version ".tar.xz"))
1000 "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"))))
1001 (build-system meson-build-system)
1003 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1004 ("intltool" ,intltool)
1005 ("pkg-config" ,pkg-config)
1012 ;; XXX This ‘documentation’ is for developers, and fails informatively:
1013 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
1014 (list "-Ddocs=false"
1015 "-Dintrospection=false")))
1016 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
1017 (synopsis "Microsoft Cabinet file manipulation library")
1019 "The libgcab library provides GObject functions to read, write, and modify
1020 Microsoft cabinet (.@dfn{CAB}) files.")
1021 (license (list license:gpl2+ ; tests/testsuite.at
1022 license:lgpl2.1+)))) ; the rest
1024 (define-public msitools
1030 (uri (string-append "mirror://gnome/sources/msitools/"
1031 version "/msitools-" version ".tar.xz"))
1034 "1skq17qr2ic4qr3779j49byfm8rncwbsq9rj1a33ncn2m7isdwdv"))))
1035 (build-system gnu-build-system)
1038 ("pkg-config" ,pkg-config)))
1043 ("libxml2" ,libxml2)
1044 ("uuid" ,util-linux "lib")))
1045 (home-page "https://wiki.gnome.org/msitools")
1046 (synopsis "Windows Installer file manipulation tool")
1048 "msitools is a collection of command-line tools to inspect, extract, build,
1049 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
1050 for packaging and deployment of cross-compiled Windows applications.")
1051 (license license:lgpl2.1+)))
1053 (define-public libostree
1060 "https://github.com/ostreedev/ostree/releases/download/v"
1061 (version-major+minor version) "/libostree-" version ".tar.xz"))
1064 "01cch4as23xspq6pck59al7x5jj60wl21g8p3iqbdxcjl1p3jxsq"))))
1065 (build-system gnu-build-system)
1068 (modify-phases %standard-phases
1069 (add-before 'check 'pre-check
1071 ;; Don't try to use the non-existing '/var/tmp' as test
1073 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
1076 ;; tap-driver.sh: missing test plan
1077 ;; tap-driver.sh: internal error getting exit status
1078 ;; tap-driver.sh: fatal: I/O or internal error
1081 `(("attr" ,attr) ; for tests
1083 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
1084 ("gobject-introspection" ,gobject-introspection)
1085 ("pkg-config" ,pkg-config)
1086 ("xsltproc" ,libxslt)))
1089 ("docbook-xml" ,docbook-xml-4.2)
1090 ("docbook-xsl" ,docbook-xsl)
1091 ("e2fsprogs" ,e2fsprogs)
1095 ("libarchive" ,libarchive)
1096 ("libsoup" ,libsoup)
1097 ("util-linux" ,util-linux)))
1098 (home-page "https://ostree.readthedocs.io/en/latest/")
1099 (synopsis "Operating system and container binary deployment and upgrades")
1101 "@code{libostree} is both a shared library and suite of command line
1102 tools that combines a \"git-like\" model for committing and downloading
1103 bootable file system trees, along with a layer for deploying them and managing
1104 the boot loader configuration.")
1105 (license license:lgpl2.0+)))
1107 (define-public flatpak
1114 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
1115 version "/flatpak-" version ".tar.xz"))
1118 "11bfxmv8pxlb5x0lb2rsl45615fzfvq5r6wldf0l6ab2ngryd7i7"))))
1120 ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
1121 ;; find the TLS backend in glib-networking.
1122 (build-system glib-or-gtk-build-system)
1125 '(#:tests? #f ;; Tests fail due to trying to create files where it can't.
1126 #:configure-flags (list
1127 "--enable-documentation=no" ;; FIXME
1128 "--enable-system-helper=no"
1129 "--localstatedir=/var"
1130 (string-append "--with-system-bubblewrap="
1131 (assoc-ref %build-inputs "bubblewrap")
1133 (native-inputs `(("bison" ,bison)
1134 ("gettext" ,gettext-minimal)
1135 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
1136 ("gobject-introspection" ,gobject-introspection)
1138 ("pkg-config" ,pkg-config)))
1139 (propagated-inputs `(("glib-networking" ,glib-networking)
1141 ("gsettings-desktop-schemas"
1142 ,gsettings-desktop-schemas)))
1143 (inputs `(("appstream-glib" ,appstream-glib)
1144 ("bubblewrap" ,bubblewrap)
1147 ("gdk-pixbuf" ,gdk-pixbuf)
1149 ("json-glib" ,json-glib)
1150 ("libarchive" ,libarchive)
1151 ("libostree" ,libostree)
1152 ("libseccomp" ,libseccomp)
1153 ("libsoup" ,libsoup)
1155 ("libxml2" ,libxml2)
1156 ("util-linux" ,util-linux)))
1157 (home-page "https://flatpak.org")
1158 (synopsis "System for building, distributing, and running sandboxed desktop
1160 (description "Flatpak is a system for building, distributing, and running
1161 sandboxed desktop applications on GNU/Linux.")
1162 (license license:lgpl2.1+)))