1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013-2022 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015, 2017, 2020, 2021, 2022 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–2022 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, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
14 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
15 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
16 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
17 ;;; Copyright © 2020 Jesse Gibbons <jgibbons2357+guix@gmail.com>
18 ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
19 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
20 ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
21 ;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
22 ;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
23 ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
25 ;;; This file is part of GNU Guix.
27 ;;; GNU Guix is free software; you can redistribute it and/or modify it
28 ;;; under the terms of the GNU General Public License as published by
29 ;;; the Free Software Foundation; either version 3 of the License, or (at
30 ;;; your option) any later version.
32 ;;; GNU Guix is distributed in the hope that it will be useful, but
33 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 ;;; GNU General Public License for more details.
37 ;;; You should have received a copy of the GNU General Public License
38 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
40 (define-module (gnu packages package-management)
41 #:use-module (gnu artwork)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages acl)
44 #:use-module (gnu packages attr)
45 #:use-module (gnu packages avahi)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages backup)
48 #:use-module (gnu packages base)
49 #:use-module (gnu packages bash)
50 #:use-module (gnu packages bdw-gc)
51 #:use-module (gnu packages bison)
52 #:use-module (gnu packages boost)
53 #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
54 #:use-module (gnu packages build-tools)
55 #:use-module (gnu packages check)
56 #:use-module (gnu packages compression)
57 #:use-module (gnu packages cmake)
58 #:use-module (gnu packages cpio)
59 #:use-module (gnu packages crypto)
60 #:use-module (gnu packages curl)
61 #:use-module (gnu packages databases)
62 #:use-module (gnu packages dejagnu)
63 #:use-module (gnu packages dbm)
64 #:use-module (gnu packages docbook)
65 #:use-module (gnu packages file)
66 #:use-module (gnu packages freedesktop)
67 #:use-module (gnu packages flex)
68 #:use-module (gnu packages gcc)
69 #:use-module (gnu packages gettext)
70 #:use-module (gnu packages glib)
71 #:use-module (gnu packages gnome)
72 #:use-module (gnu packages gnupg)
73 #:use-module (gnu packages graphviz)
74 #:use-module (gnu packages gtk)
75 #:use-module (gnu packages guile)
76 #:use-module (gnu packages guile-xyz)
77 #:use-module (gnu packages hardware)
78 #:use-module (gnu packages hurd)
79 #:use-module (gnu packages imagemagick)
80 #:use-module (gnu packages less)
81 #:use-module (gnu packages libedit)
82 #:use-module (gnu packages linux)
83 #:use-module (gnu packages lisp)
84 #:use-module (gnu packages lua)
85 #:use-module (gnu packages man)
86 #:use-module (gnu packages markup)
87 #:use-module (gnu packages nettle)
88 #:use-module (gnu packages networking)
89 #:use-module (gnu packages ninja)
90 #:use-module (gnu packages nss)
91 #:use-module (gnu packages patchutils)
92 #:use-module (gnu packages perl)
93 #:use-module (gnu packages perl-check)
94 #:use-module (gnu packages pkg-config)
95 #:use-module (gnu packages popt)
96 #:use-module (gnu packages python)
97 #:use-module (gnu packages python-build)
98 #:use-module (gnu packages python-check)
99 #:use-module (gnu packages python-web)
100 #:use-module (gnu packages python-xyz)
101 #:use-module (gnu packages serialization)
102 #:use-module (gnu packages sqlite)
103 #:use-module (gnu packages ssh)
104 #:use-module (gnu packages tcl)
105 #:use-module (gnu packages texinfo)
106 #:use-module (gnu packages time)
107 #:use-module (gnu packages tls)
108 #:use-module (gnu packages vim)
109 #:use-module (gnu packages virtualization)
110 #:use-module (gnu packages web)
111 #:use-module (gnu packages xml)
112 #:use-module (gnu packages xorg)
113 #:use-module (gnu packages version-control)
114 #:autoload (guix build-system channel) (channel-build-system)
115 #:use-module (guix build-system glib-or-gtk)
116 #:use-module (guix build-system gnu)
117 #:use-module (guix build-system guile)
118 #:use-module (guix build-system meson)
119 #:use-module (guix build-system python)
120 #:use-module (guix build-system trivial)
121 #:use-module (guix download)
122 #:use-module (guix gexp)
123 #:use-module (guix git-download)
124 #:autoload (guix describe) (current-channels)
125 #:autoload (guix channels) (channel?
127 repository->guix-channel)
128 #:use-module ((guix licenses) #:prefix license:)
129 #:use-module (guix packages)
130 #:use-module (guix utils)
131 #:use-module ((guix search-paths) #:select ($SSL_CERT_DIR $SSL_CERT_FILE))
132 #:use-module (ice-9 match)
133 #:use-module (srfi srfi-1))
135 (define (boot-guile-uri arch)
136 "Return the URI for the bootstrap Guile tarball for ARCH."
137 (cond ((string=? "armhf" arch)
138 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
140 "/20150101/guile-2.0.11.tar.xz"))
141 ((string=? "aarch64" arch)
142 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
143 arch "-linux/20170217/guile-2.0.14.tar.xz"))
145 (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
147 "/20131110/guile-2.0.9.tar.xz"))))
149 ;; NOTE: The commit IDs used here form a linked list threaded through the git
150 ;; history. In a phenomenon known as boot-stripping, not only the head of this
151 ;; list is used, but also a few older versions, when a guix from this package is
152 ;; used to build something also depending on guix.
154 ;; Therefore, if, by accident, you set this package to a non-existent commit ID,
155 ;; it is insufficient to simply correct it with the latest commit.
156 ;; Instead, please push one commit that rolls back Guix to before the mistake,
157 ;; and then another that points to the first one. That way, the faulty commit
158 ;; won't appear on the linked list.
160 ;; If you are updating this package because it fails to build, you need to
161 ;; actually update it *twice*, as the installer is pointing to the N-1 guix
164 ;; Latest version of Guix, which may or may not correspond to a release.
165 ;; Note: the 'update-guix-package.scm' script expects this definition to
166 ;; start precisely like this.
167 (let ((version "1.3.0")
168 (commit "682639c107908426fe6bf0a1b8404b98b7820290")
173 (version (if (zero? revision)
175 (string-append version "-"
176 (number->string revision)
177 "." (string-take commit 7))))
181 (url "https://git.savannah.gnu.org/git/guix.git")
185 "1ap8hfq46ncp7azhdvc9s64a9q9y74xfqpgfwlcgz6sw82a09yh0"))
186 (file-name (string-append "guix-" version "-checkout"))))
187 (build-system gnu-build-system)
189 `(#:configure-flags (list
191 ;; Provide channel metadata for 'guix describe'.
192 ;; Don't pass '--with-channel-url' and
193 ;; '--with-channel-introduction' and instead use
195 ,(string-append "--with-channel-commit=" commit)
197 "--localstatedir=/var"
199 (string-append "--with-bash-completion-dir="
200 (assoc-ref %outputs "out")
201 "/etc/bash_completion.d")
203 ;; Set 'DOT_USER_PROGRAM' to the empty string so
204 ;; we don't keep a reference to Graphviz, whose
205 ;; closure is pretty big (too big for the Guix
206 ;; system installation image.)
207 "ac_cv_path_DOT_USER_PROGRAM=dot"
209 ;; To avoid problems with the length of shebangs,
210 ;; choose a fixed-width and short directory name
212 "ac_cv_guix_test_root=/tmp/guix-tests"
213 ,@(if (hurd-target?) '("--with-courage") '()))
214 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
216 #:modules ((guix build gnu-build-system)
222 #:phases (modify-phases %standard-phases
225 ;; Make sure 'msgmerge' can modify the PO files.
226 (for-each (lambda (po)
228 (find-files "." "\\.po$"))
230 (patch-shebang "build-aux/git-version-gen")
232 (call-with-output-file ".tarball-version"
234 (display ,version port)))
236 ;; Install SysV init files to $(prefix)/etc rather
238 (substitute* "nix/local.mk"
239 (("^sysvinitservicedir = .*$")
240 (string-append "sysvinitservicedir = \
241 $(prefix)/etc/init.d\n")))
243 ;; Install OpenRC init files to $(prefix)/etc rather
245 (substitute* "nix/local.mk"
246 (("^openrcservicedir = .*$")
247 (string-append "openrcservicedir = \
248 $(prefix)/etc/openrc\n")))
250 (invoke "sh" "bootstrap")))
251 ,@(if (target-riscv64?)
252 `((add-after 'unpack 'use-correct-guile-version-for-tests
254 (substitute* "tests/gexp.scm"
255 (("2\\.0") "3.0")))))
257 (add-before 'build 'use-host-compressors
258 (lambda* (#:key inputs target #:allow-other-keys)
260 ;; Use host compressors.
261 (let ((bzip2 (assoc-ref inputs "bzip2"))
262 (gzip (assoc-ref inputs "gzip"))
263 (xz (assoc-ref inputs "xz")))
264 (substitute* "guix/config.scm"
265 (("\"[^\"]*/bin/bzip2")
266 (string-append "\"" bzip2 "/bin/bzip2"))
267 (("\"[^\"]*/bin/gzip") gzip
268 (string-append "\"" gzip "/bin/gzip"))
269 (("\"[^\"]*/bin//xz")
270 (string-append "\"" xz "/bin/xz")))))
272 (add-before 'check 'copy-bootstrap-guile
273 (lambda* (#:key system target inputs #:allow-other-keys)
274 ;; Copy the bootstrap guile tarball in the store
275 ;; used by the test suite.
276 (define (intern file recursive?)
277 ;; Note: don't use 'guix download' here because we
278 ;; need to set the 'recursive?' argument.
280 (strip-store-file-name file))
286 (let* ((item (add-to-store store ,base
289 (root (string-append "/tmp/gc-root-"
291 ;; Register a root so that the GC tests
292 ;; don't delete those.
294 (add-indirect-root store root)))))
296 (invoke "./test-env" "guile" "-c"
297 (object->string code)))
300 (intern (assoc-ref inputs "boot-guile") #f)
302 ;; On x86_64 some tests need the i686 Guile.
303 (when (and (not target)
304 (string=? system "x86_64-linux"))
305 (intern (assoc-ref inputs "boot-guile/i686") #f))
307 ;; Copy the bootstrap executables.
308 (for-each (lambda (input)
309 (intern (assoc-ref inputs input) #t))
310 '("bootstrap/bash" "bootstrap/mkdir"
311 "bootstrap/tar" "bootstrap/xz")))
313 (add-after 'unpack 'disable-failing-tests
314 ;; XXX FIXME: These tests fail within the build container.
316 (substitute* "tests/syscalls.scm"
317 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
318 (string-append "(test-skip 1)\n" all)))
319 (substitute* "tests/containers.scm"
320 (("^\\(test-(assert|equal)" all)
321 (string-append "(test-skip 1)\n" all)))
322 (when (file-exists? "tests/guix-environment-container.sh")
323 (substitute* "tests/guix-environment-container.sh"
324 (("guix environment --version")
327 (add-before 'check 'set-SHELL
329 ;; 'guix environment' tests rely on 'SHELL' having a
330 ;; correct value, so set it.
331 (setenv "SHELL" (which "sh"))
333 (add-after 'install 'wrap-program
334 (lambda* (#:key inputs native-inputs outputs target
336 ;; Make sure the 'guix' command finds GnuTLS,
337 ;; Guile-JSON, and Guile-Git automatically.
338 (let* ((out (assoc-ref outputs "out"))
339 (guile (assoc-ref (or native-inputs inputs)
341 (avahi (assoc-ref inputs "guile-avahi"))
342 (gcrypt (assoc-ref inputs "guile-gcrypt"))
343 (guile-lib (assoc-ref inputs "guile-lib"))
344 (json (assoc-ref inputs "guile-json"))
345 (sqlite (assoc-ref inputs "guile-sqlite3"))
346 (zlib (assoc-ref inputs "guile-zlib"))
347 (lzlib (assoc-ref inputs "guile-lzlib"))
348 (zstd (assoc-ref inputs "guile-zstd"))
349 (git (assoc-ref inputs "guile-git"))
350 (bs (assoc-ref inputs
351 "guile-bytestructures"))
352 (ssh (assoc-ref inputs "guile-ssh"))
353 (gnutls (assoc-ref inputs "guile-gnutls"))
354 (disarchive (assoc-ref inputs "disarchive"))
355 (lzma (assoc-ref inputs "guile-lzma"))
356 (locales (assoc-ref inputs "glibc-utf8-locales"))
357 (deps (list gcrypt json sqlite gnutls git
358 bs ssh zlib lzlib zstd guile-lib
360 (deps* (if avahi (cons avahi deps) deps))
363 (open-pipe* OPEN_READ
364 (string-append guile "/bin/guile")
365 "-c" "(display (effective-version))")))
366 (path (map (cut string-append <>
370 (gopath (map (cut string-append <>
371 "/lib/guile/" effective
374 (locpath (string-append locales "/lib/locale")))
376 ;; Modify 'guix' directly instead of using
377 ;; 'wrap-program'. This avoids the indirection
378 ;; through Bash, which in turn avoids getting Bash's
379 ;; own locale warnings.
380 (substitute* (string-append out "/bin/guix")
385 `(set! %load-path (append ',path %load-path)))
388 `(set! %load-compiled-path
389 (append ',gopath %load-compiled-path)))
392 `(let ((path (getenv "GUIX_LOCPATH")))
393 (setenv "GUIX_LOCPATH"
395 (string-append path ":" ,locpath)
399 ;; The 'guix' executable has 'OUT/libexec/guix/guile' as
400 ;; its shebang; that should remain unchanged, thus remove
401 ;; the 'patch-shebangs' phase, which would otherwise
402 ;; change it to 'GUILE/bin/guile'.
403 (delete 'patch-shebangs))))
404 (native-inputs `(("pkg-config" ,pkg-config)
406 ;; Guile libraries are needed here for
407 ;; cross-compilation.
408 ("guile" ,guile-3.0-latest) ;for faster builds
409 ("guile-gnutls" ,guile-gnutls)
410 ,@(if (%current-target-system)
412 `(("guile-avahi" ,guile-avahi)))
413 ("guile-gcrypt" ,guile-gcrypt)
414 ("guile-json" ,guile-json-4)
415 ("guile-lib" ,guile-lib)
416 ("guile-sqlite3" ,guile-sqlite3)
417 ("guile-zlib" ,guile-zlib)
418 ("guile-lzlib" ,guile-lzlib)
419 ("guile-zstd" ,guile-zstd)
420 ("guile-ssh" ,guile-ssh)
421 ("guile-git" ,guile-git)
423 ;; XXX: Keep the development inputs here even though
424 ;; they're unnecessary, just so that 'guix environment
425 ;; guix' always contains them.
426 ("autoconf" ,autoconf)
427 ("automake" ,automake)
428 ("gettext" ,gettext-minimal)
430 ("graphviz" ,graphviz)
431 ("help2man" ,help2man)
437 ("libgcrypt" ,libgcrypt)
440 ("guile" ,guile-3.0-latest)
442 ;; Some of the tests use "unshare" when it is available.
443 ("util-linux" ,util-linux)
445 ;; Many tests rely on the 'guile-bootstrap' package, which is why we
447 ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
448 ,@(if (and (not (%current-target-system))
449 (string=? (%current-system) "x86_64-linux"))
450 `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
452 ,@(if (%current-target-system)
456 ;; Tests also rely on these bootstrap executables.
457 ("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system)))
458 ("bootstrap/mkdir" ,(bootstrap-executable "mkdir" (%current-system)))
459 ("bootstrap/tar" ,(bootstrap-executable "tar" (%current-system)))
460 ("bootstrap/xz" ,(bootstrap-executable "xz" (%current-system)))
462 ("disarchive" ,disarchive) ;for 'guix perform-download'
463 ("guile-lzma" ,guile-lzma) ;for Disarchive
465 ("glibc-utf8-locales" ,glibc-utf8-locales)))
467 `(("guile-gnutls" ,guile-gnutls)
468 ;; Avahi requires "glib" which doesn't cross-compile yet.
469 ,@(if (%current-target-system)
471 `(("guile-avahi" ,guile-avahi)))
472 ("guile-gcrypt" ,guile-gcrypt)
473 ("guile-json" ,guile-json-4)
474 ("guile-lib" ,guile-lib)
475 ("guile-sqlite3" ,guile-sqlite3)
476 ("guile-ssh" ,guile-ssh)
477 ("guile-git" ,guile-git)
478 ("guile-zlib" ,guile-zlib)
479 ("guile-lzlib" ,guile-lzlib)
480 ("guile-zstd" ,guile-zstd)))
482 (list (search-path-specification
483 (variable "GUIX_EXTENSIONS_PATH")
484 (files '("share/guix/extensions")))
485 ;; (guix git) and (guix build download) honor this variable whose
486 ;; name comes from OpenSSL.
488 (home-page "https://www.gnu.org/software/guix/")
489 (synopsis "Functional package manager for installed software packages and versions")
491 "GNU Guix is a functional package manager for the GNU system, and is
492 also a distribution thereof. It includes a virtual machine image. Besides
493 the usual package management features, it also supports transactional
494 upgrades and roll-backs, per-user profiles, and much more. It is based on
495 the Nix package manager.")
496 (license license:gpl3+)
497 (properties '((ftp-server . "alpha.gnu.org"))))))
499 (define* (channel-source->package source #:key commit)
500 "Return a package for the given channel SOURCE, a lowerable object."
503 (version (string-append (package-version guix) "."
504 (if commit (string-take commit 7) "")))
505 (build-system channel-build-system)
506 (arguments `(#:source ,source
510 (propagated-inputs '())))
512 (export channel-source->package)
514 (define-public guix-for-cuirass
515 ;; Known-good revision before commit
516 ;; bd86bbd300474204878e927f6cd3f0defa1662a5, which introduced
517 ;; 'primitive-fork' in 'open-inferior'.
518 (let ((version "1.3.0")
519 (commit "a27e47f9d1e22dc32bb250cfeef88cfacb930e23")
523 (version (string-append version "-"
524 (number->string revision)
525 "." (string-take commit 7)))
529 (url "https://git.savannah.gnu.org/git/guix.git")
533 "12jmvagbw05hmmlrb82i0qazhlv7mcfnl4dmknwx3a9hd760g9y1"))
534 (file-name (string-append "guix-" version "-checkout"))))
535 (properties `((hidden? . #t)
536 ,@(package-properties guix))))))
538 (define-public guix-daemon
539 ;; This package is for internal consumption: it allows us to quickly build
540 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
544 (properties `((hidden? . #t)))
547 ;; Use a minimum set of dependencies.
549 (modify-inputs (package-native-inputs guix)
550 (delete "po4a" "graphviz" "help2man")))
552 (modify-inputs (package-inputs guix)
553 (delete "boot-guile" "boot-guile/i686" "util-linux")
554 (prepend guile-gnutls guile-git guile-json-3 guile-gcrypt)))
556 (propagated-inputs '())
559 (substitute-keyword-arguments (package-arguments guix)
560 ((#:configure-flags flags '())
561 ;; Pretend we have those libraries; we don't actually need them.
563 '("guix_cv_have_recent_guile_sqlite3=yes"
564 "guix_cv_have_recent_guile_ssh=yes")))
567 ((#:phases phases '%standard-phases)
568 `(modify-phases ,phases
569 (add-after 'unpack 'change-default-guix
571 ;; We need to tell 'guix-daemon' which 'guix' command to use.
572 ;; Here we use a questionable hack where we hard-code root's
573 ;; current guix, which could be wrong (XXX). Note that scripts
574 ;; like 'guix perform-download' do not run as root so we assume
575 ;; that they have access to /var/guix/profiles/per-user/root.
576 (substitute* "nix/libstore/globals.cc"
577 (("guixProgram = (.*)nixBinDir + \"/guix\"" _ before)
578 (string-append "guixProgram = " before
579 "/var/guix/profiles/per-user/root\
580 /current-guix/bin/guix")))
584 (invoke "make" "nix/libstore/schema.sql.hh")
585 (invoke "make" "-j" (number->string
586 (parallel-job-count))
588 (delete 'copy-bootstrap-guile)
590 (lambda* (#:key outputs #:allow-other-keys)
591 (invoke "make" "install-binPROGRAMS")))
592 (delete 'wrap-program)))))))
594 (define-public guix-minimal
595 ;; A version of Guix which is built with the minimal set of dependencies, as
596 ;; outlined in the README "Requirements" section. Intended as a CI job, so
601 (name "guix-minimal")
603 (modify-inputs (package-native-inputs guix)
604 (delete "guile-ssh")))
606 (modify-inputs (package-propagated-inputs guix)
607 (delete "guile-ssh"))))))
609 (define-public current-guix-package
610 ;; This parameter allows callers to override the package that 'current-guix'
611 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
612 ;; for instance because it's not running from a source code checkout.
614 ;; The default value is obtained by creating a package from the 'guix'
615 ;; channel returned by 'current-channels' or, if that's the empty list, that
616 ;; returned by 'repository->guix-channel' for the current directory (which
617 ;; assumes that we're running from a Git checkout). Delay computation so
618 ;; that the relevant modules can be loaded lazily.
620 (delay (match (or (find guix-channel? (current-channels))
621 (repository->guix-channel
622 (current-source-directory)))
627 (build-system channel-build-system)
630 (propagated-inputs '())))
633 (define-public current-guix
635 "Return a package representing the currently-used Guix. It can be
636 overridden by setting the 'current-guix-package' parameter."
637 (match (current-guix-package)
638 ((? promise? package) (force package))
641 (define-public guix-icons
646 (source %artwork-repository)
647 (build-system trivial-build-system)
653 `(#:modules ((guix build utils)
656 ,(with-extensions (list guile-rsvg guile-cairo)
658 (use-modules (guix build utils)
660 (let* ((logo (string-append #$source "/logo/Guix.svg"))
662 (string-append #$source
663 "/logo/Guix-horizontal-white.svg"))
666 (sizes '(16 24 32 48 64 72 96 128 256 512 1024))
668 (string-append #$output "/share/icons/" theme))
670 (string-append icons "/scalable/" category)))
671 (setenv "XDG_CACHE_HOME" (getcwd))
673 ;; Create the scalable icon files.
674 (mkdir-p scalable-dir)
676 (string-append scalable-dir "/guix-icon.svg"))
677 (copy-file logo-white
678 (string-append scalable-dir
679 "/guix-white-icon.svg"))
681 ;; Create the fixed dimensions icon files.
685 (format #f "~ax~a" size size))
687 (string-append icons "/" dimension "/" category
689 (mkdir-p (dirname file))
694 (synopsis "GNU Guix icons")
695 (description "This package contains GNU Guix icons organized according to
696 the Icon Theme Specification. They can be used by applications querying the
697 GTK icon cache for instance.")))
699 (define-public guix-modules
701 (name "guix-modules")
703 (home-page "https://gitlab.inria.fr/guix-hpc/guix-modules")
706 (uri (git-reference (url home-page)
707 (commit (string-append "v" version))))
708 (file-name (string-append "guix-modules-" version "-checkout"))
711 "1ckvrrmkgzz93i35sj1372wxs7ln4gzszpri1pcdf473z0p7nh7w"))))
712 (build-system guile-build-system)
714 '(#:phases (modify-phases %standard-phases
715 (add-after 'install 'move-to-extension-directory
716 (lambda* (#:key outputs #:allow-other-keys)
717 (let* ((out (assoc-ref outputs "out"))
718 (target (string-append
720 "/share/guix/extensions/module.scm")))
721 (mkdir-p (dirname target))
722 (rename-file (car (find-files out "module.scm"))
724 (native-inputs (list (lookup-package-input guix "guile") guix))
725 (synopsis "Generate environment modules from Guix packages")
727 "Guix-Modules is an extension of Guix that provides a new @command{guix
728 module} command. The @command{guix module create} sub-command creates
729 @dfn{environment modules}, allowing you to manipulate software environments
730 with the @command{module} command commonly found on @acronym{HPC,
731 high-performance computing} clusters.")
732 (license license:gpl3+)))
747 (url "http://github.com/NixOS/nix")
749 (file-name (git-file-name name version))
751 (base32 "1m8rmv8i6lg83pmalvjlq1fn8mcghn3ngjv3kw1kqsa45ymj5sqq"))
753 (search-patches "nix-dont-build-html-doc.diff"))))
754 (build-system gnu-build-system)
757 #:configure-flags #~(list "--sysconfdir=/etc" "--enable-gc")
759 #~(modify-phases %standard-phases
761 ;; Don't try & fail to create subdirectories in /etc, but keep them
762 ;; in the output as examples.
763 (lambda* (#:key (make-flags '()) outputs #:allow-other-keys)
764 (let ((etc (string-append #$output "/etc")))
765 (apply invoke "make" "install"
766 (string-append "sysconfdir=" etc)
767 (string-append "profiledir=" etc "/profile.d")
794 (if (or (target-x86-64?)
798 (home-page "https://nixos.org/nix/")
799 (synopsis "The Nix package manager")
801 "Nix is a purely functional package manager. This means that it treats
802 packages like values in purely functional programming languages such as
803 Haskell—they are built by functions that don't have side-effects, and they
804 never change after they have been built. Nix stores packages in the Nix
805 store, usually the directory /nix/store, where each package has its own unique
807 (license license:lgpl2.1+)))
815 (uri (string-append "mirror://gnu/stow/stow-"
819 "0jrxy12ywn7smdzdnvwzjw77l6knx6jkj2rckgykg1dpf6bdkm89"))))
820 (build-system gnu-build-system)
824 (list perl-test-simple perl-test-output perl-capture-tiny
826 (home-page "https://www.gnu.org/software/stow/")
827 (synopsis "Managing installed software packages")
829 "GNU Stow is a symlink manager. It generates symlinks to directories
830 of data and makes them appear to be merged into the same directory. It is
831 typically used for managing software packages installed from source, by
832 letting you install them apart in distinct directories and then create
833 symlinks to the files in a common directory such as /usr/local.")
834 (license license:gpl3+)))
842 (uri (string-append "mirror://sourceforge/xstow/xstow-"
846 "1vy6lcswpkixh7h5mvsmq2wbcih6lpsmcva3m7v6f5npllciy13g"))))
847 (build-system gnu-build-system)
848 (synopsis "Replacement of GNU Stow written in C++")
850 "XStow is a replacement of GNU Stow written in C++. It supports all
851 features of Stow with some extensions.")
852 (home-page "http://xstow.sourceforge.net/")
853 (license license:gpl2)))
861 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
862 (version-major+minor version) ".x/rpm-"
866 "0pbfj94ha59lbnd8dk0aqyxjv37xixfdcazq3y2mhwkf8s9vf48c"))))
867 (build-system gnu-build-system)
869 '(#:configure-flags '("--with-external-db" ;use the system's bdb
871 #:phases (modify-phases %standard-phases
872 (add-after 'unpack 'fix-lua-check
874 (substitute* "configure"
877 (add-before 'configure 'set-nss-library-path
878 (lambda* (#:key inputs #:allow-other-keys)
879 (let ((nss (assoc-ref inputs "nss")))
880 (setenv "LIBRARY_PATH"
881 (string-append (getenv "LIBRARY_PATH") ":"
882 nss "/lib/nss"))))))))
900 ;; popt is listed in the 'Requires' of rpm.pc.
902 (home-page "https://rpm.org/")
903 (synopsis "The RPM Package Manager")
905 "The RPM Package Manager (RPM) is a command-line driven package
906 management system capable of installing, uninstalling, verifying, querying,
907 and updating computer software packages. Each software package consists of an
908 archive of files along with information about the package like its version, a
909 description. There is also a library permitting developers to manage such
910 transactions from C or Python.")
912 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
913 (license license:gpl2+)))
915 (define-public python-anaconda-client
917 (name "python-anaconda-client")
923 (url "https://github.com/Anaconda-Platform/anaconda-client")
925 (file-name (git-file-name name version))
928 "1vyk0g0gci4z9psisb8h50zi3j1nwfdg1jw3j76cxv0brln0v3fw"))))
929 (build-system python-build-system)
931 (list python-clyent python-nbformat python-pyyaml python-requests))
933 (list python-coverage
941 (modify-phases %standard-phases
942 ;; This is needed for some tests.
943 (add-before 'check 'set-up-home
944 (lambda* _ (setenv "HOME" "/tmp") #t))
945 (add-before 'check 'remove-network-tests
947 ;; Remove tests requiring a network connection
948 (let ((network-tests '("tests/test_upload.py"
949 "tests/test_authorizations.py"
950 "tests/test_login.py"
951 "tests/test_whoami.py"
952 "utils/notebook/tests/test_data_uri.py"
953 "utils/notebook/tests/test_base.py"
954 "utils/notebook/tests/test_downloader.py"
955 "inspect_package/tests/test_conda.py")))
956 (with-directory-excursion "binstar_client"
957 (for-each delete-file network-tests)))
959 (home-page "https://github.com/Anaconda-Platform/anaconda-client")
960 (synopsis "Anaconda Cloud command line client library")
962 "Anaconda Cloud command line client library provides an interface to
963 Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
965 (license license:bsd-3)))
967 (define-public python-conda-package-handling
969 (name "python-conda-package-handling")
975 (url "https://github.com/conda/conda-package-handling/")
977 (file-name (git-file-name name version))
980 "1dq6f5ks3cinb355x712bls9bvv6bli6x3c43sdkqvawdw8xgv9j"))))
981 (build-system python-build-system)
984 (modify-phases %standard-phases
985 (add-after 'unpack 'use-unmodified-libarchive
987 (substitute* "setup.py"
988 (("archive_and_deps") "archive"))))
990 (lambda* (#:key inputs outputs #:allow-other-keys)
991 (add-installed-pythonpath inputs outputs)
992 (invoke "pytest" "-vv" "tests"))))))
994 (list python-six python-tqdm))
998 (list python-cython python-pytest python-pytest-cov
999 python-pytest-mock python-mock))
1000 (home-page "https://conda.io")
1001 (synopsis "Create and extract conda packages of various formats")
1003 "This library is an abstraction of Conda package handling and a tool for
1004 extracting, creating, and converting between formats.")
1005 (license license:bsd-3)))
1007 (define-public conda
1015 (url "https://github.com/conda/conda")
1017 (file-name (git-file-name name version))
1020 "1w4yy62bsvkybjvcm5fspck4ns5j16nplzpbx6bxv7zhx69pcp4n"))))
1021 (build-system python-build-system)
1024 (modify-phases %standard-phases
1025 (add-after 'unpack 'fix-permissions
1027 ;; This file is no longer writable after downloading with
1030 "tests/conda_env/support/saved-env/environment.yml")))
1031 (add-after 'unpack 'fix-ruamel-yaml-dependency
1033 (substitute* "setup.py"
1034 (("ruamel_yaml_conda") "ruamel.yaml"))))
1035 (add-after 'unpack 'correct-python-executable-name
1036 (lambda* (#:key inputs #:allow-other-keys)
1037 (let ((python (assoc-ref inputs "python-wrapper")))
1039 (substitute* "conda/common/path.py"
1040 (("python_version or ''")
1041 "python_version or '3'"))
1042 (substitute* "conda/core/initialize.py"
1043 (("python_exe = join")
1044 (format #f "python_exe = \"~a/bin/python\" #"
1047 (add-after 'unpack 'do-not-use-python-root-as-prefix
1048 (lambda* (#:key inputs outputs #:allow-other-keys)
1049 (let ((out (assoc-ref outputs "out"))
1050 (python (assoc-ref inputs "python-wrapper")))
1051 (substitute* "tests/core/test_initialize.py"
1052 (("\"\"\"\\) % conda_prefix")
1053 (format #f "\"\"\") % \"~a\"" python))
1054 (("CONDA_PYTHON_EXE \"%s\"' % join\\(conda_prefix")
1055 (format #f "CONDA_PYTHON_EXE \"%s\"' % join(\"~a\""
1057 (("conda_prefix = abspath\\(sys.prefix\\)")
1058 (format #f "conda_prefix = abspath(\"~a\")" out)))
1059 (substitute* "conda/base/context.py"
1060 (("os.chdir\\(sys.prefix\\)")
1061 (format #f "os.chdir(\"~a\")" out))
1062 (("sys.prefix, '.condarc'")
1063 (format #f "\"~a\", '.condarc'" out))
1064 (("return abspath\\(sys.prefix\\)")
1065 (format #f "return abspath(\"~a\")" out))
1066 (("os.path.join\\(sys.prefix, bin_dir, exe\\)")
1067 (format #f "\"~a/bin/conda\"" out))
1068 (("'CONDA_EXE', sys.executable")
1069 (format #f "'CONDA_EXE', \"~a/bin/conda\"" out))))
1071 (add-before 'build 'create-version-file
1073 (with-output-to-file "conda/.version"
1074 (lambda () (display ,version)))
1078 (setenv "HOME" "/tmp")
1079 (invoke "py.test" "-vv"
1083 ;; This one reports a newer version of conda than
1085 " and not test_auto_update_conda"
1086 ;; This fails because the output directory is not a
1087 ;; Conda environment.
1088 " and not test_list"
1089 ;; This fails because we patched the default root
1091 " and not test_default_target_is_root_prefix"
1093 ;; These fail because ...
1094 ;; TODO: conda patches its own shebang to
1095 ;; $conda-prefix/bin/python, which is obviously wrong.
1096 " and not test_run_returns_int"
1097 " and not test_run_returns_zero_errorlevel"
1098 " and not test_run_returns_nonzero_errorlevel"
1100 ;; TODO: I don't understand what this failure means
1101 " and not test_PrefixData_return_value_contract"
1103 " and not test_install_1"
1104 ;; Not sure if this is really wrong. This fails because
1105 ;; /gnu/store/...python-conda-4.8.3/bin/python
1106 ;; is not /gnu/store/...python-wrapper-3.8.2/bin/python
1107 " and not test_make_entry_point"))))
1108 (add-after 'install 'init
1109 ;; This writes a whole bunch of shell initialization files to the
1110 ;; prefix directory. Many features of conda can only be used after
1111 ;; running "conda init".
1112 (lambda* (#:key inputs outputs #:allow-other-keys)
1113 (add-installed-pythonpath inputs outputs)
1114 (setenv "HOME" "/tmp")
1115 (invoke (string-append (assoc-ref outputs "out")
1119 (list python-wrapper))
1121 (list python-anaconda-client
1122 python-conda-package-handling
1131 ;; XXX: This is dragged in by libarchive and is needed at runtime.
1134 (list python-pytest-timeout))
1135 (home-page "https://github.com/conda/conda")
1136 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
1138 "Conda is a cross-platform, Python-agnostic binary package manager. It
1139 is the package manager used by Anaconda installations, but it may be used for
1140 other systems as well. Conda makes environments first-class citizens, making
1141 it easy to create independent environments even for C libraries. Conda is
1142 written entirely in Python.")
1143 (license license:bsd-3)))
1145 (define-public conan
1151 (method git-fetch) ;no tests in PyPI archive
1153 (url "https://github.com/conan-io/conan")
1155 (file-name (git-file-name name version))
1158 "1jjrinz5wkcxfvwdpldrv4h7vacdyz88cc4af5vi3sdnjra0i0m5"))))
1159 (build-system python-build-system)
1162 (modify-phases %standard-phases
1163 (add-after 'unpack 'relax-requirements
1165 (substitute* "conans/requirements.txt"
1166 (("node-semver==0.6.1")
1167 "node-semver>=0.6.1")
1168 (("Jinja2>=2.9, <3")
1170 (("PyYAML>=3.11, <6.0")
1172 (add-after 'unpack 'patch-paths
1173 (lambda* (#:key inputs #:allow-other-keys)
1174 (let ((coreutils (assoc-ref inputs "coreutils")))
1175 ;; It seems that PATH is manipulated, as printenv is not found
1176 ;; during tests. Patch in its exact location.
1177 (substitute* "conan/tools/env/environment.py"
1179 (string-append coreutils "/bin/printenv")))
1180 (substitute* "conans/client/envvars/environment.py"
1182 (string-append "#!" coreutils "/bin/env"))))))
1183 (add-before 'check 'set-home
1185 (setenv "HOME" "/tmp")))
1187 (lambda* (#:key tests? outputs #:allow-other-keys)
1188 (define system ,(or (%current-target-system)
1191 (setenv "PATH" (string-append (getenv "PATH") ":"
1192 (assoc-ref outputs "out") "/bin"))
1193 (invoke "python" "-m" "pytest"
1194 "-n" "auto" ;parallelize tests
1195 "-m" "not slow and not tool_svn"
1196 ;; Disable problematic tests.
1199 ;; These tests rely on networking.
1200 "not shallow_clone_remote "
1201 "and not remote_build "
1202 "and not download_retries_errors "
1204 "and not build_local_different_folders "
1205 ;; These expect CMake available at fixed versions.
1206 "and not custom_cmake "
1207 "and not default_cmake "
1208 "and not bazel " ;bazel is not packaged
1209 ;; Guix sets PKG_CONFIG_PATH itself, which is not
1210 ;; expected by the following test.
1211 "and not pkg_config_path "
1212 "and not compare " ;caused by newer node-semver?
1213 ;; Guix is not currently a supported package manager.
1214 "and not system_package_tool "
1215 ;; These expect GCC 5 to be available.
1216 "and not test_reuse "
1217 "and not test_install "
1218 ;; The installed configure script trips on the /bin/sh
1219 ;; shebang. We'd have to patch it in the Python code.
1220 "and not test_autotools "
1221 "and not test_use_build_virtualenv "
1222 ;; This test is architecture-dependent.
1223 "and not test_toolchain_linux "
1224 ;; This one fails for unknown reasons (see:
1225 ;; https://github.com/conan-io/conan/issues/9671).
1226 "and not test_build "
1227 ;; These tests expect the 'apt' command to be available.
1228 "and not test_apt_check "
1229 "and not test_apt_install_substitutes "
1230 (if (not (string-prefix? "x86_64" system))
1231 ;; These tests either assume the machine is
1232 ;; x86_64, or require a cross-compiler to target
1235 "and not cpp_package "
1236 "and not exclude_code_analysis "
1237 "and not cmakedeps_multi "
1238 "and not locally_build_linux "
1239 "and not custom_configuration "
1240 "and not package_from_system "
1241 "and not cross_build_command "
1242 "and not test_package "
1243 "and not test_deleted_os "
1244 "and not test_same ")
1246 (if (not (or (string-prefix? "x86_64" system)
1247 (string-prefix? "i686" system)))
1248 ;; These tests either assume the machine is i686,
1249 ;; or require a cross-compiler to target it.
1251 "and not vcvars_raises_when_not_found "
1252 "and not conditional_generators "
1253 "and not test_folders "
1254 "and not settings_as_a_dict_conanfile ")
1275 (list coreutils)) ;for printenv
1277 `(("autoconf" ,autoconf)
1278 ("automake" ,automake)
1280 ("git" ,git-minimal)
1283 ("pkg-config" ,pkg-config)
1284 ("python-bottle" ,python-bottle)
1285 ("python-mock" ,python-mock)
1286 ("python-parameterized" ,python-parameterized)
1287 ("python-pytest" ,python-pytest)
1288 ("python-pytest-xdist" ,python-pytest-xdist)
1289 ("python-webtest" ,python-webtest)
1291 (home-page "https://conan.io")
1292 (synopsis "Decentralized C/C++ package manager")
1293 (description "Conan is a package manager for C and C++ developers that
1294 boasts the following features:
1297 It is fully decentralized. Users can host their packages on their own private
1300 It can create, upload and download binaries for any configuration and
1301 platform, including cross-compiled ones.
1303 It integrates with any build system, including CMake, Makefiles, Meson, etc.
1305 It is extensible; its Python-based recipes, together with extensions points
1306 allow for great power and flexibility.
1308 (license license:expat)))
1316 (uri (string-append "mirror://gnu/gwl/gwl-" version ".tar.gz"))
1319 "09r22gqgaj2mxvlwvfach5j1n66y3yggmzc6d2gxq7lyywbcvjvs"))))
1320 (build-system gnu-build-system)
1322 `(#:parallel-build? #false ; for reproducibility
1324 '("GUILE_AUTO_COMPILE=0" "GWL_SKIP_INTEGRATION_TESTS=1")))
1326 (list autoconf automake pkg-config texinfo graphviz))
1328 (let ((p (package-input-rewriting
1329 `((,guile-3.0 . ,guile-3.0-latest))
1333 (p guile-commonmark)
1338 (p guile-syntax-highlight)
1340 (home-page "https://workflows.guix.info")
1341 (synopsis "Workflow management extension for GNU Guix")
1342 (description "The @dfn{Guix Workflow Language} (GWL) provides an
1343 extension to GNU Guix's declarative language for package management to
1344 automate the execution of programs in scientific workflows. The GWL
1345 can use process engines to integrate with various computing
1347 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
1348 ;; the web interface modules in gwl/ are licensed AGPL3+,
1349 ;; and the fonts included in this package are licensed OFL1.1.
1350 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
1352 (define-public gwl/next
1353 (let ((commit "706a0895f639ed3ed77d0fe88382f51a6638b514")
1358 (version (git-version "0.5.0" revision commit))
1362 (url "https://git.savannah.gnu.org/git/gwl.git")
1364 (file-name (git-file-name name version))
1367 "0k9zkdyyzir3fvlbcfcqy17k28b51i20rpbjwlx2i1mwd2pw9cxc")))))))
1369 (define-public guix-build-coordinator
1370 (let ((commit "6cd8bd854332301edef6eee68080881b8349d768")
1373 (name "guix-build-coordinator")
1374 (version (git-version "0" revision commit))
1378 (url "https://git.cbaines.net/git/guix/build-coordinator")
1382 "125dq7xr5crwq5l33dnxcyba90axkki0kw4m290qvz6xv21ydmj0"))
1383 (file-name (string-append name "-" version "-checkout"))))
1384 (build-system gnu-build-system)
1386 `(#:modules (((guix build guile-build-system)
1387 #:select (target-guile-effective-version))
1388 ,@%gnu-build-system-modules)
1389 #:imported-modules ((guix build guile-build-system)
1390 ,@%gnu-build-system-modules)
1392 (modify-phases %standard-phases
1393 (add-before 'build 'set-GUILE_AUTO_COMPILE
1395 ;; To avoid warnings relating to 'guild'.
1396 (setenv "GUILE_AUTO_COMPILE" "0")
1398 (add-after 'install 'wrap-executable
1399 (lambda* (#:key inputs outputs target #:allow-other-keys)
1400 (let* ((out (assoc-ref outputs "out"))
1401 (bin (string-append out "/bin"))
1402 (guile (assoc-ref inputs "guile"))
1403 (version (target-guile-effective-version))
1404 (scm (string-append out "/share/guile/site/" version))
1405 (go (string-append out "/lib/guile/" version "/site-ccache")))
1408 (simple-format (current-error-port) "wrapping: ~A\n" file)
1409 (let ((guile-inputs (list
1419 ,@(if (hurd-target?)
1421 '("guile-fibers")))))
1425 ;; Support building without sqitch as an input, as it
1426 ;; can't be cross-compiled yet
1427 ,@(or (and=> (assoc-ref inputs "sqitch")
1430 `("GUILE_LOAD_PATH" ":" prefix
1432 (map (lambda (input)
1434 #f "~A/share/guile/site/~A"
1435 (assoc-ref inputs input)
1439 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1441 (map (lambda (input)
1443 #f "~A/lib/guile/~A/site-ccache"
1444 (assoc-ref inputs input)
1449 ;; XXX work around wrap-program picking bash for the
1450 ;; host rather than target
1451 (let ((bash (assoc-ref inputs "bash")))
1454 (string-append "#! " bash "/bin/bash")))))))
1457 (delete 'strip)))) ; As the .go files aren't compatible
1464 ;; Guile libraries are needed here for cross-compilation.
1471 (first (assoc-ref (package-native-inputs guix) "guile"))))
1474 (list (first (assoc-ref (package-native-inputs guix) "guile"))
1482 (list guile-prometheus
1493 (list guile-fibers-1.1))))
1494 (home-page "https://git.cbaines.net/guix/build-coordinator/")
1495 (synopsis "Tool to help build derivations")
1497 "The Guix Build Coordinator helps with performing lots of builds across
1498 potentially many machines, and with doing something with the results and
1499 outputs of those builds.")
1500 (license license:gpl3+))))
1502 (define-public guix-build-coordinator/agent-only
1504 (inherit guix-build-coordinator)
1505 (name "guix-build-coordinator-agent-only")
1507 `(#:modules (((guix build guile-build-system)
1508 #:select (target-guile-effective-version))
1509 ,@%gnu-build-system-modules)
1510 #:imported-modules ((guix build guile-build-system)
1511 ,@%gnu-build-system-modules)
1513 (modify-phases %standard-phases
1514 (add-before 'build 'set-GUILE_AUTO_COMPILE
1516 ;; To avoid warnings relating to 'guild'.
1517 (setenv "GUILE_AUTO_COMPILE" "0")
1519 (add-after 'install 'wrap-executable
1520 (lambda* (#:key inputs outputs target #:allow-other-keys)
1521 (let* ((out (assoc-ref outputs "out"))
1522 (bin (string-append out "/bin"))
1523 (guile (assoc-ref inputs "guile"))
1524 (version (target-guile-effective-version))
1525 (scm (string-append out "/share/guile/site/" version))
1526 (go (string-append out "/lib/guile/" version "/site-ccache")))
1529 (simple-format (current-error-port) "wrapping: ~A\n" file)
1530 (let ((guile-inputs (list
1541 `("PATH" ":" prefix (,bin))
1542 `("GUILE_LOAD_PATH" ":" prefix
1544 (map (lambda (input)
1546 #f "~A/share/guile/site/~A"
1547 (assoc-ref inputs input)
1551 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1553 (map (lambda (input)
1555 #f "~A/lib/guile/~A/site-ccache"
1556 (assoc-ref inputs input)
1562 (delete 'strip)))) ; As the .go files aren't compatible
1569 ;; Guile libraries are needed here for cross-compilation.
1575 (first (assoc-ref (package-native-inputs guix) "guile"))))
1577 (list (first (assoc-ref (package-native-inputs guix) "guile"))
1581 (list guile-prometheus
1590 "The Guix Build Coordinator helps with performing lots of builds across
1591 potentially many machines, and with doing something with the results and
1592 outputs of those builds.
1594 This package just includes the agent component.")))
1596 (define-public guix-jupyter
1598 (name "guix-jupyter")
1600 (home-page "https://gitlab.inria.fr/guix-hpc/guix-kernel")
1603 (uri (git-reference (url home-page)
1604 (commit (string-append "v" version))))
1607 "17m6970wnvwlbarq4gxz5bakhzyhq5ch8qd8jw55ydccpv6473kq"))
1608 (file-name (string-append "guix-jupyter-" version "-checkout"))))
1609 (build-system gnu-build-system)
1611 `(#:modules ((srfi srfi-26)
1616 (guix build gnu-build-system))
1617 #:parallel-tests? #f ;kernels.scm frequently breaks in parallel
1619 (modify-phases %standard-phases
1620 (add-after 'install 'sed-kernel-json
1621 (lambda* (#:key inputs outputs #:allow-other-keys)
1622 (let* ((out (assoc-ref outputs "out"))
1623 (guix (assoc-ref inputs "guix"))
1624 (guile (assoc-ref inputs "guile"))
1625 (json (assoc-ref inputs "guile-json"))
1626 (git (assoc-ref inputs "guile-git"))
1627 (bs (assoc-ref inputs "guile-bytestructures"))
1628 (s-zmq (assoc-ref inputs "guile-simple-zmq"))
1629 (gcrypt (assoc-ref inputs "guile-gcrypt"))
1630 (deps (list out s-zmq guix json git bs gcrypt))
1633 (open-pipe* OPEN_READ
1634 (string-append guile "/bin/guile")
1635 "-c" "(display (effective-version))")))
1636 (path (map (cut string-append "-L\", \"" <>
1637 "/share/guile/site/"
1640 (gopath (map (cut string-append "-C\", \"" <>
1641 "/lib/guile/" effective
1644 (kernel-dir (string-append out "/share/jupyter/kernels/guix/")))
1645 (substitute* (string-append kernel-dir "kernel.json")
1648 (list (string-join path "\",\n\t\t\"")
1649 (string-join gopath "\",\n\t\t\"")
1652 (("guix-jupyter-kernel.scm")
1653 (string-append out "/share/guile/site/3.0/"
1654 "guix-jupyter-kernel.scm")))
1666 ("guile" ,@(assoc-ref (package-native-inputs guix) "guile"))))
1668 (list guile-json-4 guile-simple-zmq guile-gcrypt))
1669 (synopsis "Guix kernel for Jupyter")
1671 "Guix-Jupyter is a Jupyter kernel. It allows you to annotate notebooks
1672 with information about their software dependencies, such that code is executed
1673 in the right software environment. Guix-Jupyter spawns the actual kernels
1674 such as @code{python-ipykernel} on behalf of the notebook user and runs them
1675 in an isolated environment, in separate namespaces.")
1676 (license license:gpl3+)))
1678 (define-public nar-herder
1679 (let ((commit "5acfcc0a9d99d78a167c365534aa5bf592f5625e")
1683 (version (git-version "0" revision commit))
1687 (url "https://git.cbaines.net/git/guix/nar-herder")
1691 "1mxdkay3l1la7b6m0455s8cansd6qcdhv0k231aik0ayhbck8kby"))
1692 (file-name (string-append name "-" version "-checkout"))))
1693 (build-system gnu-build-system)
1695 `(#:modules (((guix build guile-build-system)
1696 #:select (target-guile-effective-version))
1697 ,@%gnu-build-system-modules)
1698 #:imported-modules ((guix build guile-build-system)
1699 ,@%gnu-build-system-modules)
1701 (modify-phases %standard-phases
1702 (add-before 'build 'set-GUILE_AUTO_COMPILE
1704 ;; To avoid warnings relating to 'guild'.
1705 (setenv "GUILE_AUTO_COMPILE" "0")))
1706 (add-after 'install 'wrap-executable
1707 (lambda* (#:key inputs outputs target #:allow-other-keys)
1708 (let* ((out (assoc-ref outputs "out"))
1709 (bin (string-append out "/bin"))
1710 (guile (assoc-ref inputs "guile"))
1711 (version (target-guile-effective-version))
1712 (scm (string-append out "/share/guile/site/" version))
1713 (go (string-append out "/lib/guile/" version "/site-ccache")))
1716 (simple-format (current-error-port) "wrapping: ~A\n" file)
1717 (let ((guile-inputs (list
1728 `("GUILE_LOAD_PATH" ":" prefix
1730 (map (lambda (input)
1732 (assoc-ref inputs input)
1733 "/share/guile/site/"
1737 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1739 (map (lambda (input)
1741 (assoc-ref inputs input)
1742 "/lib/guile/" version "/site-ccache"))
1747 (delete 'strip)))) ; As the .go files aren't compatible
1754 ;; Guile libraries are needed here for cross-compilation.
1755 (car (assoc-ref (package-native-inputs guix) "guile"))
1766 (car (assoc-ref (package-native-inputs guix) "guile"))))
1777 (home-page "https://git.cbaines.net/guix/nar-herder")
1778 (synopsis "Utility for managing and serving nars")
1780 "The Nar Herder is a utility for managing a collection of
1781 nars (normalized archives, in the context of Guix) along with the
1782 corresponding narinfo files which contain some signed metadata.
1784 It can assist in serving a collection of nars, moving them between machines,
1785 or mirroring an existing collection of nars.
1787 It's currently a working prototype, many designed features aren't implemented,
1788 and the error handling is very rough.")
1789 (license license:agpl3+))))
1797 (uri (string-append "mirror://gnome/sources/gcab/"
1798 version "/gcab-" version ".tar.xz"))
1801 "13q43iqld4l50yra45lhvkd376pn6qpk7rkx374zn8y9wsdzm9b7"))))
1802 (build-system meson-build-system)
1804 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1805 ("intltool" ,intltool)
1806 ("pkg-config" ,pkg-config)
1812 ;; XXX This ‘documentation’ is for developers, and fails informatively:
1813 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
1814 (list "-Ddocs=false"
1815 "-Dintrospection=false")))
1816 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
1817 (synopsis "Microsoft Cabinet file manipulation library")
1819 "The libgcab library provides GObject functions to read, write, and modify
1820 Microsoft cabinet (.@dfn{CAB}) files.")
1821 (license (list license:gpl2+ ; tests/testsuite.at
1822 license:lgpl2.1+)))) ; the rest
1824 (define-public msitools
1830 (uri (string-append "mirror://gnome/sources/msitools/"
1831 version "/msitools-" version ".tar.xz"))
1834 "1skq17qr2ic4qr3779j49byfm8rncwbsq9rj1a33ncn2m7isdwdv"))))
1835 (build-system gnu-build-system)
1837 (list bison pkg-config))
1839 (list gcab glib libgsf libxml2
1840 `(,util-linux "lib")))
1841 (home-page "https://wiki.gnome.org/msitools")
1842 (synopsis "Windows Installer file manipulation tool")
1844 "msitools is a collection of command-line tools to inspect, extract, build,
1845 and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
1846 for packaging and deployment of cross-compiled Windows applications.")
1847 (license license:lgpl2.1+)))
1849 (define-public libostree
1857 "https://github.com/ostreedev/ostree/releases/download/v"
1858 (version-major+minor version) "/libostree-" version ".tar.xz"))
1860 (base32 "135dzxqzy19a8hkxm25mriy7zf72sbxz1mzzfw6a2d8bk9yz8pl3"))))
1861 (build-system gnu-build-system)
1864 (modify-phases %standard-phases
1865 (add-before 'check 'pre-check
1867 ;; Don't try to use the non-existing '/var/tmp' as test
1869 (setenv "TEST_TMPDIR" (getenv "TMPDIR")))))
1871 ;; tap-driver.sh: missing test plan
1872 ;; tap-driver.sh: internal error getting exit status
1873 ;; tap-driver.sh: fatal: I/O or internal error
1876 (list attr ; for tests
1878 `(,glib "bin") ; for 'glib-mkenums'
1879 gobject-introspection
1891 libsoup-minimal-2 ; needs libsoup-2.4
1893 (home-page "https://ostree.readthedocs.io/en/latest/")
1894 (synopsis "Operating system and container binary deployment and upgrades")
1896 "@code{libostree} is both a shared library and suite of command line
1897 tools that combines a \"git-like\" model for committing and downloading
1898 bootable file system trees, along with a layer for deploying them and managing
1899 the boot loader configuration.")
1900 (license license:lgpl2.0+)))
1902 (define-public flatpak
1909 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
1910 version "/flatpak-" version ".tar.xz"))
1912 (base32 "05bqy9kwmaj32y7f94fydcz3k63bsgn4mbcp4pglv8hffxrnj9wf"))
1914 (search-patches "flatpak-fix-path.patch"
1915 "flatpak-unset-gdk-pixbuf-for-sandbox.patch"))))
1917 ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
1918 ;; find the TLS backend in glib-networking.
1919 (build-system glib-or-gtk-build-system)
1925 "--enable-documentation=no" ;; FIXME
1926 "--enable-system-helper=no"
1927 "--localstatedir=/var"
1928 (string-append "--with-system-bubblewrap="
1929 (assoc-ref %build-inputs "bubblewrap")
1931 (string-append "--with-system-dbus-proxy="
1932 (assoc-ref %build-inputs "xdg-dbus-proxy")
1933 "/bin/xdg-dbus-proxy"))
1935 #~(modify-phases %standard-phases
1936 (add-after 'unpack 'fix-tests
1937 (lambda* (#:key inputs #:allow-other-keys)
1939 (search-input-directory inputs "lib/locale")
1941 (for-each make-file-writable (find-files "/tmp"))
1942 (substitute* "tests/make-test-runtime.sh"
1943 (("cp `which.*") "echo guix\n")
1944 (("cp -r /usr/lib/locale/C\\.\\*")
1945 (string-append "mkdir ${DIR}/usr/lib/locale/en_US; \
1946 cp -r /tmp/locale/*/en_US.*")))
1947 (substitute* "tests/libtest.sh"
1948 (("/bin/kill") (which "kill"))
1949 (("/usr/bin/python3") (which "python3")))
1951 (add-after 'unpack 'p11-kit-fix
1952 (lambda* (#:key inputs #:allow-other-keys)
1953 (let ((p11-path (search-input-file inputs "/bin/p11-kit")))
1954 (substitute* "session-helper/flatpak-session-helper.c"
1956 (string-append "\"" p11-path "\","))
1957 (("if \\(g_find_program_in_path \\(\"p11-kit\"\\)\\)")
1958 (string-append "if (g_find_program_in_path (\""
1959 p11-path "\"))"))))))
1960 ;; Many tests fail for unknown reasons, so we just run a few basic
1964 (setenv "HOME" "/tmp")
1965 (invoke "make" "check"
1966 "TESTS=tests/test-basic.sh tests/test-config.sh testcommon"))))))
1969 dbus ; for dbus-daemon
1971 `(,glib "bin") ; for glib-mkenums + gdbus-codegen
1973 gobject-introspection
1999 (propagated-inputs (list glib-networking gnupg gsettings-desktop-schemas))
2000 (home-page "https://flatpak.org")
2001 (synopsis "System for building, distributing, and running sandboxed desktop
2003 (description "Flatpak is a system for building, distributing, and running
2004 sandboxed desktop applications on GNU/Linux.")
2005 (license license:lgpl2.1+)))
2014 (url "https://gitlab.com/akkuscm/akku.git")
2015 (commit (string-append "v" version))))
2016 (file-name (git-file-name name version))
2017 (sha256 (base32 "1pi18aamg1fd6f9ynfl7zx92052xzf0zwmhi2pwcwjs1kbah19f5"))))
2018 (build-system gnu-build-system)
2020 '(#:phases (modify-phases %standard-phases
2022 (lambda* (#:key outputs #:allow-other-keys)
2023 (for-each patch-shebang
2026 (let* ((home "/tmp")
2027 (datadir (string-append home "/.local/share/akku/")))
2029 (invoke "touch" (string-append datadir "index.db"))
2030 (setenv "HOME" home))
2031 (invoke "./bootstrap")
2033 (add-after 'install 'wrap-executables
2034 (lambda* (#:key outputs inputs #:allow-other-keys)
2035 (let ((out (assoc-ref outputs "out"))
2036 (curl (assoc-ref inputs "curl")))
2037 (wrap-program (string-append out "/bin/akku")
2038 `("LD_LIBRARY_PATH" ":" prefix (,(string-append curl "/lib"))))
2041 (list which autoconf automake pkg-config))
2043 (list guile-3.0 curl))
2044 (home-page "https://akkuscm.org/")
2045 (synopsis "Language package manager for Scheme")
2047 "Akku.scm is a project-based language package manager for R6RS and R7RS Scheme.
2048 It is mainly meant for programmers who develop portable programs or libraries in Scheme,
2049 but could potentially work for end-users of those programs. It also has a translator
2050 from R7RS, which allows most R7RS code to run on R6RS implementations.")
2051 (license license:gpl3+)))
2053 (define-public modules
2060 (uri (string-append "mirror://sourceforge/modules/Modules/modules-"
2061 version "/modules-" version ".tar.bz2"))
2062 (sha256 (base32 "1amz8qdqbvfdc8jv0j4720vywbz2gi7l3sr1lh37ilfbxy9lq9g9"))))
2063 (build-system gnu-build-system)
2066 (list (string-append "--with-bin-search-path="
2067 (assoc-ref %build-inputs "tcl") "/bin" ":"
2068 (assoc-ref %build-inputs "procps") "/bin" ":"
2069 (assoc-ref %build-inputs "less") "/bin" ":"
2070 (assoc-ref %build-inputs "coreutils") "/bin")
2071 (string-append "--with-tcl=" (assoc-ref %build-inputs "tcl") "/lib")
2072 "--disable-compat-version")
2073 #:test-target "test"
2075 (modify-phases %standard-phases
2076 (add-before 'configure 'patch-add-modules
2077 (lambda* (#:key inputs #:allow-other-keys)
2078 (let ((coreutils (assoc-ref inputs "coreutils")))
2079 (substitute* "script/add.modules.in"
2080 (("/bin/(cat|cp|rm)" _ command)
2081 (string-append coreutils "/bin/" command))
2084 (add-before 'configure 'patch-scripts-for-python-3
2086 ;; Patch the script for python-3.
2087 (substitute* "script/createmodule.py.in"
2088 (("pathkeys.sort\\(\\)") "pathkeys = sorted(pathkeys)")
2089 (("print\\(\"\\\\t\"\\*") "print(\"\\t\"*int")
2090 (("@PYTHON@") (which "python3")))))
2091 (add-before 'check 'patch-/bin/sh-and-nixbld-groups-in-tests
2093 (use-modules (srfi srfi-1))
2094 (let* ((groups-file (string-append (getcwd) "/nixbld-groups"))
2095 (groups-file-z (string-append groups-file "-z"))
2100 (lambda () (cons (group:name (getgrnam id)) prev))
2103 (vector->list (getgroups)))))
2104 ;; Simulate "id -G -n" command output.
2105 (call-with-output-file groups-file
2107 (display (string-join nixbld-groups " ") port)
2108 (display #\newline port)))
2109 ;; Simulate "id -G -n -z" command output.
2110 (call-with-output-file groups-file-z
2113 (lambda (group-name)
2114 (display group-name port)
2115 (display #\null port))
2117 ;; Generate "modulecmd-test.tcl" before running "make test".
2118 (invoke "make" "modulecmd-test.tcl")
2119 ;; Substitute shell.
2121 '("modulecmd-test.tcl"
2123 "testsuite/modules.70-maint/380-edit.exp"
2124 "compat/init/filter")
2125 (("/bin/sh") (which "sh")))
2126 ;; Skip tests that use supplementary groups.
2129 '("testsuite/modules.20-locate/112-hide-user-group.exp"
2130 "testsuite/modules.20-locate/117-forbid-user-group.exp"
2131 "testsuite/modules.20-locate/119-hide-cascading.exp"
2132 "testsuite/modules.50-cmds/140-system.exp"
2133 "testsuite/modules.50-cmds/287-info-usergroups.exp"
2134 "testsuite/modules.50-cmds/440-module-tag.exp"
2135 "testsuite/modules.70-maint/220-config.exp"))
2139 (("/bin/sh") (which "bash"))
2140 ;; For some reason "kvm" group cannot be resolved for
2141 ;; "nixbld" user. We replace "id ..." commands with
2142 ;; "cat ..." that simulates them.
2143 (("exec id -G -n -z") (string-append "exec cat " groups-file-z))
2144 (("exec id -G -n") (string-append "exec cat " groups-file))))
2145 '("testsuite/modules.00-init/005-init_ts.exp"
2146 "testsuite/install.00-init/005-init_ts.exp"
2147 "modulecmd-test.tcl"))))))))
2149 (list dejagnu autoconf which))
2151 (list tcl less procps coreutils python-3))
2152 (home-page "http://modules.sourceforge.net/")
2153 (synopsis "Shell environment variables and aliases management")
2154 (description "Modules simplify shell initialization and let users
2155 modify their environment during the session with modulefiles. Modules are
2156 used on high-performance clusters to dynamically add and remove paths
2157 to specific versions of applications.")
2158 (license license:gpl2+)))