1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015, 2017 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 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 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
15 ;;; This file is part of GNU Guix.
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30 (define-module (gnu packages package-management)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages acl)
33 #:use-module (gnu packages attr)
34 #:use-module (gnu packages avahi)
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages backup)
37 #:use-module (gnu packages base)
38 #:use-module (gnu packages bdw-gc)
39 #:use-module (gnu packages bison)
40 #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
41 #:use-module (gnu packages check)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages cpio)
44 #:use-module (gnu packages crypto)
45 #:use-module (gnu packages curl)
46 #:use-module (gnu packages dbm)
47 #:use-module (gnu packages docbook)
48 #:use-module (gnu packages file)
49 #:use-module (gnu packages gettext)
50 #:use-module (gnu packages glib)
51 #:use-module (gnu packages gnome)
52 #:use-module (gnu packages gnupg)
53 #:use-module (gnu packages graphviz)
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages guile)
56 #:use-module (gnu packages guile-xyz)
57 #:use-module (gnu packages linux)
58 #:use-module (gnu packages lisp)
59 #:use-module (gnu packages man)
60 #:use-module (gnu packages nettle)
61 #:use-module (gnu packages nss)
62 #:use-module (gnu packages patchutils)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages perl-check)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages popt)
67 #:use-module (gnu packages python)
68 #:use-module (gnu packages python-web)
69 #:use-module (gnu packages python-xyz)
70 #:use-module (gnu packages serialization)
71 #:use-module (gnu packages sqlite)
72 #:use-module (gnu packages ssh)
73 #:use-module (gnu packages texinfo)
74 #:use-module (gnu packages time)
75 #:use-module (gnu packages tls)
76 #:use-module (gnu packages vim)
77 #:use-module (gnu packages virtualization)
78 #:use-module (gnu packages web)
79 #:use-module (gnu packages xml)
80 #:use-module (gnu packages xorg)
81 #:use-module (guix build-system glib-or-gtk)
82 #:use-module (guix build-system gnu)
83 #:use-module (guix build-system meson)
84 #:use-module (guix build-system python)
85 #:use-module (guix download)
86 #:use-module (guix gexp)
87 #:use-module (guix git-download)
88 #:use-module ((guix licenses) #:prefix license:)
89 #:use-module (guix packages)
90 #:use-module (guix utils)
91 #:use-module (ice-9 match)
92 #:use-module (srfi srfi-1))
94 (define (boot-guile-uri arch)
95 "Return the URI for the bootstrap Guile tarball for ARCH."
96 (cond ((string=? "armhf" arch)
97 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
99 "/20150101/guile-2.0.11.tar.xz"))
100 ((string=? "aarch64" arch)
101 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
102 arch "-linux/20170217/guile-2.0.14.tar.xz"))
104 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
106 "/20131110/guile-2.0.9.tar.xz"))))
109 ;; Latest version of Guix, which may or may not correspond to a release.
110 ;; Note: the 'update-guix-package.scm' script expects this definition to
111 ;; start precisely like this.
112 (let ((version "1.0.1")
113 (commit "41b4b713f4892918a9a1950acdd89f33b977d143")
118 (version (if (zero? revision)
120 (string-append version "-"
121 (number->string revision)
122 "." (string-take commit 7))))
126 (url "https://git.savannah.gnu.org/r/guix.git")
130 "08sblj4xy78va6zlxmxdq2id58pjr8rjqxxycd77hiacsqbjh9g6"))
131 (file-name (string-append "guix-" version "-checkout"))))
132 (build-system gnu-build-system)
134 `(#:configure-flags (list
135 "--localstatedir=/var"
137 (string-append "--with-bash-completion-dir="
138 (assoc-ref %outputs "out")
139 "/etc/bash_completion.d")
141 ;; Set 'DOT_USER_PROGRAM' to the empty string so
142 ;; we don't keep a reference to Graphviz, whose
143 ;; closure is pretty big (too big for the Guix
144 ;; system installation image.)
145 "ac_cv_path_DOT_USER_PROGRAM=dot"
147 ;; To avoid problems with the length of shebangs,
148 ;; choose a fixed-width and short directory name
150 "ac_cv_guix_test_root=/tmp/guix-tests")
151 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
153 #:modules ((guix build gnu-build-system)
159 #:phases (modify-phases %standard-phases
162 ;; Make sure 'msgmerge' can modify the PO files.
163 (for-each (lambda (po)
165 (find-files "." "\\.po$"))
167 (patch-shebang "build-aux/git-version-gen")
169 (call-with-output-file ".tarball-version"
171 (display ,version port)))
173 (invoke "sh" "bootstrap")))
174 (add-before 'check 'copy-bootstrap-guile
175 (lambda* (#:key system inputs #:allow-other-keys)
176 ;; Copy the bootstrap guile tarball in the store used
177 ;; by the test suite.
178 (define (intern file recursive?)
179 (let ((base (strip-store-file-name file)))
180 ;; Note: don't use 'guix download' here because we
181 ;; need to set the 'recursive?' argument.
182 (invoke "./test-env" "guile" "-c"
187 (add-to-store store ,base ,recursive?
188 "sha256" ,file)))))))
190 (intern (assoc-ref inputs "boot-guile") #f)
192 ;; On x86_64 some tests need the i686 Guile.
193 ,@(if (and (not (%current-target-system))
194 (string=? (%current-system)
196 '((intern (assoc-ref inputs "boot-guile/i686") #f))
199 ;; Copy the bootstrap executables.
200 (for-each (lambda (input)
201 (intern (assoc-ref inputs input) #t))
202 '("bootstrap/bash" "bootstrap/mkdir"
203 "bootstrap/tar" "bootstrap/xz"))
205 (add-after 'unpack 'disable-failing-tests
206 ;; XXX FIXME: These tests fail within the build container.
208 (substitute* "tests/syscalls.scm"
209 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
210 (string-append "(test-skip 1)\n" all)))
211 (substitute* "tests/containers.scm"
212 (("^\\(test-(assert|equal)" all)
213 (string-append "(test-skip 1)\n" all)))
214 (when (file-exists? "tests/guix-environment-container.sh")
215 (substitute* "tests/guix-environment-container.sh"
216 (("guix environment --version")
219 (add-before 'check 'set-SHELL
221 ;; 'guix environment' tests rely on 'SHELL' having a
222 ;; correct value, so set it.
223 (setenv "SHELL" (which "sh"))
225 (add-after 'install 'wrap-program
226 (lambda* (#:key inputs outputs #:allow-other-keys)
227 ;; Make sure the 'guix' command finds GnuTLS,
228 ;; Guile-JSON, and Guile-Git automatically.
229 (let* ((out (assoc-ref outputs "out"))
230 (guile (assoc-ref inputs "guile"))
231 (gcrypt (assoc-ref inputs "guile-gcrypt"))
232 (json (assoc-ref inputs "guile-json"))
233 (sqlite (assoc-ref inputs "guile-sqlite3"))
234 (git (assoc-ref inputs "guile-git"))
235 (bs (assoc-ref inputs
236 "guile-bytestructures"))
237 (ssh (assoc-ref inputs "guile-ssh"))
238 (gnutls (assoc-ref inputs "gnutls"))
239 (locales (assoc-ref inputs "glibc-utf8-locales"))
240 (deps (list gcrypt json sqlite gnutls
244 (open-pipe* OPEN_READ
245 (string-append guile "/bin/guile")
246 "-c" "(display (effective-version))")))
248 (map (cut string-append <>
254 (map (cut string-append <>
255 "/lib/guile/" effective
259 (locpath (string-append locales "/lib/locale")))
261 (wrap-program (string-append out "/bin/guix")
262 `("GUILE_LOAD_PATH" ":" prefix (,path))
263 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
264 `("GUIX_LOCPATH" ":" suffix (,locpath)))
267 (native-inputs `(("pkg-config" ,pkg-config)
269 ;; XXX: Keep the development inputs here even though
270 ;; they're unnecessary, just so that 'guix environment
271 ;; guix' always contains them.
272 ("autoconf" ,autoconf-wrapper)
273 ("automake" ,automake)
274 ("gettext" ,gettext-minimal)
276 ("graphviz" ,graphviz)
277 ("help2man" ,help2man)
282 ("zlib" ,zlib) ;for 'guix publish'
283 ("lzlib" ,lzlib) ;for 'guix publish' and 'guix substitute'
286 ("libgcrypt" ,libgcrypt)
290 ;; Some of the tests use "unshare" when it is available.
291 ("util-linux" ,util-linux)
293 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
295 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
296 ,@(if (and (not (%current-target-system))
297 (string=? (%current-system) "x86_64-linux"))
298 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
301 ;; Tests also rely on these bootstrap executables.
302 ("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system)))
303 ("bootstrap/mkdir" ,(bootstrap-executable "mkdir" (%current-system)))
304 ("bootstrap/tar" ,(bootstrap-executable "tar" (%current-system)))
305 ("bootstrap/xz" ,(bootstrap-executable "xz" (%current-system)))
307 ("glibc-utf8-locales" ,glibc-utf8-locales)))
310 ("guile-gcrypt" ,guile-gcrypt)
311 ("guile-json" ,guile-json-3)
312 ("guile-sqlite3" ,guile-sqlite3)
313 ("guile-ssh" ,guile-ssh)
314 ("guile-git" ,guile-git)))
316 (home-page "https://www.gnu.org/software/guix/")
317 (synopsis "Functional package manager for installed software packages and versions")
319 "GNU Guix is a functional package manager for the GNU system, and is
320 also a distribution thereof. It includes a virtual machine image. Besides
321 the usual package management features, it also supports transactional
322 upgrades and roll-backs, per-user profiles, and much more. It is based on
323 the Nix package manager.")
324 (license license:gpl3+)
325 (properties '((ftp-server . "alpha.gnu.org"))))))
327 (define-public guix-daemon
328 ;; This package is for internal consumption: it allows us to quickly build
329 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
333 (properties `((hidden? . #t)))
336 ;; Use a minimum set of dependencies.
338 (fold alist-delete (package-native-inputs guix)
339 '("po4a" "graphviz" "help2man")))
342 ("guile-git" ,guile-git)
343 ("guile-json" ,guile-json-3)
344 ("guile-gcrypt" ,guile-gcrypt)
345 ,@(fold alist-delete (package-inputs guix)
346 '("boot-guile" "boot-guile/i686" "util-linux"))))
348 (propagated-inputs '())
351 (substitute-keyword-arguments (package-arguments guix)
352 ((#:configure-flags flags '())
353 ;; Pretend we have those libraries; we don't actually need them.
355 '("guix_cv_have_recent_guile_sqlite3=yes"
356 "guix_cv_have_recent_guile_ssh=yes")))
359 ((#:phases phases '%standard-phases)
360 `(modify-phases ,phases
361 (add-after 'unpack 'change-default-guix
363 ;; We need to tell 'guix-daemon' which 'guix' command to use.
364 ;; Here we use a questionable hack where we hard-code root's
365 ;; current guix, which could be wrong (XXX). Note that scripts
366 ;; like 'guix perform-download' do not run as root so we assume
367 ;; that they have access to /var/guix/profiles/per-user/root.
368 (substitute* "nix/libstore/globals.cc"
369 (("guixProgram = (.*)nixBinDir + \"/guix\"" _ before)
370 (string-append "guixProgram = " before
371 "/var/guix/profiles/per-user/root\
372 /current-guix/bin/guix")))
376 (invoke "make" "nix/libstore/schema.sql.hh")
377 (invoke "make" "-j" (number->string
378 (parallel-job-count))
380 (delete 'copy-bootstrap-guile)
382 (lambda* (#:key outputs #:allow-other-keys)
383 (invoke "make" "install-binPROGRAMS")))
384 (delete 'wrap-program)))))))
386 (define-public guile2.0-guix
387 (deprecated-package "guile2.0-guix" guix))
389 (define-public guix-minimal
390 ;; A version of Guix which is built with the minimal set of dependencies, as
391 ;; outlined in the README "Requirements" section. Intended as a CI job, so
396 (name "guix-minimal")
398 `(("guile" ,guile-2.2)
399 ,@(alist-delete "guile" (package-inputs guix))))
402 (package-propagated-inputs guix)
405 (define (source-file? file stat)
406 "Return true if FILE is likely a source file, false if it is a typical
408 (define (wrong-extension? file)
409 (or (string-suffix? "~" file)
410 (member (file-extension file)
411 '("o" "a" "lo" "so" "go"))))
413 (match (basename file)
414 ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
416 ((? wrong-extension?)
421 (define-public current-guix-package
422 ;; This parameter allows callers to override the package that 'current-guix'
423 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
424 ;; for instance because it's not running from a source code checkout.
427 (define-public current-guix
428 (let* ((repository-root (delay (canonicalize-path
429 (string-append (current-source-directory)
431 (select? (delay (or (git-predicate (force repository-root))
434 "Return a package representing Guix built from the current source tree.
435 This works by adding the current source tree to the store (after filtering it
436 out) and returning a package that uses that as its 'source'."
437 (or (current-guix-package)
440 (version (string-append (package-version guix) "+"))
441 (source (local-file (force repository-root) "guix-current"
443 #:select? (force select?))))))))
456 (uri (string-append "http://nixos.org/releases/nix/nix-"
457 version "/nix-" version ".tar.xz"))
460 "0ss9svxlh1pvrdmnqjvjyqjmbqmrdbyfarvbb14i9d4bggzl0r8n"))))
461 (build-system gnu-build-system)
462 (native-inputs `(("pkg-config" ,pkg-config)))
463 (inputs `(("curl" ,curl)
466 ("libseccomp" ,libseccomp)
467 ("libsodium" ,libsodium)
471 (home-page "https://nixos.org/nix/")
472 (synopsis "The Nix package manager")
474 "Nix is a purely functional package manager. This means that it treats
475 packages like values in purely functional programming languages such as
476 Haskell—they are built by functions that don't have side-effects, and they
477 never change after they have been built. Nix stores packages in the Nix
478 store, usually the directory /nix/store, where each package has its own unique
480 (license license:lgpl2.1+)))
488 (uri (string-append "mirror://gnu/stow/stow-"
492 "0jrxy12ywn7smdzdnvwzjw77l6knx6jkj2rckgykg1dpf6bdkm89"))))
493 (build-system gnu-build-system)
497 `(("perl-test-simple" ,perl-test-simple)
498 ("perl-test-output" ,perl-test-output)
499 ("perl-capture-tiny" ,perl-capture-tiny)
500 ("perl-io-stringy" ,perl-io-stringy)))
501 (home-page "https://www.gnu.org/software/stow/")
502 (synopsis "Managing installed software packages")
504 "GNU Stow is a symlink manager. It generates symlinks to directories
505 of data and makes them appear to be merged into the same directory. It is
506 typically used for managing software packages installed from source, by
507 letting you install them apart in distinct directories and then create
508 symlinks to the files in a common directory such as /usr/local.")
509 (license license:gpl3+)))
517 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
518 (version-major+minor version) ".x/rpm-"
522 "1nmck2fq9h85fgs3zhh6w1avlw5y16cbz5khd459ry3jfd5w4f8i"))))
523 (build-system gnu-build-system)
525 '(#:configure-flags '("--with-external-db" ;use the system's bdb
528 #:phases (modify-phases %standard-phases
529 (add-before 'configure 'set-nss-library-path
530 (lambda* (#:key inputs #:allow-other-keys)
531 (let ((nss (assoc-ref inputs "nss")))
532 (setenv "LIBRARY_PATH"
533 (string-append (getenv "LIBRARY_PATH") ":"
537 `(("pkg-config" ,pkg-config)))
545 ("libarchive" ,libarchive)
550 (home-page "https://rpm.org/")
551 (synopsis "The RPM Package Manager")
553 "The RPM Package Manager (RPM) is a command-line driven package
554 management system capable of installing, uninstalling, verifying, querying,
555 and updating computer software packages. Each software package consists of an
556 archive of files along with information about the package like its version, a
557 description. There is also a library permitting developers to manage such
558 transactions from C or Python.")
560 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
561 (license license:gpl2+)))
563 (define-public python-anaconda-client
565 (name "python-anaconda-client")
570 (uri (string-append "https://github.com/Anaconda-Platform/"
571 "anaconda-client/archive/" version ".tar.gz"))
572 (file-name (string-append name "-" version ".tar.gz"))
575 "1wv4wi6k5jz7rlwfgvgfdizv77x3cr1wa2aj0k1595g7fbhkjhz2"))))
576 (build-system python-build-system)
578 `(("python-pyyaml" ,python-pyyaml)
579 ("python-requests" ,python-requests)
580 ("python-clyent" ,python-clyent)))
582 `(("python-pytz" ,python-pytz)
583 ("python-dateutil" ,python-dateutil)
584 ("python-mock" ,python-mock)
585 ("python-coverage" ,python-coverage)
586 ("python-pillow" ,python-pillow)))
589 (modify-phases %standard-phases
590 ;; This is needed for some tests.
591 (add-before 'check 'set-up-home
592 (lambda* _ (setenv "HOME" "/tmp") #t))
593 (add-before 'check 'remove-network-tests
595 ;; Remove tests requiring a network connection
596 (let ((network-tests '("tests/test_upload.py"
597 "tests/test_authorizations.py"
598 "tests/test_login.py"
599 "tests/test_whoami.py"
600 "utils/notebook/tests/test_data_uri.py"
601 "utils/notebook/tests/test_base.py"
602 "utils/notebook/tests/test_downloader.py"
603 "inspect_package/tests/test_conda.py")))
604 (with-directory-excursion "binstar_client"
605 (for-each delete-file network-tests)))
607 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
608 (synopsis "Anaconda Cloud command line client library")
610 "Anaconda Cloud command line client library provides an interface to
611 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
613 (license license:bsd-3)))
615 (define-public python2-anaconda-client
616 (package-with-python2 python-anaconda-client))
618 (define-public python-conda
620 (name "python-conda")
625 (uri (string-append "https://github.com/conda/conda/archive/"
627 (file-name (string-append name "-" version ".tar.gz"))
630 "1jq8hyrc5npb5sf4vw6s6by4602yj8f79vzpbwdfgpkn02nfk1dv"))))
631 (build-system python-build-system)
634 (modify-phases %standard-phases
635 (add-before 'build 'create-version-file
637 (with-output-to-file "conda/.version"
638 (lambda () (display ,version)))
640 (add-before 'check 'remove-failing-tests
642 ;; These tests require internet/network access
643 (let ((network-tests '("test_cli.py"
651 "conda_env/test_cli.py"
652 "conda_env/test_create.py"
653 "conda_env/specs/test_notebook.py"
654 "conda_env/utils/test_notebooks.py"
656 "core/test_repodata.py")))
657 (with-directory-excursion "tests"
658 (for-each delete-file network-tests)
660 ;; FIXME: This test creates a file, then deletes it and tests
661 ;; that the file was deleted. For some reason it fails when
662 ;; building with guix, but does not when you run it in the
663 ;; directory left when you build with the --keep-failed
665 (delete-file "gateways/disk/test_delete.py")
669 (setenv "HOME" "/tmp")
670 (invoke "py.test"))))))
672 `(("python-cytoolz" ,python-cytoolz)
673 ("python-ruamel.yaml" ,python-ruamel.yaml)
674 ("python-requests" ,python-requests)
675 ("python-pycosat" ,python-pycosat)
676 ("python-pytest" ,python-pytest)
677 ("python-responses" ,python-responses)
678 ("python-pyyaml" ,python-pyyaml)
679 ("python-anaconda-client" ,python-anaconda-client)))
680 (home-page "https://github.com/conda/conda")
681 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
683 "Conda is a cross-platform, Python-agnostic binary package manager. It
684 is the package manager used by Anaconda installations, but it may be used for
685 other systems as well. Conda makes environments first-class citizens, making
686 it easy to create independent environments even for C libraries. Conda is
687 written entirely in Python.
689 This package provides Conda as a library.")
690 (license license:bsd-3)))
692 (define-public python2-conda
693 (let ((base (package-with-python2
694 (strip-python2-variant python-conda))))
695 (package (inherit base)
697 `(("python2-enum34" ,python2-enum34)
698 ,@(package-native-inputs base))))))
701 (package (inherit python-conda)
704 (substitute-keyword-arguments (package-arguments python-conda)
706 `(modify-phases ,phases
708 (lambda* (#:key outputs #:allow-other-keys)
709 ;; This test fails when run before installation.
710 (delete-file "tests/test_activate.py")
712 ;; Fix broken defaults
713 (substitute* "conda/base/context.py"
714 (("return sys.prefix")
715 (string-append "return \"" (assoc-ref outputs "out") "\""))
716 (("return (prefix_is_writable\\(self.root_prefix\\))" _ match)
717 (string-append "return False if self.root_prefix == self.conda_prefix else "
720 ;; The util/setup-testing.py is used to build conda in
721 ;; application form, rather than the default, library form.
722 ;; With this, we are able to run commands like `conda --help`
723 ;; directly on the command line
724 (invoke "python" "utils/setup-testing.py" "build_py")))
726 (lambda* (#:key inputs outputs #:allow-other-keys)
727 (let* ((out (assoc-ref outputs "out"))
728 (target (string-append out "/lib/python"
730 (assoc-ref inputs "python"))
732 ;; The installer aborts if the target directory is not on
735 (string-append target ":" (getenv "PYTHONPATH")))
737 ;; And it aborts if the directory doesn't exist.
739 (invoke "python" "utils/setup-testing.py" "install"
740 (string-append "--prefix=" out)))))
741 ;; The "activate" and "deactivate" scripts don't need wrapping.
742 ;; They also break when they are renamed.
743 (add-after 'wrap 'undo-wrap
744 (lambda* (#:key outputs #:allow-other-keys)
745 (with-directory-excursion (string-append (assoc-ref outputs "out") "/bin/")
746 (delete-file "deactivate")
747 (rename-file ".deactivate-real" "deactivate")
748 (delete-file "activate")
749 (rename-file ".activate-real" "activate")
752 "Conda is a cross-platform, Python-agnostic binary package manager. It
753 is the package manager used by Anaconda installations, but it may be used for
754 other systems as well. Conda makes environments first-class citizens, making
755 it easy to create independent environments even for C libraries. Conda is
756 written entirely in Python.")))
764 (uri (string-append "https://www.guixwl.org/releases/gwl-"
768 "06pm967mq1wyggx7l0nfapw5s0k5qc5r9lawk2v3db868br779a7"))))
769 (build-system gnu-build-system)
771 `(("autoconf" ,autoconf)
772 ("automake" ,automake)
773 ("pkg-config" ,pkg-config)))
775 `(("guile" ,guile-2.2)))
778 ("guile-commonmark" ,guile-commonmark)))
779 (home-page "https://www.guixwl.org")
780 (synopsis "Workflow management extension for GNU Guix")
781 (description "This project provides two subcommands to GNU Guix and
782 introduces two record types that provide a workflow management extension built
783 on top of GNU Guix.")
784 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
785 ;; the web interface modules in gwl/ are licensed AGPL3+,
786 ;; and the fonts included in this package are licensed OFL1.1.
787 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
789 (define-public guix-jupyter
791 (name "guix-jupyter")
793 (home-page "https://gitlab.inria.fr/guix-hpc/guix-kernel")
796 (uri (git-reference (url home-page)
797 (commit (string-append "v" version))))
800 "01z7jjkc7r7lj6637rcgpz40v8xqqyfp6871h94yvcnwm7zy9h1n"))
801 (file-name (string-append "guix-jupyter-" version "-checkout"))))
802 (build-system gnu-build-system)
804 `(#:modules ((srfi srfi-26)
809 (guix build gnu-build-system))
811 (modify-phases %standard-phases
812 (add-after 'install 'sed-kernel-json
813 (lambda* (#:key inputs outputs #:allow-other-keys)
814 (let* ((out (assoc-ref outputs "out"))
815 (guix (assoc-ref inputs "guix"))
816 (guile (assoc-ref inputs "guile"))
817 (json (assoc-ref inputs "guile-json"))
818 (git (assoc-ref inputs "guile-git"))
819 (bs (assoc-ref inputs "guile-bytestructures"))
820 (s-zmq (assoc-ref inputs "guile-simple-zmq"))
821 (gcrypt (assoc-ref inputs "guile-gcrypt"))
822 (deps (list out s-zmq guix json git bs gcrypt))
825 (open-pipe* OPEN_READ
826 (string-append guile "/bin/guile")
827 "-c" "(display (effective-version))")))
828 (path (map (cut string-append "-L\", \"" <>
832 (gopath (map (cut string-append "-C\", \"" <>
833 "/lib/guile/" effective
836 (kernel-dir (string-append out "/share/jupyter/kernels/guix/")))
837 (substitute* (string-append kernel-dir "kernel.json")
840 (list (string-join path "\",\n\t\t\"")
841 (string-join gopath "\",\n\t\t\"")
844 (("guix-jupyter-kernel.scm")
845 (string-append out "/share/guile/site/2.2/"
846 "guix-jupyter-kernel.scm")))
849 `(("autoconf" ,autoconf)
850 ("automake" ,automake)
851 ("pkg-config" ,pkg-config)
855 ("python-ipython" ,python-ipython)
856 ("python-ipykernel" ,python-ipykernel)))
859 ("guile" ,guile-2.2)))
861 `(("guile-json" ,guile-json-3)
862 ("guile-simple-zmq" ,guile-simple-zmq)
863 ("guile-gcrypt" ,guile-gcrypt)))
864 (synopsis "Guix kernel for Jupyter")
866 "Guix-Jupyter is a Jupyter kernel. It allows you to annotate notebooks
867 with information about their software dependencies, such that code is executed
868 in the right software environment. Guix-Jupyter spawns the actual kernels
869 such as @code{python-ipykernel} on behalf of the notebook user and runs them
870 in an isolated environment, in separate namespaces.")
871 (license license:gpl3+)))
879 (uri (string-append "mirror://gnome/sources/gcab/"
880 version "/gcab-" version ".tar.xz"))
883 "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"))))
884 (build-system meson-build-system)
886 `(("glib:bin" ,glib "bin") ; for glib-mkenums
887 ("intltool" ,intltool)
888 ("pkg-config" ,pkg-config)
895 ;; XXX This ‘documentation’ is for developers, and fails informatively:
896 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
898 "-Dintrospection=false")))
899 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
900 (synopsis "Microsoft Cabinet file manipulation library")
902 "The libgcab library provides GObject functions to read, write, and modify
903 Microsoft cabinet (.@dfn{CAB}) files.")
904 (license (list license:gpl2+ ; tests/testsuite.at
905 license:lgpl2.1+)))) ; the rest
907 (define-public msitools
913 (uri (string-append "mirror://gnome/sources/msitools/"
914 version "/msitools-" version ".tar.xz"))
917 "1skq17qr2ic4qr3779j49byfm8rncwbsq9rj1a33ncn2m7isdwdv"))))
918 (build-system gnu-build-system)
921 ("pkg-config" ,pkg-config)))
927 ("uuid" ,util-linux)))
928 (home-page "https://wiki.gnome.org/msitools")
929 (synopsis "Windows Installer file manipulation tool")
931 "msitools is a collection of command-line tools to inspect, extract, build,
932 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
933 for packaging and deployment of cross-compiled Windows applications.")
934 (license license:lgpl2.1+)))
936 (define-public libostree
943 "https://github.com/ostreedev/ostree/releases/download/v"
944 (version-major+minor version) "/libostree-" version ".tar.xz"))
947 "1r07yqbc9iiq0lzv1pryppd35fv695ym8r040msbfc93pmiy77y0"))))
948 (build-system gnu-build-system)
951 (modify-phases %standard-phases
952 (add-before 'check 'pre-check
954 ;; Don't try to use the non-existing '/var/tmp' as test
956 (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
959 ;; tap-driver.sh: missing test plan
960 ;; tap-driver.sh: internal error getting exit status
961 ;; tap-driver.sh: fatal: I/O or internal error
964 `(("attr" ,attr) ; for tests
966 ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
967 ("gobject-introspection" ,gobject-introspection)
968 ("pkg-config" ,pkg-config)
969 ("xsltproc" ,libxslt)))
972 ("docbook-xml" ,docbook-xml-4.2)
973 ("docbook-xsl" ,docbook-xsl)
974 ("e2fsprogs" ,e2fsprogs)
978 ("libarchive" ,libarchive)
980 ("util-linux" ,util-linux)))
981 (home-page "https://ostree.readthedocs.io/en/latest/")
982 (synopsis "Operating system and container binary deployment and upgrades")
984 "@code{libostree} is both a shared library and suite of command line
985 tools that combines a \"git-like\" model for committing and downloading
986 bootable file system trees, along with a layer for deploying them and managing
987 the boot loader configuration.")
988 (license license:lgpl2.0+)))
990 (define-public flatpak
997 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
998 version "/flatpak-" version ".tar.xz"))
1001 "11bfxmv8pxlb5x0lb2rsl45615fzfvq5r6wldf0l6ab2ngryd7i7"))))
1003 ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
1004 ;; find the TLS backend in glib-networking.
1005 (build-system glib-or-gtk-build-system)
1008 '(#:tests? #f ;; Tests fail due to trying to create files where it can't.
1009 #:configure-flags (list
1010 "--enable-documentation=no" ;; FIXME
1011 "--enable-system-helper=no"
1012 "--localstatedir=/var"
1013 (string-append "--with-system-bubblewrap="
1014 (assoc-ref %build-inputs "bubblewrap")
1016 (native-inputs `(("bison" ,bison)
1017 ("gettext" ,gnu-gettext)
1018 ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
1019 ("gobject-introspection" ,gobject-introspection)
1021 ("pkg-config" ,pkg-config)))
1022 (propagated-inputs `(("glib-networking" ,glib-networking)
1024 ("gsettings-desktop-schemas"
1025 ,gsettings-desktop-schemas)))
1026 (inputs `(("appstream-glib" ,appstream-glib)
1027 ("bubblewrap" ,bubblewrap)
1030 ("gdk-pixbuf" ,gdk-pixbuf)
1032 ("json-glib" ,json-glib)
1033 ("libarchive" ,libarchive)
1034 ("libostree" ,libostree)
1035 ("libseccomp" ,libseccomp)
1036 ("libsoup" ,libsoup)
1038 ("libxml2" ,libxml2)
1039 ("util-linux" ,util-linux)))
1040 (home-page "https://flatpak.org")
1041 (synopsis "System for building, distributing, and running sandboxed desktop
1043 (description "Flatpak is a system for building, distributing, and running
1044 sandboxed desktop applications on GNU/Linux.")
1045 (license license:lgpl2.1+)))