projects/guix·blob java-team · refs

3704 lines · 152.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013-2025 Ludovic Courtès <[email protected]>
3;;; Copyright © 2015, 2017, 2020, 2021, 2022, 2023 Ricardo Wurmus <[email protected]>
4;;; Copyright © 2017 Muriithi Frederick Muriuki <[email protected]>
5;;; Copyright © 2017, 2018 Oleg Pykhalov <[email protected]>
6;;; Copyright © 2017 Roel Janssen <[email protected]>
7;;; Copyright © 2017–2022 Tobias Geerinckx-Rice <[email protected]>
8;;; Copyright © 2018 Julien Lepiller <[email protected]>
9;;; Copyright © 2018, 2019 Rutger Helling <[email protected]>
10;;; Copyright © 2018 Sou Bunnbu <[email protected]>
11;;; Copyright © 2018, 2019 Eric Bavier <[email protected]>
12;;; Copyright © 2019-2024 Efraim Flashner <[email protected]>
13;;; Copyright © 2019 Jonathan Brielmaier <[email protected]>
14;;; Copyright © 2020 Mathieu Othacehe <[email protected]>
15;;; Copyright © 2020, 2023, 2024, 2026 Janneke Nieuwenhuizen <[email protected]>
16;;; Copyright © 2020 Giacomo Leidi <[email protected]>
17;;; Copyright © 2020 Jesse Gibbons <[email protected]>
18;;; Copyright © 2020 Martin Becze <[email protected]>
19;;; Copyright © 2020 Vincent Legoll <[email protected]>
20;;; Copyright © 2021 Ivan Gankevich <[email protected]>
21;;; Copyright © 2021, 2022, 2023, 2025 Maxim Cournoyer <[email protected]>
22;;; Copyright © 2021 John Kehayias <[email protected]>
23;;; Copyright © 2022, 2023 Zhu Zihao <[email protected]>
24;;; Copyright © 2023, 2025-2026 jgart <[email protected]>
25;;; Copyright © 2023 Wojtek Kosior <[email protected]>
26;;; Copyright © 2023 Mădălin Ionel Patrașcu <[email protected]>
27;;; Copyright © 2024 Arun Isaac <[email protected]>
28;;; Copyright © 2024 Vinicius Monego <[email protected]>
29;;; Copyright © 2024 Zheng Junjie <[email protected]>
30;;; Copyright © 2025 aurtzy <[email protected]>
31;;; Copyright © 2025 Tomás Ortín Fernández <[email protected]>
32;;; Copyright © 2025-2026 Sharlatan Hellseher <[email protected]>
33;;; Copyright © 2026 Carlos Durán Domínguez <[email protected]>
34;;; Copyright © 2025 unwox <[email protected]>
35;;; Copyright © 2026 Owen T. Heisler <[email protected]>
36;;; Copyright © 2026 Kevin Deldycke <[email protected]>
37;;;
38;;; This file is part of GNU Guix.
39;;;
40;;; GNU Guix is free software; you can redistribute it and/or modify it
41;;; under the terms of the GNU General Public License as published by
42;;; the Free Software Foundation; either version 3 of the License, or (at
43;;; your option) any later version.
44;;;
45;;; GNU Guix is distributed in the hope that it will be useful, but
46;;; WITHOUT ANY WARRANTY; without even the implied warranty of
47;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48;;; GNU General Public License for more details.
49;;;
50;;; You should have received a copy of the GNU General Public License
51;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
52
53(define-module (gnu packages package-management)
54 #:use-module (gnu artwork)
55 #:use-module (gnu packages)
56 #:use-module (gnu packages acl)
57 #:use-module (gnu packages attr)
58 #:use-module (gnu packages autotools)
59 #:use-module (gnu packages backup)
60 #:use-module (gnu packages base)
61 #:use-module (gnu packages bash)
62 #:use-module (gnu packages bdw-gc)
63 #:use-module (gnu packages bison)
64 #:use-module (gnu packages boost)
65 #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
66 #:use-module (gnu packages build-tools)
67 #:use-module (gnu packages busybox)
68 #:use-module (gnu packages check)
69 #:use-module (gnu packages compression)
70 #:use-module (gnu packages containers)
71 #:use-module (gnu packages dns)
72 #:use-module (gnu packages cmake)
73 #:use-module (gnu packages cpio)
74 #:use-module (gnu packages cpp)
75 #:use-module (gnu packages crypto)
76 #:use-module (gnu packages curl)
77 #:use-module (gnu packages databases)
78 #:use-module (gnu packages debian)
79 #:use-module (gnu packages dejagnu)
80 #:use-module (gnu packages dbm)
81 #:use-module (gnu packages docbook)
82 #:use-module (gnu packages file)
83 #:use-module (gnu packages freedesktop)
84 #:use-module (gnu packages compiler-tools)
85 #:use-module (gnu packages gcc)
86 #:use-module (gnu packages gettext)
87 #:use-module (gnu packages ghostscript)
88 #:use-module (gnu packages glib)
89 #:use-module (gnu packages gnome)
90 #:use-module (gnu packages gnupg)
91 #:use-module (gnu packages golang-build)
92 #:use-module (gnu packages golang-check)
93 #:use-module (gnu packages golang-vcs)
94 #:use-module (gnu packages golang-xyz)
95 #:use-module (gnu packages graphviz)
96 #:use-module (gnu packages gtk)
97 #:use-module (gnu packages guile)
98 #:use-module (gnu packages guile-xyz)
99 #:use-module (gnu packages hardware)
100 #:use-module (gnu packages hurd)
101 #:use-module (gnu packages imagemagick)
102 #:use-module (gnu packages jupyter)
103 #:use-module (gnu packages less)
104 #:use-module (gnu packages libedit)
105 #:use-module (gnu packages libffi)
106 #:use-module (gnu packages linux)
107 #:use-module (gnu packages lisp)
108 #:use-module (gnu packages llvm)
109 #:use-module (gnu packages logging)
110 #:use-module (gnu packages lua)
111 #:use-module (gnu packages man)
112 #:use-module (gnu packages markup)
113 #:use-module (gnu packages ncurses)
114 #:use-module (gnu packages nettle)
115 #:use-module (gnu packages networking)
116 #:use-module (gnu packages node)
117 #:use-module (gnu packages nss)
118 #:use-module (gnu packages patchutils)
119 #:use-module (gnu packages perl)
120 #:use-module (gnu packages perl-check)
121 #:use-module (gnu packages pkg-config)
122 #:use-module (gnu packages polkit)
123 #:use-module (gnu packages popt)
124 #:use-module (gnu packages pretty-print)
125 #:use-module (gnu packages python)
126 #:use-module (gnu packages python-build)
127 #:use-module (gnu packages python-check)
128 #:use-module (gnu packages python-compression)
129 #:use-module (gnu packages python-crypto)
130 #:use-module (gnu packages python-web)
131 #:use-module (gnu packages python-xyz)
132 #:use-module (gnu packages rust)
133 #:use-module (gnu packages ruby-check)
134 #:use-module (gnu packages ruby-xyz)
135 #:use-module (gnu packages rust-apps)
136 #:use-module (gnu packages serialization)
137 #:use-module (gnu packages sqlite)
138 #:use-module (gnu packages ssh)
139 #:use-module (gnu packages tcl)
140 #:use-module (gnu packages texinfo)
141 #:use-module (gnu packages time)
142 #:use-module (gnu packages tls)
143 #:use-module (gnu packages vim)
144 #:use-module (gnu packages virtualization)
145 #:use-module (gnu packages web)
146 #:use-module (gnu packages xml)
147 #:use-module (gnu packages xorg)
148 #:use-module (gnu packages version-control)
149 #:autoload (guix build-system channel) (channel-build-system)
150 #:use-module (guix build-system cargo)
151 #:use-module (guix build-system cmake)
152 #:use-module (guix build-system copy)
153 #:use-module (guix build-system glib-or-gtk)
154 #:use-module (guix build-system gnu)
155 #:use-module (guix build-system go)
156 #:use-module (guix build-system guile)
157 #:use-module (guix build-system meson)
158 #:use-module (guix build-system pyproject)
159 #:use-module (guix build-system ruby)
160 #:use-module (guix build-system trivial)
161 #:use-module (guix download)
162 #:use-module (guix gexp)
163 #:use-module (guix git-download)
164 #:autoload (guix describe) (current-channels)
165 #:autoload (guix channels) (channel?
166 guix-channel?
167 repository->guix-channel)
168 #:use-module ((guix licenses) #:prefix license:)
169 #:use-module (guix packages)
170 #:use-module (guix utils)
171 #:use-module (gnu packages readline)
172 #:use-module (gnu packages admin)
173 #:use-module (gnu packages selinux)
174 #:use-module (gnu packages elf)
175 #:use-module ((guix search-paths) #:select ($SSL_CERT_DIR $SSL_CERT_FILE $GUIX_EXTENSIONS_PATH))
176 #:use-module (ice-9 match)
177 #:use-module (srfi srfi-1))
178
179;; NOTE: The commit IDs used here form a linked list threaded through the git
180;; history. In a phenomenon known as boot-stripping, not only the head of this
181;; list is used, but also a few older versions, when a guix from this package is
182;; used to build something also depending on guix.
183;;
184;; Therefore, if, by accident, you set this package to a non-existent commit ID,
185;; it is insufficient to simply correct it with the latest commit.
186;; Instead, please push one commit that rolls back Guix to before the mistake,
187;; and then another that points to the first one. That way, the faulty commit
188;; won't appear on the linked list.
189;;
190;; If you are updating this package because it fails to build, you need to
191;; actually update it *twice*, as the installer is pointing to the N-1 guix
192;; package revision.
193(define-public guix
194 ;; Latest version of Guix, which may or may not correspond to a release.
195 ;; Note: the 'update-guix-package.scm' script expects this definition to
196 ;; start precisely like this.
197 (let ((version "1.5.0")
198 (commit "5ceffb60e55b86920fd720817dd24b0e1f900ac1")
199 (revision 7))
200 (package
201 (name "guix")
202
203 (version (if (zero? revision)
204 version
205 (string-append version "-"
206 (number->string revision)
207 "." (string-take commit 7))))
208 (source (origin
209 (method git-fetch)
210 (uri (git-reference
211 (url "https://git.guix.gnu.org/guix.git")
212 (commit commit)))
213 (sha256
214 (base32
215 "0nb0xhd2jlg613d3z3br6yl3xj75b4vlyw9y45pwg8zrq02kjajd"))
216 (file-name (string-append "guix-" version "-checkout"))))
217 (build-system gnu-build-system)
218 (arguments
219 (list
220 ;; For reproducibility, see <https://issues.guix.gnu.org/74204>.
221 #:parallel-build? #f
222 #:configure-flags
223 #~(list
224 ;; Provide channel metadata for 'guix describe'. Don't pass
225 ;; '--with-channel-url' and '--with-channel-introduction' and
226 ;; instead use the defaults.
227 #$(string-append "--with-channel-commit=" commit)
228
229 "--localstatedir=/var"
230 "--sysconfdir=/etc"
231 (string-append "--with-bash-completion-dir="
232 #$output "/etc/bash_completion.d")
233 (string-append "--with-apparmor-profile-dir="
234 #$output "/etc/apparmor.d")
235
236 ;; Set 'DOT_USER_PROGRAM' to the empty string so we don't keep a
237 ;; reference to Graphviz, whose closure is pretty big (too big for
238 ;; the Guix system installation image.)
239 "ac_cv_path_DOT_USER_PROGRAM=dot"
240
241 ;; When cross-compiling, 'git' is not in $PATH (because it's not a
242 ;; native input). Thus, always explicitly pass its file name.
243 (string-append "ac_cv_path_GIT="
244 (search-input-file %build-inputs "/bin/git"))
245
246 ;; To avoid problems with the length of shebangs, choose a
247 ;; fixed-width and short directory name for tests.
248 "ac_cv_guix_test_root=/tmp/guix-tests")
249 #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
250
251 #:modules `((guix build gnu-build-system)
252 (guix build utils)
253 (srfi srfi-1)
254 (ice-9 match)
255 (ice-9 popen)
256 (ice-9 rdelim))
257
258 #:phases
259 #~(modify-phases %standard-phases
260 (replace 'bootstrap
261 (lambda _
262 ;; Make sure 'msgmerge' can modify the PO files.
263 (for-each (lambda (po)
264 (chmod po #o666))
265 (find-files "." "\\.po$"))
266
267 (patch-shebang "build-aux/git-version-gen")
268
269 (call-with-output-file ".tarball-version"
270 (lambda (port)
271 (display #$version port)))
272
273 ;; Install SysV init files to $(prefix)/etc rather than /etc.
274 (substitute* "nix/local.mk"
275 (("^sysvinitservicedir = .*$")
276 (string-append "sysvinitservicedir = \
277$(prefix)/etc/init.d\n")))
278
279 ;; Install OpenRC init files to $(prefix)/etc rather than /etc.
280 (substitute* "nix/local.mk"
281 (("^openrcservicedir = .*$")
282 (string-append "openrcservicedir = \
283$(prefix)/etc/openrc\n")))
284
285 (invoke "sh" "bootstrap")))
286 #$@(if (target-riscv64?)
287 `((add-after 'unpack 'use-correct-guile-version-for-tests
288 (lambda _
289 (substitute* "tests/gexp.scm"
290 (("2\\.0") "3.0")))))
291 '())
292 #$@(if (system-hurd?)
293 `((add-after 'unpack 'disable-tests/hurd
294 (lambda _
295 (substitute* "Makefile.am"
296 (("tests/derivations.scm") "")
297 (("tests/grafts.scm") "")
298 (("tests/graph.scm") "")
299 (("tests/lint.scm") "")
300 (("tests/nar.scm") "")
301 (("tests/offload.scm") "")
302 (("tests/pack.scm") "")
303 (("tests/packages.scm") "")
304 (("tests/processes.scm") "")
305 (("tests/publish.scm") "")
306 (("tests/import/pypi.scm") "")
307 (("tests/size.scm") "")
308 (("tests/store.scm") "")
309 (("tests/substitute.scm") "")
310 (("tests/syscalls.scm") "")
311 (("tests/union.scm") "")
312 (("tests/guix-build.sh") "")
313 (("tests/guix-build-branch.sh") "")
314 (("tests/guix-hash.sh") "")
315 (("tests/guix-locate.sh") "")
316 (("tests/guix-pack.sh") "")
317 (("tests/guix-pack-relocatable.sh") "")
318 (("tests/guix-package-aliases.sh") "")
319 (("tests/guix-package-net.sh") "")
320 (("tests/guix-home.sh") "")
321 (("tests/guix-archive.sh") "")
322 (("tests/guix-environment.sh") "")
323 (("tests/guix-package.sh") "")
324 (("tests/guix-refresh.sh") "")
325 (("tests/guix-shell.sh") "")
326 (("tests/guix-shell-export-manifest.sh") "")
327 (("tests/guix-system.sh") "")
328 (("tests/guix-graph.sh") "")
329 (("tests/guix-gc.sh") "")
330 (("tests/guix-daemon.sh") "")))))
331 '())
332 #$@(if (%current-target-system)
333 #~((add-before 'build 'use-host-compressors
334 (lambda* (#:key inputs #:allow-other-keys)
335 (substitute* "guix/config.scm"
336 (("[^\"]*/(bin/(bzip2|gzip|xz))" _ bin)
337 (search-input-file inputs bin))))))
338 #~())
339 (add-before 'build 'set-font-path
340 (lambda* (#:key native-inputs inputs #:allow-other-keys)
341 ;; Tell 'dot' where to look for fonts.
342 (setenv "XDG_DATA_DIRS"
343 (dirname
344 (search-input-directory (or native-inputs inputs)
345 "share/fonts")))))
346 (add-before 'check 'copy-bootstrap-guile
347 (lambda* (#:key system target inputs #:allow-other-keys)
348 ;; Copy the bootstrap guile tarball in the store
349 ;; used by the test suite.
350 (define* (intern file #:optional recursive? name)
351 ;; Note: don't use 'guix download' here because we need to
352 ;; set the 'recursive?' argument to keep permissions bits.
353 (define base
354 (strip-store-file-name file))
355
356 (define code
357 `(begin
358 (use-modules (guix))
359 (with-store store
360 (let* ((item (add-to-store store ,(or name base)
361 ,recursive?
362 "sha256" ,file))
363 (root (string-append "/tmp/gc-root-"
364 (basename item))))
365 ;; Register a root so that the GC tests
366 ;; don't delete those.
367 (symlink item root)
368 (add-indirect-root store root)))))
369
370 (invoke "./test-env" "guile" "-c"
371 (object->string code)))
372
373 (unless target
374 (if (string=? system "x86_64-linux")
375 ;; On x86_64 a test needs the i686 Guile. Unfortunately,
376 ;; their tarballs can have the same input label.
377 (for-each
378 (match-lambda
379 ((label . file)
380 (and (string-prefix? "guile-" label)
381 (string-suffix? ".tar.xz" label)
382 (intern file))))
383 inputs)
384 (intern (assoc-ref inputs #$(basename
385 (bootstrap-guile-url-path
386 (%current-system))))))
387
388 ;; Copy the bootstrap executables.
389 (for-each (lambda (bin)
390 (let ((input (string-append "bootstrap-" bin)))
391 (intern (assoc-ref inputs input) #t bin)))
392 (list "bash" "mkdir" "tar" "xz")))))
393 (add-after 'unpack 'disable-failing-tests
394 ;; XXX FIXME: These tests fail within the build container.
395 (lambda _
396 (substitute* "tests/syscalls.scm"
397 (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
398 (string-append "(test-skip 1)\n" all)))
399 (substitute* "tests/containers.scm"
400 (("^\\(test-(assert|equal)" all)
401 (string-append "(test-skip 1)\n" all)))
402 (when (file-exists? "tests/guix-environment-container.sh")
403 (substitute* "tests/guix-environment-container.sh"
404 (("guix environment --version")
405 "exit 77\n")))))
406 #$@(if (target-arm32?)
407 #~((add-after
408 'disable-failing-tests
409 'disable-failing-tests-on-arm32
410 ;; XXX FIXME: These tests fail on armhf architecture,
411 ;; see <https://codeberg.org/guix/guix/issues/5078>.
412 (lambda _
413 (substitute* "tests/syscalls.scm"
414 (("^\\(test-equal \"safe-clone and unshare succeeds\"" all)
415 (string-append "(test-skip 1)\n" all))
416 (("^\\(test-equal \"clone and unshare triggers EINVAL\"" all)
417 (string-append "(test-skip 1)\n" all))))))
418 #~())
419 (add-before 'check 'set-SHELL
420 (lambda _
421 ;; 'guix environment' tests rely on 'SHELL' having a
422 ;; correct value, so set it.
423 (setenv "SHELL" (which "sh"))))
424 (add-after 'install 'wrap-program
425 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
426 (define (search-input-directories dir)
427 (filter directory-exists?
428 (map (match-lambda
429 ((name . directory)
430 (string-append directory "/" dir)))
431 inputs)))
432 ;; Make sure the 'guix' command finds GnuTLS,
433 ;; Guile-JSON, and Guile-Git automatically.
434 (let* ((effective
435 (read-line
436 (open-pipe*
437 OPEN_READ
438 (search-input-file (or native-inputs inputs)
439 "bin/guile")
440 "-c" "(display (effective-version))")))
441 (path (search-input-directories
442 (string-append "share/guile/site/" effective)))
443 (gopath (search-input-directories
444 (string-append "lib/guile/" effective
445 "/site-ccache")))
446 (locpath (search-input-directory inputs "lib/locale")))
447
448 ;; Modify 'guix' directly instead of using
449 ;; 'wrap-program'. This avoids the indirection
450 ;; through Bash, which in turn avoids getting Bash's
451 ;; own locale warnings.
452 (substitute* (string-append #$output "/bin/guix")
453 (("!#")
454 (string-append
455 "!#\n\n"
456 (object->string
457 `(set! %load-path (append ',path %load-path)))
458 "\n"
459 (object->string
460 `(set! %load-compiled-path
461 (append ',gopath %load-compiled-path)))
462 "\n"
463 (object->string
464 `(let ((path (getenv "GUIX_LOCPATH")))
465 (setenv "GUIX_LOCPATH"
466 (if path
467 (string-append path ":" ,locpath)
468 ,locpath))))
469 "\n\n"))))))
470
471 ;; The 'guix' executable has 'OUT/libexec/guix/guile' as
472 ;; its shebang; that should remain unchanged, thus remove
473 ;; the 'patch-shebangs' phase, which would otherwise
474 ;; change it to 'GUILE/bin/guile'.
475 (delete 'patch-shebangs))))
476 (native-inputs
477 (append (if (target-hurd?)
478 '()
479 (list guile-avahi))
480 (list (libc-utf8-locales-for-target (%current-system))
481 pkg-config
482 ;; Guile libraries are needed here for cross-compilation.
483 guile-3.0-latest ;for faster builds
484 guile-gnutls
485 guile-gcrypt
486 guile-json-4
487 guile-lib
488 guile-sqlite3
489 guile-zlib
490 guile-lzlib
491 guile-zstd
492 guile-ssh
493 guile-git
494 guile-semver
495 ;; XXX: Keep the development inputs here even though
496 ;; they're unnecessary, just so that 'guix environment
497 ;; guix' always contains them.
498 autoconf
499 automake
500 gettext-minimal
501 texinfo
502 graphviz-minimal
503 font-ghostscript ;fonts for 'dot'
504 help2man
505 po4a-minimal)))
506 (inputs
507 (append (list bash-minimal
508 bzip2
509 gzip
510 sqlite
511 libgcrypt
512 zlib
513 guile-3.0-latest
514 ;; Some of the tests use "unshare" when it is available.
515 util-linux
516 ;; Tests also rely on these bootstrap executables.
517 (bootstrap-executable "bash" (%current-system) "bootstrap-bash")
518 (bootstrap-executable "mkdir" (%current-system) "bootstrap-mkdir")
519 (bootstrap-executable "tar" (%current-system) "bootstrap-tar")
520 (bootstrap-executable "xz" (%current-system) "bootstrap-xz")
521 disarchive ;for 'guix perform-download'
522 guile-bzip2 ;for Disarchive
523 guile-lzma ;for Disarchive
524 git-minimal ;for 'guix perform-download'
525 (libc-utf8-locales-for-target))
526 (if (target-linux?)
527 (list slirp4netns)
528 '())
529 ;; Many tests rely on the 'guile-bootstrap' package.
530 (cons*
531 (bootstrap-guile-origin (%current-system))
532 ;; On x86_64 a test needs the i686 Guile.
533 (if (and (not (%current-target-system))
534 (string=? (%current-system) "x86_64-linux"))
535 (list (bootstrap-guile-origin "i686-linux"))
536 '()))
537 (if (%current-target-system)
538 (list xz)
539 '())))
540 (propagated-inputs
541 (append (if (target-hurd?)
542 '()
543 ;; Avahi requires "glib" which doesn't cross-compile yet.
544 (list guile-avahi))
545 (list guile-gnutls
546 guile-gcrypt
547 guile-json-4
548 guile-lib
549 guile-semver
550 guile-sqlite3
551 guile-ssh
552 guile-git
553 guile-zlib
554 guile-lzlib
555 guile-zstd)))
556 (native-search-paths
557 (list (search-path-specification
558 (variable "GUIX_EXTENSIONS_PATH")
559 (files '("share/guix/extensions/1.5"
560 "share/guix/extensions"))) ;deprecated
561 ;; (guix git) and (guix build download) honor this variable whose
562 ;; name comes from OpenSSL.
563 $SSL_CERT_DIR))
564 (home-page "https://www.gnu.org/software/guix/")
565 (synopsis "Functional package manager for installed software packages and versions")
566 (description
567 "GNU Guix is a functional package manager for the GNU system, and is
568also a distribution thereof. It includes a virtual machine image. Besides
569the usual package management features, it also supports transactional
570upgrades and roll-backs, per-user profiles, and much more. It is based on
571the Nix package manager.")
572 (license license:gpl3+))))
573
574(define* (channel-source->package source #:key commit)
575 "Return a package for the given channel SOURCE, a lowerable object."
576 (package
577 (inherit guix)
578 (version (string-append (package-version guix) "."
579 (if commit (string-take commit 7) "")))
580 (build-system channel-build-system)
581 (arguments `(#:source ,source
582 #:commit ,commit))
583 (inputs '())
584 (native-inputs '())
585 (propagated-inputs '())))
586
587(export channel-source->package)
588
589(define-public guix-daemon
590 ;; This package is for internal consumption: it allows us to quickly build
591 ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
592 ;; pull'.
593 (package
594 (inherit guix)
595 (properties `((hidden? . #t)))
596 (name "guix-daemon")
597
598 ;; Use a minimum set of dependencies.
599 (native-inputs
600 (modify-inputs native-inputs
601 (delete "po4a" "graphviz" "font-ghostscript" "help2man")))
602 (inputs
603 (modify-inputs inputs
604 (delete (basename (bootstrap-guile-url-path (%current-system)))
605 (basename (bootstrap-guile-url-path "i686-linux"))
606 "util-linux")
607 (prepend guile-gnutls guile-git guile-json-4 guile-gcrypt)))
608
609 (propagated-inputs '())
610
611 (arguments
612 (substitute-keyword-arguments arguments
613 ((#:configure-flags flags '())
614 ;; Pretend we have those libraries; we don't actually need them.
615 #~(append #$flags
616 '("guix_cv_have_recent_guile_sqlite3=yes"
617 "guix_cv_have_recent_guile_ssh=yes")))
618 ((#:tests? #f #f)
619 #f)
620 ((#:phases phases '%standard-phases)
621 #~(modify-phases #$phases
622 (delete 'set-font-path)
623 (replace 'build
624 (lambda _
625 (invoke "make" "nix/libstore/schema.sql.hh")
626 (invoke "make" "-j" (number->string
627 (parallel-job-count))
628 "guix-daemon")))
629 (delete 'copy-bootstrap-guile)
630 (replace 'install
631 (lambda* (#:key outputs #:allow-other-keys)
632 (invoke "make" "install-binPROGRAMS")))
633 (delete 'wrap-program)))))))
634
635(define-public guix-minimal
636 ;; A version of Guix which is built with the minimal set of dependencies, as
637 ;; outlined in the README "Requirements" section. Intended as a CI job, so
638 ;; marked as hidden.
639 (hidden-package
640 (package
641 (inherit guix)
642 (name "guix-minimal")
643 (native-inputs
644 (modify-inputs native-inputs
645 (delete "guile-ssh")))
646 (propagated-inputs
647 (modify-inputs propagated-inputs
648 (delete "guile-ssh"))))))
649
650(define-public (guix-for-channels channels)
651 "Return a package corresponding to CHANNELS."
652 (package
653 (inherit guix)
654 (source (find guix-channel? channels))
655 (build-system channel-build-system)
656 (arguments
657 `(#:channels ,(remove guix-channel? channels)))
658 (inputs '())
659 (native-inputs '())
660 (propagated-inputs '())))
661
662(define-public current-guix-package
663 ;; This parameter allows callers to override the package that 'current-guix'
664 ;; returns. This is useful when 'current-guix' cannot compute it by itself,
665 ;; for instance because it's not running from a source code checkout.
666 ;;
667 ;; The default value is obtained by creating a package from the 'guix'
668 ;; channel returned by 'current-channels' or, if that's the empty list, that
669 ;; returned by 'repository->guix-channel' for the current directory (which
670 ;; assumes that we're running from a Git checkout). Delay computation so
671 ;; that the relevant modules can be loaded lazily.
672 (make-parameter
673 (delay (match (or (find guix-channel? (current-channels))
674 (repository->guix-channel
675 (current-source-directory)))
676 ((? channel? source)
677 (package
678 (inherit guix)
679 (source source)
680 (build-system channel-build-system)
681 (inputs '())
682 (native-inputs '())
683 (propagated-inputs '())))
684 (#f #f)))))
685
686(define-public current-guix
687 (lambda ()
688 "Return a package representing the currently-used Guix. It can be
689overridden by setting the 'current-guix-package' parameter."
690 (match (current-guix-package)
691 ((? promise? package) (force package))
692 (package package))))
693
694(define-public guix-icons
695 (package
696 (name "guix-icons")
697 (version "0.1")
698 (source %artwork-repository)
699 (build-system trivial-build-system)
700 (native-inputs
701 (list imagemagick))
702 (arguments
703 `(#:modules ((guix build utils)
704 (gnu build svg))
705
706 ;; There's no point in cross-compiling: a native build gives the same
707 ;; result, independently of the system type.
708 #:target #f
709
710 #:builder
711 ,(with-extensions (list guile-rsvg guile-cairo)
712 #~(begin
713 (use-modules (guix build utils)
714 (gnu build svg))
715 (let* ((logo (string-append #$source "/logo/Guix.svg"))
716 (logo-white
717 (string-append #$source
718 "/logo/Guix-horizontal-white.svg"))
719 (theme "hicolor")
720 (category "apps")
721 (sizes '(16 24 32 48 64 72 96 128 256 512 1024))
722 (icons
723 (string-append #$output "/share/icons/" theme))
724 (scalable-dir
725 (string-append icons "/scalable/" category)))
726 (setenv "XDG_CACHE_HOME" (getcwd))
727
728 ;; Create the scalable icon files.
729 (mkdir-p scalable-dir)
730 (copy-file logo
731 (string-append scalable-dir "/guix-icon.svg"))
732 (copy-file logo-white
733 (string-append scalable-dir
734 "/guix-white-icon.svg"))
735
736 ;; Create the fixed dimensions icon files.
737 (for-each
738 (lambda (size)
739 (let* ((dimension
740 (format #f "~ax~a" size size))
741 (file
742 (string-append icons "/" dimension "/" category
743 "/guix-icon.png")))
744 (mkdir-p (dirname file))
745 (svg->png logo file
746 #:width size
747 #:height size)))
748 sizes))))))
749 (home-page "https://www.gnu.org/software/guix/")
750 (synopsis "GNU Guix icons")
751 (description "This package contains GNU Guix icons organized according to
752the Icon Theme Specification. They can be used by applications querying the
753GTK icon cache for instance.")
754 (license license:cc-by-sa4.0)))
755
756(define-public guix-backgrounds
757 (package
758 (name "guix-backgrounds")
759 (version "0.1")
760 (source %artwork-repository)
761 (build-system copy-build-system)
762 (arguments
763 (list #:install-plan
764 #~'(("backgrounds" "share/backgrounds/guix" #:exclude ("README")))))
765 (home-page "https://www.gnu.org/software/guix/")
766 (synopsis "Background images for GNU Guix")
767 (description "The SVG files in this directory are intended to be used as
768backgrounds for different components of the GNU system like login managers and
769desktop environments. The backgrounds are available in different aspect ratios
770which are indicated in the file name.")
771 (license (list license:public-domain license:cc-by-sa4.0))))
772
773(define-public guix-diff-channels
774 (let ((commit "849c88bc08c2d225ce1ef0540b4096827ece31a1")
775 (revision "0"))
776 (package
777 (name "guix-diff-channels")
778 (version (git-version "0.0.0" revision commit))
779 (source
780 (origin
781 (method git-fetch)
782 (uri (git-reference
783 (url "https://codeberg.org/guix-extensions/diff-channels")
784 (commit commit)))
785 (file-name (git-file-name name version))
786 (sha256
787 (base32 "0jky6qjdi6kg8i8ffr310xvaqj1yqfv2i22jkzfqyznwj6ddzfa5"))))
788 (build-system guile-build-system)
789 (arguments
790 (list
791 #:scheme-file-regexp
792 #~(lambda (file stat)
793 (and ((file-name-predicate #$default-scheme-file-regexp)
794 file stat)
795 (not ((file-name-predicate "^(guix|channels|manifest)\\.scm$")
796 file stat))))
797 #:phases
798 #~(modify-phases %standard-phases
799 (add-after 'build 'move-to-extension-directory
800 (lambda _
801 (with-directory-excursion #$output
802 (mkdir-p "share/guix/extensions/1.5/guix/extensions")
803 (rename-file (string-append "share/guile/site/"
804 (target-guile-effective-version)
805 "/guix/extensions/diff-channels.scm")
806 "share/guix/extensions/1.5/guix/extensions/diff-channels.scm")))))))
807 (native-inputs (list guix bash-minimal))
808 (inputs (list (lookup-package-input guix "guile")))
809 (home-page "https://codeberg.org/guix-extensions/diff-channels")
810 (synopsis "Package differences between revisions")
811 (description
812 "This extension provides the @command{guix diff-channels} command,
813which allows you to lists the new/updated packages between two sets of
814channels.")
815 (license license:gpl3+))))
816
817(define-public guix-modules
818 (package
819 (name "guix-modules")
820 (version "0.4.0")
821 (home-page "https://codeberg.org/guix-science/guix-modules")
822 (source (origin
823 (method git-fetch)
824 (uri (git-reference (url home-page)
825 (commit (string-append "v" version))))
826 (file-name (string-append "guix-modules-" version "-checkout"))
827 (sha256
828 (base32
829 "1zmbd04y69gcak43rnizk8vjgpxhv5m67k3z4fk9cyiymcs872ky"))))
830 (build-system guile-build-system)
831 (arguments
832 '(#:phases (modify-phases %standard-phases
833 (add-after 'build 'move-to-extension-directory
834 (lambda* (#:key outputs #:allow-other-keys)
835 (let* ((out (assoc-ref outputs "out"))
836 (target (string-append
837 out
838 "/share/guix/extensions/module.scm")))
839 (mkdir-p (dirname target))
840 (rename-file (car (find-files out "module.scm"))
841 target)))))))
842 (native-inputs (list (lookup-package-input guix "guile") guix))
843 (synopsis "Generate environment modules from Guix packages")
844 (description
845 "Guix-Modules is an extension of Guix that provides a new @command{guix
846module} command. The @command{guix module create} sub-command creates
847@dfn{environment modules}, allowing you to manipulate software environments
848with the @command{module} command commonly found on @acronym{HPC,
849high-performance computing} clusters.")
850 (license license:gpl3+)))
851
852(define-public guix-explorer
853 (let let
854 ((commit "f821e3ee5d2118719b68574ce87c5bb6fc92acb2")
855 (revision "0"))
856 (package
857 (name "guix-explorer")
858 (version (git-version "0.0.0" revision commit))
859 (source
860 (origin
861 (method git-fetch)
862 (uri (git-reference
863 (url "https://codeberg.org/guix-extensions/explorer")
864 (commit commit)))
865 (file-name (git-file-name name version))
866 (sha256
867 (base32 "18nsciqfvi6i3kgah3jp702hx8kwy9cvd7z76wiy7rcvli0dv1xk"))))
868 (build-system guile-build-system)
869 (arguments
870 (list
871 #:scheme-file-regexp
872 #~(lambda (file stat)
873 (and ((file-name-predicate #$default-scheme-file-regexp)
874 file stat)
875 (not ((file-name-predicate "^(guix|channels|manifest)\\.scm$")
876 file stat))))
877 #:phases
878 #~(modify-phases %standard-phases
879 ;; During the compilation of the '.go' files the static content
880 ;; will be recorded to be in the build directory. Here we hard
881 ;; code it to be in the installation so it can be found at
882 ;; runtime.
883 (add-before 'build 'hard-code-static-content
884 (lambda _
885 (substitute* "guix/extensions/explore.scm"
886 (("\\(dirname \\(current-filename\\)\\)")
887 (string-append "\""
888 #$output "/share/guix/extensions/1.5/guix/extensions" "\"")))))
889 (add-after 'build 'move-to-extension-directory
890 (lambda _
891 (let ((extension-dir (string-append #$output
892 "/share/guix/extensions/1.5/guix/extensions")))
893 (mkdir-p extension-dir)
894 (rename-file (string-append #$output "/share/guile/site/"
895 (target-guile-effective-version)
896 "/guix/extensions/explore.scm")
897 (string-append extension-dir "/explore.scm"))
898 (for-each (lambda (file)
899 (install-file (string-append "guix/extensions/"
900 file) extension-dir))
901 '("code.css" "d3.v6.js" "graph.js" "style.css"))))))))
902 (native-inputs (list guix))
903 (inputs (list (lookup-package-input guix "guile")))
904 (home-page "https://codeberg.org/guix-extensions/explorer")
905 (synopsis "Interactively explore your Guix System configuration")
906 (description
907 "This extension provides the @command{guix explore} command, which
908allows you to navigate the services of your Guix System configuration and the
909connections among them.")
910 (license license:gpl3+))))
911
912(define-public guix-list
913 (let ((commit "2095ea1a578fdf219fd21b57f8d8ad1f8a1168c0")
914 (revision "0"))
915 (package
916 (name "guix-list")
917 (version (git-version "0.0.0" revision commit))
918 (source
919 (origin
920 (method git-fetch)
921 (uri (git-reference
922 (url "https://codeberg.org/guix-extensions/list")
923 (commit commit)))
924 (file-name (git-file-name name version))
925 (sha256
926 (base32 "1a8lpk3yfj895lld5gdwvgsvwvq74zgdrx511208dafr3ajyvy07"))))
927 (build-system guile-build-system)
928 (arguments
929 (list
930 #:scheme-file-regexp
931 #~(lambda (file stat)
932 (and ((file-name-predicate #$default-scheme-file-regexp)
933 file stat)
934 (not ((file-name-predicate "^(guix|channels|manifest)\\.scm$")
935 file stat))))
936 #:phases
937 #~(modify-phases %standard-phases
938 (add-after 'build 'move-to-extension-directory
939 (lambda _
940 (with-directory-excursion #$output
941 (mkdir-p "share/guix/extensions/1.5/guix/extensions")
942 (rename-file (string-append "share/guile/site/"
943 (target-guile-effective-version)
944 "/guix/extensions/list.scm")
945 "share/guix/extensions/1.5/guix/extensions/list.scm")))))))
946 (native-inputs (list guix bash-minimal))
947 (inputs (list (lookup-package-input guix "guile")))
948 (home-page "https://codeberg.org/guix-extensions/list")
949 (synopsis "Package differences between revisions")
950 (description
951 "This extension provides the @command{guix list} command, which allows
952you to list the new/updated packages between two sets of channels.")
953 (license license:gpl3+))))
954
955(define-public guix-pin
956 (let ((commit "327fbd349e97b71452ba91fdae5680c5af860107")
957 (revision "0"))
958 (package
959 (name "guix-pin")
960 (version (git-version "0.0.0" revision commit))
961 (source
962 (origin
963 (method git-fetch)
964 (uri (git-reference
965 (url "https://codeberg.org/guix-extensions/pin")
966 (commit commit)))
967 (file-name (git-file-name name version))
968 (sha256
969 (base32 "1i9926qzjvd3aslyk84b8r2sdbfqlm8mw0hkfd558bmkhamhyrs2"))))
970 (build-system guile-build-system)
971 (arguments
972 (list
973 #:scheme-file-regexp
974 #~(lambda (file stat)
975 (and ((file-name-predicate #$default-scheme-file-regexp)
976 file stat)
977 (not ((file-name-predicate "^(guix|channels|manifest)\\.scm$")
978 file stat))))
979 #:phases
980 #~(modify-phases %standard-phases
981 (add-after 'build 'move-to-extension-directory
982 (lambda _
983 (with-directory-excursion #$output
984 (mkdir-p "share/guix/extensions/1.5/guix/extensions")
985 (rename-file (string-append "share/guile/site/"
986 (target-guile-effective-version)
987 "/guix/extensions/pin.scm")
988 "share/guix/extensions/1.5/guix/extensions/pin.scm")))))))
989 (native-inputs (list guix bash-minimal))
990 (inputs (list (lookup-package-input guix "guile")))
991 (home-page "https://codeberg.org/guix-extensions/pin")
992 (synopsis "Pinpoint channels file to a specific commit")
993 (description
994 "This extension provides the @command{guix pin} command, which allows
995you to pinpoint a channels file to a specific commit.")
996 (license license:gpl3+))))
997
998(define-public guix-package-version-history
999 (let ((commit "e5dc46b7f1b944cde8cd964ac060510003cf45ee")
1000 (revision "0"))
1001 (package
1002 (name "guix-package-version-history")
1003 (version (git-version "0.0.0" revision commit))
1004 (source
1005 (origin
1006 (method git-fetch)
1007 (uri (git-reference
1008 (url
1009 "https://codeberg.org/guix-extensions/package-version-history.git")
1010 (commit commit)))
1011 (file-name (git-file-name name version))
1012 (sha256
1013 (base32 "0mqmk4fdrlhvv0ajx07180li53lam8pjrr8hryw2jzmh53df4j3s"))))
1014 (build-system guile-build-system)
1015 (arguments
1016 (list
1017 #:scheme-file-regexp
1018 #~(lambda (file stat)
1019 (and ((file-name-predicate #$default-scheme-file-regexp)
1020 file stat)
1021 (not ((file-name-predicate "^(guix|channels|manifest)\\.scm$")
1022 file stat))))
1023 #:phases
1024 #~(modify-phases %standard-phases
1025 (add-after 'build 'move-to-extension-directory
1026 (lambda _
1027 (with-directory-excursion #$output
1028 (mkdir-p "share/guix/extensions/1.5/guix/extensions")
1029 (rename-file (string-append "share/guile/site/"
1030 (target-guile-effective-version)
1031 "/guix/extensions/package-version-history.scm")
1032 "share/guix/extensions/1.5/guix/extensions/package-version-history.scm")))))))
1033 (native-inputs (list guix))
1034 (inputs (list (lookup-package-input guix "guile")))
1035 (home-page
1036 "https://codeberg.org/guix-extensions/package-version-history")
1037 (synopsis "Find commits providing a given package version")
1038 (description
1039 "This extension provides the @command{guix package-version-history}
1040command, which allows you to finds the commits providing a given package
1041version, or several package versions at once.")
1042 (license license:gpl3+))))
1043
1044(define-public guix-removal-reporter
1045 (package
1046 (name "guix-removal-reporter")
1047 (version "0.0.1")
1048 (source
1049 (origin
1050 (method git-fetch)
1051 (uri (git-reference
1052 (url "https://codeberg.org/guix-extensions/removal-reporter")
1053 (commit (string-append "v" version))))
1054 (file-name (git-file-name name version))
1055 (sha256
1056 (base32 "11lwqngwkbhk0qhfzmhg767grss6609jx2g2ix6va0jx424kbija"))))
1057 (build-system guile-build-system)
1058 (arguments
1059 (list
1060 #:scheme-file-regexp
1061 #~(lambda (file stat)
1062 (and ((file-name-predicate #$default-scheme-file-regexp)
1063 file stat)
1064 (not ((file-name-predicate "^(guix|channels|manifest)\\.scm$")
1065 file stat))))
1066 #:phases
1067 #~(modify-phases %standard-phases
1068 (add-after 'build 'move-to-extension-directory
1069 (lambda _
1070 (with-directory-excursion #$output
1071 (mkdir-p "share/guix/extensions/1.5/guix/extensions")
1072 (rename-file (string-append "share/guile/site/"
1073 (target-guile-effective-version)
1074 "/guix/extensions/removals.scm")
1075 "share/guix/extensions/1.5/guix/extensions/removals.scm")))))))
1076 (native-inputs (list guix))
1077 (inputs (list (lookup-package-input guix "guile")))
1078 (propagated-inputs (list guile-forgejo))
1079 (home-page "https://codeberg.org/guix-extensions/removal-reporter")
1080 (synopsis "Never miss an upcoming deprecation")
1081 (description
1082 "This extension provides the @command{guix removals} command, which
1083allows you to detect packages affected by future removals from Guix proper.")
1084 (license license:gpl3+)))
1085
1086(define-public toys
1087 (package
1088 (name "toys")
1089 (version "0.1.2")
1090 (source (origin
1091 (method git-fetch)
1092 (uri (git-reference
1093 (url "https://git.sr.ht/~whereiseveryone/toys")
1094 (commit (string-append "v" version))))
1095 (file-name (git-file-name name version))
1096 (sha256
1097 (base32
1098 "1lk5dd5ilicil580qxp8blprzall1nlwg10qqn2i28d53mja4c6h"))))
1099 (build-system guile-build-system)
1100 (arguments
1101 (list
1102 #:phases
1103 #~(modify-phases %standard-phases
1104 (add-after 'unpack 'set-load-paths-in-entry-point
1105 (lambda _
1106 (define load-path
1107 (cons (string-append #$output
1108 "/share/guile/site/"
1109 (target-guile-effective-version))
1110 (parse-path (getenv "GUILE_LOAD_PATH"))))
1111 (define load-compiled-path
1112 (cons (string-append #$output
1113 "/lib/guile/"
1114 (target-guile-effective-version)
1115 "/site-ccache")
1116 (parse-path (getenv "GUILE_LOAD_COMPILED_PATH"))))
1117 (define search-paths-header
1118 `(begin
1119 (set! %load-path
1120 (append (list ,@load-path) %load-path))
1121 (set! %load-compiled-path
1122 (append (list ,@load-compiled-path)
1123 %load-compiled-path))))
1124 (substitute* "guix/extensions/toys.scm"
1125 ((";;@load-paths@")
1126 (with-output-to-string (lambda () (write search-paths-header)))))))
1127 (add-after 'set-load-paths-in-entry-point 'register-guix-extension
1128 (lambda* (#:key outputs #:allow-other-keys)
1129 (let ((ext-path (string-append #$output "/share/guix/extensions")))
1130 (mkdir-p ext-path)
1131 (copy-recursively "guix/extensions" ext-path))))
1132 (add-after 'register-guix-extension 'clean-up
1133 (lambda* _
1134 (delete-file "channels.scm")
1135 (delete-file-recursively "guix"))))))
1136 (native-inputs (list guile-3.0-latest))
1137 (inputs
1138 (list guile-json-4
1139 guile-readline
1140 guile-sqlite3
1141 guix))
1142 (home-page "https://toys.whereis.social/")
1143 (synopsis "Search engine for Guix channels")
1144 (description "Toys is a search engine for collecting and displaying Guix
1145channel data found across the internet. Toys provides a command-line
1146interface for interacting with the application.")
1147 (license license:gpl3+)))
1148
1149(define-public guix-xsearch
1150 (package
1151 (name "guix-xsearch")
1152 (version "2.3")
1153 (source
1154 (origin
1155 (method git-fetch)
1156 (uri (git-reference
1157 (url "https://codeberg.org/Baleine/guix-xsearch.git")
1158 (commit version)))
1159 (file-name (git-file-name name version))
1160 (sha256
1161 (base32 "0id4g9slkciirmr442ygyb2044h3fhr5vavsy024g470qr6nz4vs"))))
1162 (build-system guile-build-system)
1163 (arguments
1164 (list
1165 #:source-directory "src"
1166 #:phases
1167 #~(modify-phases %standard-phases
1168 (add-after 'unpack 'set-load-paths-in-entry-point
1169 (lambda _
1170 (define load-path
1171 (cons (string-append #$output
1172 "/share/guile/site/"
1173 (target-guile-effective-version))
1174 (parse-path (getenv "GUILE_LOAD_PATH"))))
1175 (define load-compiled-path
1176 (cons (string-append #$output
1177 "/lib/guile/"
1178 (target-guile-effective-version)
1179 "/site-ccache")
1180 (parse-path (getenv "GUILE_LOAD_COMPILED_PATH"))))
1181 (define search-paths-header
1182 `(begin
1183 (set! %load-path
1184 (append (list ,@load-path) %load-path))
1185 (set! %load-compiled-path
1186 (append (list ,@load-compiled-path) %load-compiled-path))))
1187
1188 (substitute* "src/guix/extensions/xsearch.scm"
1189 ((";;@load-paths@")
1190 (with-output-to-string (lambda () (write search-paths-header)))))))
1191 (add-after 'build 'add-extension-to-search-path
1192 (lambda _
1193 (with-directory-excursion #$output
1194 (mkdir-p "share/guix/extensions")
1195 (symlink
1196 (string-append
1197 #$output
1198 "/share/guile/site/3.0/guix/extensions/xsearch.scm")
1199 "share/guix/extensions/xsearch.scm")))))))
1200 ;; Avoid setting guix as propagated so that we use the user’s profile.
1201 (native-inputs (list guile-3.0
1202 guile-xapian
1203 guix))
1204 (home-page "https://codeberg.org/Baleine/guix-xsearch")
1205 (synopsis "Extension for Guix to provide faster search using Xapian")
1206 (description
1207 "The Guix Xsearch extension is a new implementation of Guix search sped up
1208by using a Xapian cache.")
1209 (license (list license:gpl3+ license:cc0))))
1210
1211(define-public guix-extension-collection
1212 (package
1213 (name "guix-extension-collection")
1214 (version (package-version guix))
1215 (source
1216 #f)
1217 (build-system trivial-build-system)
1218 (arguments
1219 (list
1220 #:builder
1221 #~(mkdir #$output)))
1222 (propagated-inputs (list guix-compose
1223 guix-diff-channels
1224 guix-explorer
1225 guix-list
1226 guix-modules
1227 guix-package-version-history
1228 guix-pin
1229 guix-removal-reporter
1230 guix-xsearch
1231 toys))
1232 (home-page "https://codeberg.org/guix-extensions")
1233 (synopsis "Collection of extensions for Guix")
1234 (description
1235 "This meta-package bundles community-provided packages that extend Guix
1236with new @command{guix} commands you may find useful.")
1237 (license license:gpl3+)))
1238
1239(define-public meta-package-manager
1240 (package
1241 (name "meta-package-manager")
1242 (version "7.6.1")
1243 (source
1244 (origin
1245 (method git-fetch)
1246 (uri (git-reference
1247 (url "https://github.com/kdeldycke/meta-package-manager")
1248 (commit (string-append "v" version))))
1249 (file-name (git-file-name name version))
1250 (sha256
1251 (base32 "1kpqxygf4jkmyqyiqa457dnd46dv2b04w2d67hrp34cyh3slzy9z"))))
1252 (build-system pyproject-build-system)
1253 ;; Upstream uses uv-build which is not yet available in Guix.
1254 (arguments
1255 (list #:build-backend "setuptools.build_meta"))
1256 ;; python-pyyaml and python-tomlkit: tests/test_docs.py loads
1257 ;; docs/docs_update.py, which imports them.
1258 (native-inputs
1259 (list python-pytest
1260 python-pyyaml
1261 python-setuptools
1262 python-tomlkit))
1263 (propagated-inputs
1264 (list python-boltons
1265 python-click-extra
1266 python-extra-platforms
1267 python-packageurl
1268 python-tomli-w
1269 python-xmltodict))
1270 (home-page "https://kdeldycke.github.io/meta-package-manager/")
1271 (synopsis "Package managers abstraction and unification tool")
1272 (description
1273 "Meta Package Manager (mpm) is a @acronym{Command Line Interface, CLI}
1274that wraps multiple GNU/Linux package managers behind a unified interface.
1275It can list, search, install, upgrade, and remove packages across all detected
1276managers simultaneously. Output formats include tables, JSON, and CSV.")
1277 (license license:gpl2+)))
1278
1279
1280;;;
1281;;; Other tools.
1282;;;
1283
1284(define-public nix
1285 (package
1286 (name "nix")
1287 (version "2.32.8")
1288 (source
1289 (origin
1290 (method git-fetch)
1291 (uri (git-reference
1292 (url "https://github.com/NixOS/nix")
1293 (commit version)))
1294 (file-name (git-file-name name version))
1295 (sha256
1296 (base32 "0jdxj8d0gax5mycc05lw0igzvn43c21y8nkfsfbahhgxsgfnhgmy"))))
1297 (build-system meson-build-system)
1298 (arguments
1299 (list
1300 ;; Only run functional tests.
1301 #:configure-flags #~(list "-Dunit-tests=false")
1302 #:phases
1303 #~(modify-phases %standard-phases
1304 (add-after 'unpack 'skip-failing-tests
1305 (lambda _
1306 (substitute* "tests/functional/meson.build"
1307 (("subdir\\('git-hashing'\\)")
1308 "")
1309 (((string-append "'(" (string-join
1310 '("chroot-store"
1311 "debugger"
1312 "formatter"
1313 "lang"
1314 "nix-profile"
1315 "shell")
1316 "|") ")\\.sh',"))
1317 ""))
1318 (substitute* "tests/functional/flakes/meson.build"
1319 (((string-append "'(" (string-join
1320 '("commit-lock-file-summary"
1321 "config"
1322 "dubious-query"
1323 "edit"
1324 "non-flake-inputs"
1325 "shebang")
1326 "|") ")\\.sh',"))
1327 "")))))))
1328 (native-inputs
1329 (list bison
1330 cmake-minimal
1331 flex
1332 googletest
1333 jq
1334 man-db
1335 perl
1336 perl-dbd-sqlite
1337 pkg-config
1338 rapidcheck
1339 util-linux)) ; for unshare
1340 (inputs
1341 (append (list boost
1342 brotli
1343 bzip2
1344 curl
1345 editline
1346 libarchive
1347 libblake3
1348 libgc
1349 libgit2
1350 libseccomp
1351 libsodium
1352 lowdown
1353 nlohmann-json
1354 openssl
1355 sqlite
1356 toml11
1357 xz
1358 zlib)
1359 (if (or (target-x86-64?)
1360 (target-x86-32?))
1361 (list libcpuid)
1362 '())))
1363 (home-page "https://nixos.org/")
1364 (synopsis "The Nix package manager")
1365 (description
1366 "Nix is a purely functional package manager. This means that it treats
1367packages like values in purely functional programming languages such as
1368Haskell—they are built by functions that don't have side-effects, and they
1369never change after they have been built. Nix stores packages in the Nix
1370store, usually the directory /nix/store, where each package has its own unique
1371sub-directory.")
1372 (license license:lgpl2.1+)))
1373
1374(define-public stow
1375 (package
1376 (name "stow")
1377 (version "2.4.1")
1378 (source (origin
1379 (method url-fetch)
1380 (uri (string-append "mirror://gnu/stow/stow-"
1381 version ".tar.gz"))
1382 (sha256
1383 (base32
1384 "02vqi0mwvs3z3bgyn2411bgnjxlw2qip56kax2zh6wr0zisiwrra"))))
1385 (build-system gnu-build-system)
1386 (inputs
1387 (list perl))
1388 (native-inputs
1389 (list perl perl-test-simple perl-test-output perl-capture-tiny
1390 perl-io-stringy))
1391 (home-page "https://www.gnu.org/software/stow/")
1392 (synopsis "Managing installed software packages")
1393 (description
1394 "GNU Stow is a symlink manager. It generates symlinks to directories
1395of data and makes them appear to be merged into the same directory. It is
1396typically used for managing software packages installed from source, by
1397letting you install them apart in distinct directories and then create
1398symlinks to the files in a common directory such as /usr/local.")
1399 (license license:gpl3+)))
1400
1401(define-public xstow
1402 (package
1403 (name "xstow")
1404 (version "1.1.1")
1405 (source
1406 (origin
1407 (method git-fetch)
1408 (uri (git-reference
1409 (url "https://github.com/majorkingleo/xstow")
1410 (commit version)
1411 (recursive? #t)))
1412 (file-name (git-file-name name version))
1413 (sha256
1414 (base32 "0rnxb28mipfvg7g5lbjcsa2352yxvipgkc2mjyh70drr3jv7xkvk"))))
1415 (build-system gnu-build-system)
1416 (native-inputs (list autoconf automake))
1417 (synopsis "Replacement of GNU Stow written in C++")
1418 (description
1419 "XStow is a replacement of GNU Stow written in C++. It supports all
1420features of Stow with some extensions.")
1421 (home-page "https://xstow.sourceforge.net/")
1422 (license license:gpl2)))
1423
1424(define-public rpm
1425 (package
1426 (name "rpm")
1427 (version "4.20.1")
1428 (source (origin
1429 (method url-fetch)
1430 (uri (string-append "http://ftp.rpm.org/releases/rpm-"
1431 (version-major+minor version) ".x/rpm-"
1432 version ".tar.bz2"))
1433 (sha256
1434 (base32
1435 "0kqjc4k679h4s47gx4wxi049yvy9hpjcijvinqx56r43cc97wr2j"))))
1436 (outputs '("out" "debug"))
1437 (build-system cmake-build-system)
1438 (arguments
1439 (list
1440 #:tests? #f ;tests require FHS environment
1441 #:configure-flags
1442 #~(list
1443 ;; TODO: Add rpm-sequoia
1444 "-DWITH_SEQUOIA=OFF"
1445 #$@(if (this-package-native-input "rpmpgp_legacy")
1446 #~("-DWITH_LEGACY_OPENPGP=ON")
1447 #~()))
1448 #:phases
1449 #~(modify-phases %standard-phases
1450 (add-after 'unpack 'unpack-rpmpgp_legacy
1451 (lambda _
1452 (copy-recursively
1453 #$(this-package-native-input "rpmpgp_legacy")
1454 "rpmio/rpmpgp_legacy")))
1455 (add-after 'unpack 'fix-install
1456 (lambda _
1457 (let ((site
1458 (string-append
1459 #$output
1460 "/lib/python"
1461 #$(version-major+minor
1462 (package-version
1463 (this-package-native-input "python")))
1464 "/site-packages")))
1465 (substitute* "python/CMakeLists.txt"
1466 (("\\$[{]Python3_SITEARCH[}]")
1467 site)))
1468 (substitute* "plugins/CMakeLists.txt"
1469 (("\\$[{]dbus-1_DATADIR[}]")
1470 (string-append #$output "/share")))))
1471 (add-after 'install 'install-macros-file
1472 (lambda _
1473 (define macros (string-append #$output "/etc/rpm/macros"))
1474 (mkdir-p (dirname macros))
1475 (call-with-output-file macros
1476 (lambda (p)
1477 (format p "\
1478%_var /var
1479%_localstatedir /var~%"))))))))
1480 (native-inputs
1481 (list pkg-config
1482 python
1483 gettext-minimal
1484 (origin
1485 (method git-fetch)
1486 (uri (git-reference
1487 (url "https://github.com/rpm-software-management/rpmpgp_legacy")
1488 (commit "1.1")))
1489 (file-name "rpmpgp_legacy")
1490 (sha256
1491 (base32 "0z29bdjfd5p0ygn2g9w3xjc4fx4ba8rcikk28acjl7xwfgfsa4pd")))))
1492 (inputs
1493 (list bzip2
1494 readline
1495 file
1496 libarchive
1497 libgcrypt
1498 dbus
1499 lua
1500 sqlite
1501 xz
1502 zlib
1503 elfutils
1504 acl
1505 audit
1506 libselinux
1507 libcap
1508 `(,zstd "lib")))
1509 (propagated-inputs
1510 ;; popt is listed in the 'Requires' of rpm.pc.
1511 (list popt))
1512 (home-page "https://rpm.org/")
1513 (synopsis "The RPM Package Manager")
1514 (description
1515 "The RPM Package Manager (RPM) is a command-line driven package
1516management system capable of installing, uninstalling, verifying, querying,
1517and updating computer software packages. Each software package consists of an
1518archive of files along with information about the package like its version, a
1519description. There is also a library permitting developers to manage such
1520transactions from C or Python.")
1521
1522 ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
1523 (license license:gpl2+)))
1524
1525(define-public bffe
1526 (let ((commit "b268cb3cb146d57aa1a1a2f42c518d7b68096f94")
1527 (revision "21"))
1528 (package
1529 (name "bffe")
1530 (version (git-version "0" revision commit))
1531 (source (origin
1532 (method git-fetch)
1533 (uri (git-reference
1534 (url "https://codeberg.org/guix/bffe.git")
1535 (commit commit)))
1536 (sha256
1537 (base32
1538 "16v8sachbss3aaldgj2cmfp1mqhif8i39g5lmw76fxzvah9hz8j5"))
1539 (file-name (string-append name "-" version "-checkout"))))
1540 (build-system gnu-build-system)
1541 (native-inputs
1542 (list pkg-config
1543 autoconf
1544 automake
1545
1546 ;; Guile libraries are needed here for cross-compilation.
1547 guile-3.0-latest
1548 guile-gnutls
1549 guile-json-4
1550 guix
1551 guix-data-service
1552 guix-build-coordinator
1553 guile-fibers
1554 guile-knots
1555 guile-safsaf
1556 guile-pfds
1557 guile-prometheus
1558 guile-lib))
1559 (propagated-inputs
1560 (list guile-gnutls
1561 guile-json-4
1562 guix
1563 guix-data-service
1564 guix-build-coordinator
1565 guile-fibers
1566 guile-knots
1567 guile-safsaf
1568 guile-pfds
1569 guile-prometheus
1570 guile-lib))
1571 (home-page "https://codeberg.org/guix/bffe.git")
1572 (synopsis "Build Farm Front-end for Guix")
1573 (description
1574 "The BFFE of Build Farm Front-end is an experimental frontend for Guix
1575build farms. It works together with the Guix Data Service and Guix Build
1576Coordinator to submit builds and monitor the activity.
1577
1578It functions as a Guile library, with the @code{run-bffe-service} procedure in
1579the @code{(bffe)} module as the entry point.")
1580 (license license:gpl3+))))
1581
1582(define-public hatch
1583 (package
1584 (name "hatch")
1585 (version "1.16.4")
1586 (source
1587 (origin
1588 (method url-fetch)
1589 (uri (pypi-uri "hatch" version))
1590 (sha256
1591 (base32 "1ca8yipmgld1g9w3hxkbkgp6p7m7yi69c6045728kghlw0gi8f8m"))))
1592 (build-system pyproject-build-system)
1593 (arguments
1594 (list
1595 ;; tests: 1398 passed, 145 skipped
1596 #:test-flags
1597 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
1598 ;; XXX: The most of the tests in these files failed while
1599 ;; setting up local project or trying to access Network; check
1600 ;; if the rests of the tests may be preserved.
1601 "--ignore=tests/backend/builders/test_wheel.py"
1602 "--ignore=tests/backend/builders/test_custom.py"
1603 "--ignore=tests/backend/builders/test_sdist.py"
1604 "--ignore=tests/backend/metadata/test_spec.py"
1605 "--ignore=tests/backend/metadata/test_core.py"
1606 "--ignore=tests/cli/env/test_show.py"
1607 "--ignore=tests/env/plugin/test_interface.py"
1608 "--ignore=tests/cli/build/test_build.py"
1609 "--ignore=tests/cli/version/test_version.py"
1610 "--ignore=tests/cli/project/test_metadata.py"
1611 "--ignore=tests/workspaces/test_config.py"
1612 "--ignore=tests/cli/clean/test_clean.py")
1613 #:phases
1614 #~(modify-phases %standard-phases
1615 (add-before 'check 'pre-check
1616 (lambda _
1617 (setenv "HOME" "/tmp"))))))
1618 (native-inputs
1619 (list git-minimal/pinned
1620 nss-certs-for-test
1621 python-editables
1622 python-filelock
1623 python-flit-core
1624 python-hatch-vcs
1625 python-pytest
1626 python-pytest-mock
1627 python-pytest-xdist
1628 python-trustme))
1629 (inputs
1630 (list python-backports-zstd
1631 python-click
1632 python-hatchling
1633 python-httpx
1634 python-hyperlink
1635 python-keyring
1636 python-packaging
1637 python-pexpect
1638 python-platformdirs
1639 python-pyproject-hooks
1640 python-rich
1641 python-shellingham
1642 python-tomli-w
1643 python-tomlkit
1644 python-userpath
1645 python-virtualenv
1646 uv))
1647 (home-page "https://hatch.pypa.io/latest/")
1648 (synopsis "Python project management")
1649 (description "Hatch is a modern, extensible Python project manager.
1650
1651Features
1652
1653@itemize
1654@item Standardized build system with reproducible builds by default
1655@item Robust environment management with support for custom scripts
1656@item Configurable Python distribution management
1657@item Easy publishing to PyPI or other indexes
1658@item Version management
1659@item Configurable project generation with sane defaults
1660@item Responsive CLI, ~2-3x faster than equivalent tools
1661@end itemize")
1662 (license license:expat)))
1663
1664(define-public pipx
1665 (package
1666 (name "pipx")
1667 (version "1.15.0")
1668 (source
1669 (origin
1670 (method git-fetch)
1671 (uri (git-reference
1672 (url "https://github.com/pypa/pipx")
1673 (commit version)))
1674 (file-name (git-file-name name version))
1675 (sha256
1676 (base32 "14gldyr5cvqh3hw137sqjsbgkb8i53r9wm1bnvxhdijh6z7gdzg3"))))
1677 (build-system pyproject-build-system)
1678 (arguments
1679 (list
1680 ;; tests: 186 passed, 122 deselected
1681 #:test-flags
1682 #~(list "--net-pypiserver"
1683 #$@(map (lambda (file) (string-append "--ignore=tests/"
1684 file))
1685 ;; Tests try finding current Python version, install
1686 ;; additional packages, or compare strict version
1687 ;; constrains.
1688 (list "test_backends_install.py"
1689 "test_environment.py"
1690 "test_inject.py"
1691 "test_install.py"
1692 "test_install_all.py"
1693 "test_interpreter.py"
1694 "test_list.py"
1695 "test_pin.py"
1696 "test_pipx_metadata_file.py"
1697 "test_reinstall.py"
1698 "test_reinstall_all.py"
1699 "test_run.py"
1700 "test_runpip.py"
1701 "test_shared_libs.py"
1702 "test_standalone_interpreter.py"
1703 "test_uninject.py"
1704 "test_uninstall.py"
1705 "test_uninstall_all.py"
1706 "test_unpin.py"
1707 "test_upgrade.py"
1708 "test_upgrade_all.py"
1709 "test_upgrade_shared.py")))
1710 #:phases
1711 #~(modify-phases %standard-phases
1712 (add-before 'build 'set-home
1713 (lambda _
1714 (setenv "HOME" "/tmp"))))))
1715 (native-inputs
1716 (list python-hatch-vcs
1717 python-hatchling
1718 python-pytest
1719 python-pytest-mock))
1720 (inputs
1721 (list python-argcomplete
1722 python-colorama
1723 python-filelock
1724 python-packaging
1725 python-platformdirs
1726 python-userpath
1727 ;; [optional]
1728 uv))
1729 (home-page "https://pipx.pypa.io")
1730 (synopsis "Install and run Python applications in isolated environments")
1731 (description
1732 "@code{pipx} is a tool to help you install and run end-user applications
1733written in Python. It's roughly similar to JavaScript's @code{npx}, and
1734Trisquel's @code{apt}.")
1735 (license license:expat)))
1736
1737(define-public poetry
1738 (package
1739 (name "poetry")
1740 (version "2.3.4")
1741 (source
1742 (origin
1743 (method url-fetch)
1744 (uri (pypi-uri "poetry" version))
1745 (sha256
1746 (base32 "1bz3ilj0smxllm8x83jki4mlsh4v1jcadjnpg463csb56qnmg4xj"))))
1747 (build-system pyproject-build-system)
1748 (arguments
1749 (list
1750 ;; tests: 1295 passed, 9 skipped
1751 #:test-flags
1752 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
1753 ;; Network access is required.
1754 "--ignore=tests/console/commands/test_add.py"
1755 "--ignore=tests/console/commands/test_search.py"
1756 "--ignore=tests/console/commands/test_show.py"
1757 "--ignore=tests/installation/test_chef.py"
1758 "--ignore=tests/installation/test_chooser.py"
1759 "--ignore=tests/installation/test_executor.py"
1760 "--ignore=tests/installation/test_installer.py"
1761 "--ignore=tests/packages/test_direct_origin.py"
1762 "--ignore=tests/publishing/test_uploader.py"
1763 "--ignore=tests/puzzle/test_solver.py"
1764 "--ignore=tests/repositories/test_legacy_repository.py"
1765 "--ignore=tests/repositories/test_pypi_repository.py"
1766 "--ignore=tests/repositories/test_repository_pool.py"
1767 "--ignore=tests/utils/test_authenticator.py"
1768 "--ignore=tests/utils/test_dependency_specification.py"
1769 "--ignore=tests/utils/test_helpers.py"
1770 ;; XXX: Various incompatibility faileurs.
1771 "--ignore=tests/console/commands/env/test_activate.py"
1772 "--ignore=tests/console/commands/python/test_python_list.py"
1773 "--ignore=tests/console/commands/test_publish.py"
1774 "--ignore=tests/console/test_application_command_not_found.py"
1775 "--ignore=tests/inspection/test_info.py"
1776 "--ignore=tests/inspection/test_lazy_wheel.py"
1777 "--ignore=tests/puzzle/test_provider.py"
1778 "--ignore=tests/utils/env/python/test_manager.py"
1779 "--ignore=tests/utils/env/test_env.py"
1780 "--ignore=tests/utils/test_isolated_build.py"
1781 "--ignore=tests/vcs/git/test_backend.py"
1782 "-k" (string-join
1783 (list "not test_builder_setup_generation_runs_with_pip_editable"
1784 "test_check_invalid"
1785 "test_create_poetry_fails_on_invalid_configuration"
1786 "test_installer_with_pypi_repository"
1787 "test_shell"
1788 ;; RuntimeError: No lockfile found. Unable to read
1789 ;; locked packages
1790 "test_not_fresh_lock"
1791 ;; assert False is True
1792 "test_env_system_packages_are_relative_to_lib"
1793 ;; poetry.inspection.info.PackageInfoError: Unable
1794 ;; to determine package info for path
1795 "test_info_setup_complex_calls_script")
1796 " and not "))))
1797 (native-inputs
1798 (list nss-certs-for-test
1799 python-deepdiff
1800 python-pytest
1801 python-pytest-mock
1802 python-pytest-randomly
1803 python-pytest-xdist
1804 python-responses))
1805 (propagated-inputs
1806 (list python-cachecontrol
1807 python-cleo
1808 python-dulwich
1809 python-fastjsonschema
1810 python-findpython
1811 python-installer
1812 python-keyring
1813 python-packaging
1814 python-pbs-installer
1815 python-pendulum
1816 python-pkginfo
1817 python-platformdirs
1818 python-poetry-core
1819 python-pypa-build
1820 python-pyproject-hooks
1821 python-requests
1822 python-requests-toolbelt
1823 python-shellingham
1824 python-tomli
1825 python-tomlkit
1826 python-trove-classifiers
1827 python-virtualenv
1828 python-xattr))
1829 (home-page "https://python-poetry.org")
1830 (synopsis "Python dependency management and packaging made easy")
1831 (description
1832 "Poetry is a tool for dependency management and packaging in Python. It
1833allows you to declare the libraries your project depends on and it will
1834manage (install/update) them for you.")
1835 (license license:expat)))
1836
1837(define-public conda-bootstrap
1838 (package
1839 (name "conda-bootstrap")
1840 (version "25.9.1")
1841 (source
1842 (origin
1843 (method git-fetch)
1844 (uri (git-reference
1845 (url "https://github.com/conda/conda")
1846 (commit version)))
1847 (file-name (git-file-name name version))
1848 (sha256
1849 (base32 "1s8xxc8rfayfq6p3iwgp9v3hbanp30ciw7cznppn1qk1l9fy7nxj"))))
1850 (build-system pyproject-build-system)
1851 (arguments
1852 (list
1853 ;; tests: 1616 passed, 169 skipped, 12 xfailed, 673 warnings
1854 #:test-flags
1855 #~(list "-m" "not integration"
1856 "--numprocesses" (number->string (min 8 (parallel-job-count)))
1857 ;; Tests try to search for system level packages and fail with
1858 ;; error: The following packages are missing from the target
1859 ;; environment: patch, ca-certificates, zlib ...
1860 "--ignore=tests/cli/test_subcommands.py"
1861 ;; ModuleNotFoundError: No module named 'conda_libmamba_solver'
1862 "--ignore=tests/test_solvers.py"
1863 ;; Network access is required.
1864 "--ignore=tests/trust/test_signature_verification.py"
1865 "-k" (string-join
1866 ;; XXX: Issues salad: network access, can't detect Conda
1867 ;; environment, assertion failed; review if they may be
1868 ;; fixed.
1869 ;;
1870 ;; test_info_all: Fails due to parallel test interference.
1871 ;; test_notices_appear_once_when_running_decorated_commands
1872 ;; creates and deletes an environment named "notices_test".
1873 ;; When test_info_all runs in parallel, it invokes
1874 ;; "conda info --envs" (sees notices_test), then the other
1875 ;; test deletes it, then test_info_all invokes
1876 ;; "conda info --all" (doesn't see notices_test). The
1877 ;; assertion that these outputs match fails.
1878 (list "not test_PrefixData_return_value_contract"
1879 "test_info_all"
1880 "test__get_python_info"
1881 "test_auto_update_conda"
1882 "test_build_version_shows_as_changed "
1883 "test_cannot_rename_base_env_by_name"
1884 "test_cannot_rename_base_env_by_path"
1885 "test_conda_doctor_happy_path"
1886 "test_conda_doctor_happy_path_verbose"
1887 "test_conda_pip_interop_dependency_satisfied_by_pip"
1888 "test_create_env_json"
1889 "test_denylist_channels"
1890 "test_dont_update_packages_with_version_constraints"
1891 "test_environment"
1892 "test_exit_codes"
1893 "test_explicit_missing_cache_entries"
1894 "test_explicit_packages"
1895 "test_export_explicit_format_validation_errors"
1896 "test_export_ignore_channels_flag"
1897 "test_export_no_builds_format"
1898 "test_export_override_channels_and_ignore_channels_"
1899 "test_export_package_alphabetical_ordering"
1900 "test_export_pip_dependencies_handling"
1901 "test_export_preserves_channels_from_installed_"
1902 "test_export_regular_format_consistency"
1903 "test_export_with_pip_dependencies_integration"
1904 "test_extrapolate"
1905 "test_fields_all"
1906 "test_fields_invalid"
1907 "test_file_locking_not_supported"
1908 "test_file_locking_supported"
1909 "test_frozen_env_cep22"
1910 "test_get_packages_behavior_with_interoperability"
1911 "test_get_python_info"
1912 "test_health_check_ran"
1913 "test_info_envs_frozen"
1914 "test_install_1"
1915 "test_install_from_extracted_package"
1916 "test_installer_installs_explicit"
1917 "test_is_active_prefix"
1918 "test_list_all_known_prefixes_with_none_values_error"
1919 "test_list_argument_variations"
1920 "test_list_json"
1921 "test_list_package"
1922 "test_list_revisions"
1923 "test_load_entrypoints_importerror"
1924 "test_multiline_run_command"
1925 "test_post_solve_action_raises_exception"
1926 "test_post_solve_invoked"
1927 "test_post_transaction_raises_exception"
1928 "test_pre_solve_invoked"
1929 "test_pre_transaction_raises_exception"
1930 "test_print_unexpected_error_message_upload_2"
1931 "test_protected_dirs_error_for_rename"
1932 "test_remove_all"
1933 "test_remove_all_keep_env"
1934 "test_run_readonly_env"
1935 "test_run_returns_int"
1936 "test_run_returns_zero_errorlevel"
1937 "test_solve_1"
1938 "test_transaction_hooks_invoked"
1939 "test_update"
1940 "test_validate_subdir_config"
1941 "test_validate_subdir_config_invalid_subdir")
1942 " and not "))
1943 #:phases
1944 #~(modify-phases %standard-phases
1945 (add-after 'unpack 'correct-python-executable-name
1946 (lambda _
1947 (let ((python #$(this-package-input "python-wrapper")))
1948 (substitute* "conda/core/initialize.py"
1949 (("python_exe = join")
1950 (format #f "python_exe = \"~a/bin/python\" #"
1951 python))))))
1952 (add-after 'unpack 'do-not-use-python-root-as-prefix
1953 ;; XXX: Proper wrap CONDA_EXE, CONDA_ENVS_PATH, CONDA_PKGS_DIRS.
1954 (lambda _
1955 (let ((python #$(this-package-input "python-wrapper")))
1956 (substitute* "tests/core/test_initialize.py"
1957 (("\"\"\"\\) % conda_prefix")
1958 (format #f "\"\"\") % ~s" python))
1959 (("CONDA_PYTHON_EXE \"%s\"' % join\\(conda_prefix")
1960 (format #f "CONDA_PYTHON_EXE \"%s\"' % join(~s"
1961 python))
1962 (("conda_prefix = abspath\\(sys.prefix\\)")
1963 (format #f "conda_prefix = abspath(~s)" #$output)))
1964 (substitute* "conda/base/context.py"
1965 (("os.chdir\\(sys.prefix\\)")
1966 (format #f "os.chdir(~s)" #$output))
1967 (("sys.prefix, '.condarc'")
1968 (format #f "~s, '.condarc'" #$output))
1969 (("return abspath\\(sys.prefix\\)")
1970 (format #f "return abspath(~s)" #$output))
1971 (("os.path.join\\(sys.prefix, bin_dir, exe\\)")
1972 (format #f "\"~a/bin/conda\"" #$output))
1973 (("'CONDA_EXE', sys.executable")
1974 (format #f "'CONDA_EXE', \"~a/bin/conda\"" #$output))))))
1975 (add-after 'create-entrypoints 'init
1976 ;; This writes a whole bunch of shell initialization files to the
1977 ;; prefix directory. Many features of conda can only be used
1978 ;; after running "conda init".
1979 (lambda _
1980 (setenv "HOME" "/tmp")
1981 (invoke (string-append #$output "/bin/conda") "init")))
1982 (add-after 'unpack 'set-default-solver-to-classic
1983 (lambda _
1984 (substitute* "conda/base/constants.py"
1985 (("DEFAULT_SOLVER: Final = \"libmamba\"")
1986 "DEFAULT_SOLVER: Final = \"classic\""))))
1987 (add-before 'check 'pre-check
1988 (lambda _
1989 (setenv "CONDA_CLASSIC_SOLVER" "classic")
1990 (setenv "CONDA_DEFAULT_SOLVER" "classic")
1991 ;(setenv "CONDA_SOLVER" "classic")
1992 (setenv "CONDA_TEST_SOLVERS" "classic")
1993 (setenv "HOME" "/tmp")
1994 ;; Prevent tests from writing package cache to the output
1995 ;; directory, which would cause non-reproducible builds.
1996 (setenv "CONDA_PKGS_DIRS" "/tmp/conda-pkgs")))
1997 (add-after 'wrap 'wrap-executable
1998 ;; Conda normally resolves envs_dirs and pkgs_dirs relative
1999 ;; to sys.prefix, which on Guix points into the read-only
2000 ;; store. Redirect these to the user's home directory so
2001 ;; conda can create environments and cache packages. Use
2002 ;; suffix (not prefix) so that user-supplied values (e.g.
2003 ;; from "guix shell") take priority.
2004 (lambda _
2005 (wrap-program (string-append #$output "/bin/conda")
2006 `("CONDA_EXE" prefix
2007 (,(string-append #$output "/bin/conda")))
2008 `("CONDA_ENVS_PATH" suffix
2009 (,(string-append "$HOME/.conda/envs")))
2010 `("CONDA_PKGS_DIRS" suffix
2011 (,(string-append "$HOME/.conda/pkgs")))))))))
2012 (native-inputs
2013 (list nss-certs-for-test
2014 patchelf
2015 python-hatch-vcs
2016 python-anaconda-client
2017 python-flaky
2018 python-flask
2019 python-hatchling
2020 python-importlib-resources
2021 python-pexpect
2022 python-pytest
2023 python-pytest-mock
2024 python-pytest-rerunfailures
2025 python-pytest-split
2026 python-pytest-timeout
2027 python-pytest-xdist
2028 python-pytest-xprocess
2029 python-responses
2030 python-werkzeug))
2031 (inputs
2032 (list python-archspec
2033 python-boltons
2034 python-boto3
2035 python-charset-normalizer
2036 python-conda-package-handling
2037 python-conda-content-trust
2038 python-distro
2039 python-frozendict
2040 python-jsonpatch
2041 python-menuinst
2042 python-packaging
2043 python-platformdirs
2044 python-pluggy
2045 python-pycosat
2046 python-requests
2047 python-ruamel.yaml
2048 python-setuptools
2049 python-tqdm
2050 python-truststore
2051 python-wrapper ; for the tests test_init_all, test_initialize_dev_bash, test_initialize_dev_cmd_exe
2052 python-zstandard))
2053 (home-page "https://github.com/conda/conda")
2054 (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
2055 (description
2056 "Conda is a cross-platform, Python-agnostic binary package manager. It
2057is the package manager used by Anaconda installations, but it may be used for
2058other systems as well. Conda makes environments first-class citizens, making
2059it easy to create independent environments even for C libraries. Conda is
2060written entirely in Python.")
2061 (license license:bsd-3)))
2062
2063(define-public libsolv
2064 (package
2065 (name "libsolv")
2066 (version "0.7.35")
2067 (source
2068 (origin
2069 (method git-fetch)
2070 (uri (git-reference
2071 (url "https://github.com/openSUSE/libsolv")
2072 (commit version)))
2073 (file-name (git-file-name name version))
2074 (sha256
2075 (base32 "0gfzh9qzb7z4z7kr8fj0gafky0zvnrr6j6rb9fhmvcxvss6h4w8c"))
2076 (patches
2077 (search-patches "libsolv-conda-variant-priorization.patch"))))
2078 (build-system cmake-build-system)
2079 (arguments
2080 (list
2081 #:configure-flags
2082 #~(list "-DENABLE_CONDA=ON"
2083 "-DWITH_LIBXML2=ON"
2084 "-DENABLE_LZMA_COMPRESSION=ON"
2085 "-DENABLE_BZIP2_COMPRESSION=ON"
2086 "-DENABLE_ZSTD_COMPRESSION=ON"
2087 (string-append "-DZSTD_INCLUDE_DIRS="
2088 (assoc-ref %build-inputs "zstd")
2089 "/include")
2090 (string-append "-DZSTD_LIBRARY="
2091 (assoc-ref %build-inputs "zstd")
2092 "/lib/libzstd.so"))))
2093 (native-inputs
2094 (list pkg-config))
2095 (inputs
2096 (list libxml2
2097 xz
2098 bzip2
2099 `(,zstd "lib")))
2100 (home-page "https://github.com/openSUSE/libsolv")
2101 (synopsis "Library for solving package dependencies")
2102 (description
2103 "Libsolv is a library for solving package dependencies using a SAT solver.
2104It is used by the RPM package manager and the Mamba/Conda package managers.")
2105 (license license:bsd-3)))
2106
2107(define-public libmamba
2108 (package
2109 (name "libmamba")
2110 (version "2.3.2")
2111 (source
2112 (origin
2113 (method git-fetch)
2114 (uri (git-reference
2115 (url "https://github.com/mamba-org/mamba")
2116 (commit version)))
2117 (file-name (git-file-name name version))
2118 (sha256
2119 (base32 "10zvhm9mx4jcvkfqnzp1h1va48zfhz8wbpan1imq3b08493h53nz"))))
2120 (build-system cmake-build-system)
2121 (arguments
2122 (list
2123 #:configure-flags
2124 #~(list "-DBUILD_LIBMAMBA=ON"
2125 "-DBUILD_SHARED=ON"
2126 "-DBUILD_LIBMAMBA_TESTS=ON"
2127 "-DBUILD_LIBMAMBAPY=OFF"
2128 "-DBUILD_MICROMAMBA=OFF"
2129 "-DBUILD_MAMBA_PACKAGE=OFF")
2130 #:phases
2131 #~(modify-phases %standard-phases
2132 (add-after 'unpack 'add-find-zstd
2133 (lambda* (#:key inputs #:allow-other-keys)
2134 (mkdir-p "cmake/modules")
2135 ;; We build zstd from Makefile rather than cmake.
2136 ;; That means zstd doesn't install their zstdConfig.cmake.
2137 ;; Hence, we have to create our own cmake file in mamba to have
2138 ;; cmake find zstd.
2139 (with-output-to-file "cmake/modules/Findzstd.cmake"
2140 (lambda ()
2141 (display "
2142find_path(ZSTD_INCLUDE_DIR zstd.h)
2143find_library(ZSTD_LIBRARY NAMES zstd)
2144
2145if(ZSTD_INCLUDE_DIR AND ZSTD_LIBRARY)
2146 set(zstd_FOUND TRUE)
2147 if(NOT TARGET zstd::libzstd_shared)
2148 add_library(zstd::libzstd_shared UNKNOWN IMPORTED)
2149 set_target_properties(zstd::libzstd_shared PROPERTIES
2150 IMPORTED_LOCATION \"${ZSTD_LIBRARY}\"
2151 INTERFACE_INCLUDE_DIRECTORIES \"${ZSTD_INCLUDE_DIR}\")
2152 endif()
2153endif()
2154")))))
2155 (replace 'check
2156 (lambda* (#:key tests? #:allow-other-keys)
2157 (when tests?
2158 ;; Create fake root prefix and home for tests
2159 (let ((fake-root (string-append (getcwd) "/fake-mamba-root"))
2160 (fake-home (string-append (getcwd) "/fake-home")))
2161 (mkdir-p (string-append fake-root "/pkgs"))
2162 (mkdir-p (string-append fake-root "/envs"))
2163 (mkdir-p (string-append fake-root "/conda-meta"))
2164 (mkdir-p fake-home)
2165 (setenv "MAMBA_ROOT_PREFIX" fake-root)
2166 (setenv "HOME" fake-home))
2167 (invoke "./libmamba/tests/test_libmamba"
2168 "~which" ; expects /bin, /usr/bin
2169 "~user_home_dir" ; getpwuid fails in build container
2170 "~SubdirIndexLoader" ; downloads from conda.anaconda.org
2171 "~Create problem graph" ; downloads from conda.anaconda.org
2172 "~Test create_conda_forge utility" ; downloads from conda.anaconda.org
2173 "~Install highest priority package" ; timestamp is 0 in build env
2174 "~Use CA certificate from the root prefix" ; no CA certs in build env
2175 "~remote_yaml_file"))))))) ; downloads from raw.githubusercontent.com
2176 (native-inputs
2177 (list catch2-3.5 cli11 pkg-config python))
2178 (inputs
2179 (list curl
2180 libarchive
2181 libsolv
2182 openssl
2183 simdjson
2184 `(,zstd "lib")))
2185 (propagated-inputs
2186 (list fmt-12
2187 libexpected
2188 nlohmann-json
2189 reproc
2190 spdlog
2191 yaml-cpp))
2192 (home-page "https://github.com/mamba-org/mamba")
2193 (synopsis "Fast cross-platform package manager library")
2194 (description
2195 "Libmamba is a C++ library that provides fast package management
2196functionality. It uses libsolv for dependency resolution and is the
2197foundation for the Mamba package manager.")
2198 (license license:bsd-3)))
2199
2200(define-public lix
2201 (package
2202 (name "lix")
2203 (version "2.95.3")
2204 (source
2205 (origin
2206 (method git-fetch)
2207 (uri (git-reference
2208 (url "https://git.lix.systems/lix-project/lix")
2209 (commit version)))
2210 (file-name (git-file-name name version))
2211 (sha256
2212 (base32 "0clsq6l9v79nyggb12bz44zzpl6dh4haiv3q4kkik0hwlyr62j5c"))
2213 (modules '((guix build utils)))
2214 (snippet
2215 #~(begin
2216 (for-each delete-file-recursively
2217 '("bench"
2218 "maintainers"
2219 "subprojects/aws_sdk"
2220 "subprojects/lix-clang-tidy"
2221 "subprojects/nix-eval-jobs"
2222 "releng"))))))
2223 (build-system meson-build-system)
2224 (arguments
2225 (list
2226 #:modules '(((ice-9 match) #:select (match-lambda))
2227 ((ice-9 regex) #:select (match:substring))
2228 ((srfi srfi-2) #:select (and-let*))
2229 (guix build utils)
2230 (guix build meson-build-system))
2231 #:configure-flags
2232 ;; TODO: enable docs.
2233 #~(list "-Denable-docs=false"
2234 "--wrap-mode=nodownload" ;for cargo dependencies
2235 (string-append
2236 "-Dc_link_args=-Wl,-rpath="
2237 (string-join
2238 (map (lambda (file)
2239 (dirname (search-input-file
2240 %build-inputs
2241 (string-append "lib/"
2242 file))))
2243 (list "libbrotlidec.so"
2244 "libcurl.so"
2245 "libeditline.so"
2246 "libarchive.so"
2247 "libcpuid.so"
2248 "libseccomp.so"
2249 "liblowdown.so"
2250 "libcrypto.so"
2251 "libsqlite3.so"))
2252 ":")))
2253 #:test-options
2254 #~(list "--suite=check")
2255 #:phases
2256 #~(modify-phases %standard-phases
2257 (add-before 'configure 'set-cc-to-clang
2258 (lambda* (#:key inputs #:allow-other-keys)
2259 (setenv "CC" (search-input-file inputs "bin/clang"))
2260 (setenv "CXX" (search-input-file inputs "bin/clang++"))))
2261 (add-before 'configure 'prepare-cargo-deps
2262 (lambda* (#:key inputs #:allow-other-keys)
2263 (let ((vendor-dir (in-vicinity (getcwd) "vendor"))
2264 (crate-regex (make-regexp "rust-(.*)\\.tar\\.gz")))
2265 (for-each
2266 (match-lambda
2267 ((label . file)
2268 (and-let* ((crate-match (regexp-exec crate-regex label))
2269 (crate-name (match:substring crate-match 1))
2270 ((not (string-null? crate-name)))
2271 (target-dir (in-vicinity vendor-dir crate-name)))
2272 (mkdir-p target-dir)
2273 (invoke "tar" "xzf" file "-C" target-dir
2274 "--strip-components=1"))))
2275 inputs)
2276 (setenv "MESON_PACKAGE_CACHE_DIR" vendor-dir))))
2277 ;; Phase 'check' (unit tests): 6 test suites pass, 0 fail.
2278 ;; 49 individual tests skipped, ABI differences.
2279 (add-before 'check 'check-filter
2280 (lambda* (#:key tests? #:allow-other-keys)
2281 (when tests?
2282 (setenv "GTEST_FILTER"
2283 (string-join
2284 (list "-CommonProtoTest.*"
2285 "ServeProtoTest.*"
2286 "WorkerProtoTest.*"
2287 "StorePathTest.*"
2288 "DerivationTest.*"
2289 "PathTree.*"
2290 "*_RapidCheck.*") ":")))))
2291 ;; Phase 'check-install' (integration tests): 61 tests pass,
2292 ;; 9 skip (git/network/sandbox requirements), 0 fail.
2293 ;; The functional2 suite (1122 pytest-xdist tests)
2294 ;; requires network.
2295 (add-after 'unpack 'skip-tests-for-check-install
2296 (lambda* (#:key tests? #:allow-other-keys)
2297 (when tests?
2298 (substitute* "meson.build"
2299 (("subdir\\('tests/functional2'\\)")
2300 "# subdir('tests/functional2')"))
2301 (let ((failing-tests
2302 (string-join (list "'(repair-chroot"
2303 "build-remote-input-addressed"
2304 "build-remote-content-addressed-fixed"
2305 "pre-hook"
2306 "post-hook"
2307 "repl"
2308 "supplementary-groups"
2309 "shell"
2310 "mtls-substituter-ssl-client-cert)")
2311 "|")))
2312 (substitute* "tests/functional/meson.build"
2313 (((string-append failing-tests "\\.sh'")
2314 all)
2315 (string-append "# " all)))))))
2316 (add-after 'install 'prepare-check-install
2317 (lambda* (#:key tests? #:allow-other-keys)
2318 (when tests?
2319 (let* ((bin (string-append #$output "/bin:"))
2320 (libexe (string-append #$output "/libexe/lix:"))
2321 (path (string-append bin libexe
2322 (getenv "PATH")))
2323 (test-dir (string-append (getcwd)
2324 "/check-install-tests")))
2325 (mkdir-p test-dir)
2326 (setenv "DESTDIR" test-dir)
2327 (setenv "PATH" path)))))
2328 (add-after 'prepare-check-install 'check-install
2329 (lambda* (#:key tests? #:allow-other-keys)
2330 (when tests?
2331 (let ((orig-nix (getenv "NIX_STORE")))
2332 (setenv "NIX_STORE" "/nix/store")
2333 (invoke "meson"
2334 "test"
2335 "--suite=installcheck"
2336 "--print-errorlogs")
2337 (setenv "NIX_STORE" orig-nix))))))))
2338 (native-inputs
2339 (append
2340 (list capnproto-clang
2341 clang
2342 cmake-minimal
2343 coreutils-minimal ;For tests.
2344 jq
2345 lld
2346 llvm
2347 pkg-config
2348 rust
2349 `(,rust "cargo")
2350 xz) ;For tests.
2351 (cargo-inputs 'lix)))
2352 (inputs
2353 (list ;aws-sdk-cpp ;TODO: aws-sdk with openssl
2354 boost
2355 brotli
2356 busybox
2357 curl
2358 editline
2359 googletest
2360 libarchive
2361 libcpuid
2362 libseccomp
2363 lowdown
2364 ncurses
2365 nlohmann-json
2366 openssl
2367 pegtl
2368 python
2369 rapidcheck
2370 rust-cbindgen
2371 sqlite
2372 toml11))
2373 (propagated-inputs
2374 (list python-frontmatter
2375 python-pycapnp))
2376 (home-page "https://lix.systems")
2377 (synopsis "Nix compatible package manager")
2378 (description
2379 "The Lix package provides an independent reimplementation of the Nix package
2380management system, which is compatible with the original one.")
2381 (license license:gpl2)))
2382
2383(define-public python-gyp
2384 ;; Google does not release versions.
2385 (let ((commit "1615ec326858f8c2bd8f30b3a86ea71830409ce4")
2386 (revision "2"))
2387 (package
2388 (name "python-gyp")
2389 (version (git-version "0.0.0" revision commit))
2390 (source
2391 (origin
2392 (method git-fetch)
2393 (uri (git-reference
2394 (url "https://chromium.googlesource.com/external/gyp")
2395 (commit commit)))
2396 (file-name (git-file-name name version))
2397 (sha256
2398 (base32 "02rnmw7k2r33x5nbb5xb8kk170hk0s1wmwfqpsx4cij1wbi4bqhk"))))
2399 (build-system pyproject-build-system)
2400 (arguments
2401 (list
2402 #:test-flags
2403 #~(list "--ignore-glob=test/win/**/*.py")
2404 #:phases
2405 #~(modify-phases %standard-phases
2406 (add-after 'unpack 'remove-six-requirements
2407 (lambda _
2408 (substitute* "pylib/gyp/generator/ninja.py"
2409 (("six\\.ensure_binary\\(outputs\\[0\\]\\)")
2410 "outputs[0].encode('utf-8')")
2411 (("import six")
2412 ""))
2413 (substitute* '("pylib/gyp/common.py"
2414 "pylib/gyp/msvs_emulation.py"
2415 "test/lib/TestGyp.py")
2416 (("from six\\.moves import collections_abc")
2417 "import collections")
2418 (("collections_abc")
2419 "collections.abc"))))
2420 (add-after 'unpack 'python-3.12-compatibility
2421 (lambda _
2422 (substitute* "pylib/gyp/input_test.py"
2423 (("assertEquals") "assertEqual"))))
2424 (add-before 'check 'configure-tests
2425 (lambda _
2426 (setenv "PYTHONPATH"
2427 (string-append (getcwd) "/test/lib:"
2428 (getenv "GUIX_PYTHONPATH"))))))))
2429 (native-inputs (list python-pytest python-setuptools))
2430 (home-page "https://gyp.gsrc.io/")
2431 (synopsis "GYP is a Meta-Build system")
2432 (description
2433 "GYP builds build systems for large, cross platform applications.
2434It can be used to generate XCode projects, Visual Studio projects, Ninja build
2435files, and Makefiles.")
2436 (license license:bsd-3))))
2437
2438(define-public python-libmambapy
2439 (package
2440 (inherit libmamba)
2441 (name "python-libmambapy")
2442 (build-system pyproject-build-system)
2443 (arguments
2444 (list
2445 #:test-flags
2446 #~(list "tests/")
2447 #:phases
2448 #~(modify-phases %standard-phases
2449 (add-after 'unpack 'chdir
2450 (lambda _
2451 (chdir "libmambapy")))
2452 (add-before 'build 'set-cmake-prefix-path
2453 (lambda* (#:key inputs #:allow-other-keys)
2454 (setenv "CMAKE_PREFIX_PATH"
2455 (string-append (assoc-ref inputs "libmamba")
2456 ":" (or (getenv "CMAKE_PREFIX_PATH") ""))))))))
2457 (native-inputs
2458 (list cmake-minimal
2459 ninja
2460 pkg-config
2461 pybind11-2
2462 python-scikit-build
2463 python-pytest
2464 python-setuptools))
2465 (inputs
2466 (list libmamba))
2467 (home-page "https://github.com/mamba-org/mamba")
2468 (synopsis "Python bindings for libmamba")
2469 (description
2470 "Libmambapy provides Python bindings for the libmamba library,
2471enabling fast package management functionality in Python applications.")
2472 (license license:bsd-3)))
2473
2474(define-public python-conda-libmamba-solver
2475 (package
2476 (name "python-conda-libmamba-solver")
2477 (version "25.11.0")
2478 (source
2479 (origin
2480 (method git-fetch)
2481 (uri (git-reference
2482 (url "https://github.com/conda/conda-libmamba-solver")
2483 (commit version)))
2484 (file-name (git-file-name name version))
2485 (sha256
2486 (base32 "0vzynzpkhi90bydg2azvi95siq3f1csda2sv9yffhxpcv51v12dp"))))
2487 (build-system pyproject-build-system)
2488 (arguments
2489 (list
2490 ;; Most tests require network access to fetch conda channels/packages.
2491 #:test-flags
2492 #~(list "--ignore=tests/test_channels.py" ; network: fetch channels
2493 "--ignore=tests/test_downstream.py" ; network: conda-build
2494 "--ignore=tests/test_index.py" ; network: channel index
2495 "--ignore=tests/test_performance.py" ; commercial codspeed service
2496 "--ignore=tests/test_repoquery.py" ; network: repo queries
2497 "--ignore=tests/test_shards.py" ; network: shard fetching
2498 "--ignore=tests/test_shards_subset.py" ; network: shard ops
2499 "--ignore=tests/test_solver.py" ; network: solver
2500 "--ignore=tests/test_solver_differences.py" ; network: solver
2501 "--ignore=tests/test_workarounds.py") ; network: workarounds
2502 #:phases
2503 #~(modify-phases %standard-phases
2504 (add-before 'check 'set-home
2505 (lambda _
2506 (setenv "HOME" "/tmp"))))))
2507 (propagated-inputs
2508 (list python-boltons
2509 python-libmambapy
2510 python-msgpack
2511 python-requests
2512 python-zstandard))
2513 (native-inputs
2514 (list conda-bootstrap ; For sanity-check (imports conda)
2515 ;python-conda-index
2516 python-hatchling
2517 python-hatch-vcs
2518 python-pytest
2519 python-pytest-xprocess))
2520 ;; We avoid propagating conda-bootstrap's dependencies in conda-bootstrap.
2521 ;; This means we have to repeat conda-bootstrap's dependencies here.
2522 (inputs
2523 (package-inputs conda-bootstrap))
2524 (home-page "https://github.com/conda/conda-libmamba-solver")
2525 (synopsis "Fast Mamba solver for Conda")
2526 (description
2527 "The conda-libmamba-solver package provides a fast solver backend for
2528Conda based on the libmamba library. It significantly speeds up dependency
2529resolution compared to the classic solver.")
2530 (license license:bsd-3)))
2531
2532(define-public conda
2533 (package
2534 (inherit conda-bootstrap)
2535 (name "conda")
2536 (version "25.9.1")
2537 (source
2538 (origin
2539 (method git-fetch)
2540 (uri (git-reference
2541 (url "https://github.com/conda/conda")
2542 (commit version)))
2543 (file-name (git-file-name name version))
2544 (sha256
2545 (base32 "1s8xxc8rfayfq6p3iwgp9v3hbanp30ciw7cznppn1qk1l9fy7nxj"))
2546 (patches
2547 (search-patches "conda-fix-plugin-settings-test.patch"
2548 "conda-fix-cross-platform-export-tests.patch"))))
2549 (arguments
2550 (substitute-keyword-arguments arguments
2551 ((#:phases phases)
2552 #~(modify-phases #$phases
2553 ;; Remove the patch that forces classic solver - we have libmamba
2554 (delete 'set-default-solver-to-classic)
2555 ;; Replace pre-check to not force classic solver
2556 (replace 'pre-check
2557 (lambda _
2558 (setenv "HOME" "/tmp")
2559 ;; Prevent tests from writing package cache to the output
2560 ;; directory, which would cause non-reproducible builds.
2561 (setenv "CONDA_PKGS_DIRS" "/tmp/conda-pkgs")))))))
2562 (propagated-inputs
2563 (modify-inputs propagated-inputs
2564 (prepend python-conda-libmamba-solver)))))
2565
2566(define-public conan
2567 (package
2568 (name "conan")
2569 (version "2.24.0")
2570 (source
2571 (origin
2572 (method git-fetch)
2573 (uri (git-reference
2574 (url "https://github.com/conan-io/conan")
2575 (commit version)))
2576 (file-name (git-file-name name version))
2577 (sha256
2578 (base32 "1i5azy26nd9klf9k23dz9mq2h1nlfzmrnq02983q5ql7gnn5gzwf"))))
2579 (build-system pyproject-build-system)
2580 (arguments
2581 (list
2582 ;; tests: 1500 passed, 11 skipped
2583 #:test-flags
2584 #~(list "-m" "not slow and not docker_runner and not artifactory_ready"
2585 "--numprocesses" (number->string (min 8 (parallel-job-count)))
2586 ;; XXX: Run only unittests, maybe try to include integration and
2587 ;; functional as well when all failing tests are stabilized.
2588 "--ignore=test/functional/"
2589 "--ignore=test/integration/"
2590 "--ignore=test/performance/"
2591 ;; One test errors with assertion not equal.
2592 (string-append "--deselect=test/unittests/tools/env/"
2593 "test_env_files.py::test_env_files_sh[None]"))
2594 #:phases
2595 #~(modify-phases %standard-phases
2596 (add-after 'unpack 'patch-paths
2597 (lambda* (#:key inputs #:allow-other-keys)
2598 ;; It seems that PATH is manipulated, as printenv is not found
2599 ;; during tests. Patch in its exact location.
2600 (substitute* "conan/tools/env/environment.py"
2601 (("printenv")
2602 (search-input-file inputs "bin/printenv")))))
2603 (add-after 'unpack 'use-current-cmake-for-tests
2604 (lambda _
2605 (substitute* (find-files "test" "\\.py$")
2606 (("@pytest.mark.tool\\(\"cmake\", \".*\")")
2607 "@pytest.mark.tool(\"cmake\")"))))
2608 (add-before 'check 'configure-tests
2609 (lambda* (#:key tests? #:allow-other-keys)
2610 (when tests?
2611 (setenv "CONFIG_SHELL" (which "sh"))
2612 (setenv "PATH" (string-append (getenv "PATH") ":"
2613 #$output "/bin"))))))))
2614 (native-inputs
2615 (list autoconf-wrapper
2616 automake
2617 cmake-minimal
2618 git-minimal/pinned
2619 libtool
2620 meson
2621 ninja
2622 pkg-config
2623 python-bottle
2624 python-mock
2625 python-parameterized
2626 python-pytest-8
2627 python-pytest-xdist
2628 python-setuptools
2629 python-webtest
2630 which))
2631 (inputs
2632 (list coreutils ;for printenv
2633 python-colorama
2634 python-dateutil
2635 python-distro
2636 python-fasteners
2637 python-jinja2
2638 python-patch-ng
2639 python-pyyaml
2640 python-requests
2641 python-urllib3
2642 ;; [server]
2643 python-bottle
2644 python-pluginbase
2645 python-pyjwt))
2646 (home-page "https://conan.io")
2647 (synopsis "Decentralized C/C++ package manager")
2648 (description "Conan is a package manager for C and C++ developers that
2649boasts the following features:
2650@itemize
2651@item
2652It is fully decentralized. Users can host their packages on their own private
2653servers.
2654@item
2655It can create, upload and download binaries for any configuration and
2656platform, including cross-compiled ones.
2657@item
2658It integrates with any build system, including CMake, Makefiles, Meson, etc.
2659@item
2660It is extensible; its Python-based recipes, together with extensions points
2661allow for great power and flexibility.
2662@end itemize")
2663 (license license:expat)))
2664
2665(define-public gwl
2666 (package
2667 (name "gwl")
2668 (version "0.5.1")
2669 (source (origin
2670 (method url-fetch)
2671 (uri (string-append "mirror://gnu/gwl/gwl-" version ".tar.gz"))
2672 (sha256
2673 (base32
2674 "08h76ib7hmqyj354aazxqyz0galhywz4093f8hc4py7hbg0rcm27"))))
2675 (build-system gnu-build-system)
2676 (arguments
2677 `(#:parallel-build? #false ; for reproducibility
2678 #:make-flags
2679 '("GUILE_AUTO_COMPILE=0" "GWL_SKIP_INTEGRATION_TESTS=1")
2680 #:phases
2681 (modify-phases %standard-phases
2682 (add-after 'unpack 'disable-test
2683 (lambda _
2684 ;; This test loads a workflow, which requires a working Guix installation.
2685 (substitute* "tests/cache.scm"
2686 (("\\(test-assert \"workflows with same file name have different cache prefixes\"" m)
2687 (string-append "#;" m))))))))
2688 (native-inputs
2689 (list autoconf automake pkg-config texinfo graphviz))
2690 (inputs
2691 (let ((p (package-input-rewriting
2692 `((,guile-3.0 . ,guile-3.0-latest))
2693 #:deep? #false)))
2694 (list guix
2695 guile-3.0-latest
2696 (p guile-commonmark)
2697 (p guile-config)
2698 (p guile-drmaa)
2699 (p guile-gcrypt)
2700 (p guile-pfds)
2701 (p guile-syntax-highlight)
2702 (p guile-wisp))))
2703 (home-page "https://workflows.guix.info")
2704 (synopsis "Workflow management extension for GNU Guix")
2705 (description "The @dfn{Guix Workflow Language} (GWL) provides an
2706extension to GNU Guix's declarative language for package management to
2707automate the execution of programs in scientific workflows. The GWL
2708can use process engines to integrate with various computing
2709environments.")
2710 ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
2711 ;; the web interface modules in gwl/ are licensed AGPL3+,
2712 ;; and the fonts included in this package are licensed OFL1.1.
2713 (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
2714
2715(define-public gwl/next
2716 (let ((commit "343a454a427ae049cc0ac5fc5d6de94ebe5d65d2")
2717 (revision "0"))
2718 (package
2719 (inherit gwl)
2720 (name "gwl-next")
2721 (version (git-version "0.5.1" revision commit))
2722 (source (origin
2723 (method git-fetch)
2724 (uri (git-reference
2725 (url "https://git.savannah.gnu.org/git/gwl.git")
2726 (commit commit)))
2727 (file-name (git-file-name name version))
2728 (sha256
2729 (base32
2730 "153bgcjqw6jp0yl0vj0k67k9c8lw82vac6b0cnacrjrcb24lcpdq")))))))
2731
2732(define-public guix-build-coordinator
2733 (let ((commit "22988c0ae967e78de408d5160bda895caf5d8fee")
2734 (revision "145"))
2735 (package
2736 (name "guix-build-coordinator")
2737 (version (git-version "0" revision commit))
2738 (source (origin
2739 (method git-fetch)
2740 (uri (git-reference
2741 (url "https://codeberg.org/guix/build-coordinator.git")
2742 (commit commit)))
2743 (sha256
2744 (base32
2745 "11in6xc4s992yh7jyp72kpk1ls2ydll29zwz3ja6135gqwrj3f6x"))
2746 (file-name (string-append name "-" version "-checkout"))))
2747 (build-system gnu-build-system)
2748 (arguments
2749 (list
2750 #:modules `(((guix build guile-build-system)
2751 #:select (target-guile-effective-version))
2752 ,@%default-gnu-modules)
2753 #:imported-modules `((guix build guile-build-system)
2754 ,@%default-gnu-imported-modules)
2755 #:phases
2756 #~(modify-phases %standard-phases
2757 (add-before 'build 'set-GUILE_AUTO_COMPILE
2758 (lambda _
2759 ;; To avoid warnings relating to 'guild'.
2760 (setenv "GUILE_AUTO_COMPILE" "0")))
2761 (add-after 'install 'wrap-executable
2762 (lambda* (#:key inputs outputs target #:allow-other-keys)
2763 (let* ((out (assoc-ref outputs "out"))
2764 (bin (string-append out "/bin"))
2765 (guile (assoc-ref inputs "guile"))
2766 (version (target-guile-effective-version))
2767 (scm (string-append out "/share/guile/site/" version))
2768 (go (string-append out "/lib/guile/" version "/site-ccache")))
2769 (for-each
2770 (lambda (file)
2771 (simple-format (current-error-port) "wrapping: ~A\n" file)
2772 (let ((guile-inputs (list
2773 "guile-json"
2774 "guile-gcrypt"
2775 "guix"
2776 "guile-prometheus"
2777 "guile-lib"
2778 "guile-lzlib"
2779 "guile-zlib"
2780 "guile-sqlite3"
2781 "guile-gnutls"
2782 #$@(if (target-hurd?)
2783 '()
2784 '("guile-fibers"
2785 "guile-knots")))))
2786 (wrap-program file
2787 `("PATH" ":" prefix
2788 (,bin
2789 ;; Support building without sqitch as an input, as it
2790 ;; can't be cross-compiled yet
2791 ,@(or (and=> (assoc-ref inputs "sqitch")
2792 list)
2793 '())))
2794 `("GUIX_LOCPATH" ":" prefix
2795 (,(string-append (assoc-ref inputs "glibc-utf8-locales")
2796 "/lib/locale")))
2797 `("GUILE_LOAD_PATH" ":" prefix
2798 (,scm ,(string-join
2799 (map (lambda (input)
2800 (simple-format
2801 #f "~A/share/guile/site/~A"
2802 (assoc-ref inputs input)
2803 version))
2804 guile-inputs)
2805 ":")))
2806 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
2807 (,go ,(string-join
2808 (map (lambda (input)
2809 (simple-format
2810 #f "~A/lib/guile/~A/site-ccache"
2811 (assoc-ref inputs input)
2812 version))
2813 guile-inputs)
2814 ":"))))))
2815 (find-files bin)))))
2816 (delete 'strip)))) ; As the .go files aren't compatible
2817 (native-inputs
2818 (list pkg-config
2819 autoconf
2820 automake
2821 guile-gnutls
2822
2823 ;; Guile libraries are needed here for cross-compilation.
2824 guile-json-4
2825 guile-gcrypt
2826 guix
2827 guile-prometheus
2828 guile-fibers
2829 guile-knots
2830 guile-lib
2831 guile-3.0-latest))
2832 (inputs
2833 (list guile-3.0-latest
2834 sqlite-next
2835 bash-minimal
2836 (libc-utf8-locales-for-target)
2837 sqitch))
2838 (propagated-inputs
2839 (list guile-prometheus
2840 guile-gcrypt
2841 guile-json-4
2842 guile-lib
2843 guile-lzlib
2844 guile-zlib
2845 guile-sqlite3
2846 guix
2847 guile-gnutls
2848 guile-fibers
2849 guile-knots))
2850 (home-page "https://codeberg.org/guix/build-coordinator")
2851 (synopsis "Tool to help build derivations")
2852 (description
2853 "The Guix Build Coordinator helps with performing lots of builds across
2854potentially many machines, and with doing something with the results and
2855outputs of those builds.")
2856 (license license:gpl3+))))
2857
2858(define-public guix-build-coordinator/agent-only
2859 (package
2860 (inherit guix-build-coordinator)
2861 (name "guix-build-coordinator-agent-only")
2862 (arguments
2863 (substitute-keyword-arguments arguments
2864 ((#:phases phases #~%standard-phases)
2865 #~(modify-phases #$phases
2866 (add-after 'install 'strip-non-agent-files
2867 (lambda _
2868 (delete-file-recursively
2869 (string-append #$output "/share/guix-build-coordinator"))
2870 (delete-file
2871 (string-append #$output "/bin/guix-build-coordinator"))))))))
2872 (native-inputs
2873 (list pkg-config
2874 autoconf
2875 automake
2876 guile-gnutls
2877
2878 ;; Guile libraries are needed here for cross-compilation.
2879 guile-json-4
2880 guile-gcrypt
2881 guix
2882 guile-prometheus
2883 guile-lib
2884 guile-3.0-latest))
2885 (inputs
2886 (list guile-3.0-latest
2887 guix
2888 guile-prometheus
2889 guile-gcrypt
2890 guile-json-4
2891 guile-lib
2892 guile-lzlib
2893 guile-zlib
2894 guile-gnutls
2895 bash-minimal
2896 (libc-utf8-locales-for-target)))
2897 (propagated-inputs
2898 '())
2899 (description
2900 "The Guix Build Coordinator helps with performing lots of builds across
2901potentially many machines, and with doing something with the results and
2902outputs of those builds.
2903
2904This package just includes the agent component.")))
2905
2906;; XXX: Maybe move to jupyter module.
2907(define-public guix-jupyter
2908 (package
2909 (name "guix-jupyter")
2910 (version "0.3.1")
2911 (home-page "https://codeberg.org/guix-science/guix-jupyter")
2912 (source (origin
2913 (method git-fetch)
2914 (uri (git-reference (url home-page)
2915 (commit (string-append "v" version))))
2916 (sha256
2917 (base32
2918 "1yvrmaj4qcb9vn2nfjz1q0cil830hvmxpp8cgi76aylbnv36aask"))
2919 (file-name (string-append "guix-jupyter-" version "-checkout"))))
2920 (build-system gnu-build-system)
2921 (arguments
2922 `(#:modules ((srfi srfi-26)
2923 (ice-9 match)
2924 (ice-9 popen)
2925 (ice-9 rdelim)
2926 (guix build utils)
2927 (guix build gnu-build-system))
2928
2929 #:phases
2930 (modify-phases %standard-phases
2931 (add-after 'install 'sed-kernel-json
2932 (lambda* (#:key inputs outputs #:allow-other-keys)
2933 (let* ((out (assoc-ref outputs "out"))
2934 (guix (assoc-ref inputs "guix"))
2935 (guile (assoc-ref inputs "guile"))
2936 (json (assoc-ref inputs "guile-json"))
2937 (git (assoc-ref inputs "guile-git"))
2938 (bs (assoc-ref inputs "guile-bytestructures"))
2939 (s-zmq (assoc-ref inputs "guile-simple-zmq"))
2940 (gcrypt (assoc-ref inputs "guile-gcrypt"))
2941 (deps (list out s-zmq guix json git bs gcrypt))
2942 (effective
2943 (read-line
2944 (open-pipe* OPEN_READ
2945 (string-append guile "/bin/guile")
2946 "-c" "(display (effective-version))")))
2947 (path (map (cut string-append "-L\", \"" <>
2948 "/share/guile/site/"
2949 effective)
2950 deps))
2951 (gopath (map (cut string-append "-C\", \"" <>
2952 "/lib/guile/" effective
2953 "/site-ccache")
2954 deps))
2955 (kernel-dir (string-append out "/share/jupyter/kernels/guix/")))
2956 (substitute* (string-append kernel-dir "kernel.json")
2957 (("-s")
2958 (string-join
2959 (list (string-join path "\",\n\t\t\"")
2960 (string-join gopath "\",\n\t\t\"")
2961 "-s")
2962 "\",\n\t\t\""))
2963 (("guix-jupyter-kernel.scm")
2964 (string-append out "/share/guile/site/" effective
2965 "/guix-jupyter-kernel.scm")))))))))
2966 (native-inputs
2967 (list autoconf
2968 automake
2969 pkg-config
2970 ;; For testing.
2971 jupyter
2972 python-ipython
2973 python-ipykernel))
2974 (inputs
2975 (list guix (lookup-package-native-input guix "guile")))
2976 (propagated-inputs
2977 (list guile-json-4 guile-simple-zmq guile-gcrypt))
2978 (synopsis "Guix kernel for Jupyter")
2979 (description
2980 "Guix-Jupyter is a Jupyter kernel. It allows you to annotate notebooks
2981with information about their software dependencies, such that code is executed
2982in the right software environment. Guix-Jupyter spawns the actual kernels
2983such as @code{python-ipykernel} on behalf of the notebook user and runs them
2984in an isolated environment, in separate namespaces.")
2985 (license license:gpl3+)))
2986
2987(define-public nar-herder
2988 (let ((commit "1513eb5f274d17dfc7a6f8f2e17b8c0c1fd2f278")
2989 (revision "58"))
2990 (package
2991 (name "nar-herder")
2992 (version (git-version "0" revision commit))
2993 (source (origin
2994 (method git-fetch)
2995 (uri (git-reference
2996 (url "https://codeberg.org/guix/nar-herder.git")
2997 (commit commit)))
2998 (sha256
2999 (base32
3000 "1bfjszvr6h4sgil1c0407p7bc6wggn71pjg9hvvs2phcqgrvd8ab"))
3001 (file-name (string-append name "-" version "-checkout"))))
3002 (build-system gnu-build-system)
3003 (arguments
3004 (list
3005 #:modules `(((guix build guile-build-system)
3006 #:select (target-guile-effective-version))
3007 ,@%default-gnu-modules)
3008 #:imported-modules `((guix build guile-build-system)
3009 ,@%default-gnu-imported-modules)
3010 #:phases
3011 #~(modify-phases %standard-phases
3012 (add-before 'build 'set-GUILE_AUTO_COMPILE
3013 (lambda _
3014 ;; To avoid warnings relating to 'guild'.
3015 (setenv "GUILE_AUTO_COMPILE" "0")))
3016 (add-after 'install 'wrap-executable
3017 (lambda* (#:key inputs outputs target #:allow-other-keys)
3018 (let* ((out (assoc-ref outputs "out"))
3019 (bin (string-append out "/bin"))
3020 (guile (assoc-ref inputs "guile"))
3021 (version (target-guile-effective-version))
3022 (scm (string-append out "/share/guile/site/" version))
3023 (go (string-append out "/lib/guile/" version "/site-ccache")))
3024 (for-each
3025 (lambda (file)
3026 (simple-format (current-error-port) "wrapping: ~A\n" file)
3027 (let ((guile-inputs (list
3028 "guile-json"
3029 "guile-gcrypt"
3030 "guix"
3031 "guile-lib"
3032 "guile-lzlib"
3033 "guile-zstd"
3034 "guile-prometheus"
3035 "guile-sqlite3"
3036 "guile-gnutls"
3037 "guile-fibers"
3038 "guile-knots"
3039 "guile-safsaf"
3040 "guile-webutils"
3041 "guile-irregex")))
3042 (wrap-program file
3043 `("GUILE_LOAD_PATH" ":" prefix
3044 (,scm ,(string-join
3045 (map (lambda (input)
3046 (string-append
3047 (assoc-ref inputs input)
3048 "/share/guile/site/"
3049 version))
3050 guile-inputs)
3051 ":")))
3052 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
3053 (,go ,(string-join
3054 (map (lambda (input)
3055 (string-append
3056 (assoc-ref inputs input)
3057 "/lib/guile/" version "/site-ccache"))
3058 guile-inputs)
3059 ":"))))))
3060 (find-files bin)))))
3061 (delete 'strip)))) ; As the .go files aren't compatible
3062 (native-inputs
3063 (list pkg-config
3064 autoconf
3065 automake
3066 guile-gnutls
3067
3068 ;; Guile libraries are needed here for cross-compilation.
3069 guile-3.0-latest
3070 guile-aws
3071 guile-json-4
3072 guile-gcrypt
3073 guix
3074 guile-fibers
3075 guile-knots
3076 guile-prometheus
3077 guile-safsaf
3078 guile-lib
3079 guile-lzlib
3080 guile-zstd
3081 guile-sqlite3))
3082 (inputs
3083 (list bash-minimal
3084 guile-3.0-latest))
3085 (propagated-inputs
3086 (list guile-aws
3087 guile-json-4
3088 guile-gcrypt
3089 guix
3090 guile-fibers
3091 guile-knots
3092 guile-prometheus
3093 guile-safsaf
3094 guile-lib
3095 guile-lzlib
3096 guile-zstd
3097 guile-sqlite3
3098 guile-gnutls))
3099 (home-page "https://codeberg.org/guix/nar-herder")
3100 (synopsis "Utility for managing and serving nars")
3101 (description
3102 "The Nar Herder is a utility for managing a collection of
3103nars (normalized archives, in the context of Guix) along with the
3104corresponding narinfo files which contain some signed metadata.
3105
3106It can assist in serving a collection of nars, moving them between machines,
3107or mirroring an existing collection of nars.")
3108 (license license:agpl3+))))
3109
3110(define-public gcab
3111 (package
3112 (name "gcab")
3113 (version "1.6")
3114 (source (origin
3115 (method url-fetch)
3116 (uri (string-append "mirror://gnome/sources/gcab/"
3117 version "/gcab-" version ".tar.xz"))
3118 (sha256
3119 (base32
3120 "02sngv40zwadajsiav1paahyfgkccbh9s7r5ks82chbwawarc31g"))))
3121 (build-system meson-build-system)
3122 (native-inputs
3123 (list `(,glib "bin") ; for glib-mkenums
3124 intltool
3125 pkg-config
3126 vala))
3127 (inputs
3128 (list glib zlib))
3129 (arguments
3130 `(#:configure-flags
3131 ;; XXX This ‘documentation’ is for developers, and fails informatively:
3132 ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
3133 (list "-Ddocs=false"
3134 "-Dintrospection=false")))
3135 (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
3136 (synopsis "Microsoft Cabinet file manipulation library")
3137 (description
3138 "The libgcab library provides GObject functions to read, write, and modify
3139Microsoft cabinet (.@dfn{CAB}) files.")
3140 (license (list license:gpl2+ ; tests/testsuite.at
3141 license:lgpl2.1+)))) ; the rest
3142
3143(define-public msitools
3144 (package
3145 (name "msitools")
3146 (version "0.100")
3147 (source (origin
3148 (method url-fetch)
3149 (uri (string-append "mirror://gnome/sources/msitools/"
3150 version "/msitools-" version ".tar.xz"))
3151 (sha256
3152 (base32
3153 "1skq17qr2ic4qr3779j49byfm8rncwbsq9rj1a33ncn2m7isdwdv"))))
3154 (build-system gnu-build-system)
3155 (native-inputs
3156 (list bison pkg-config))
3157 (inputs
3158 (list gcab glib libgsf libxml2
3159 `(,util-linux "lib")))
3160 (home-page "https://wiki.gnome.org/msitools")
3161 (synopsis "Windows Installer file manipulation tool")
3162 (description
3163 "msitools is a collection of command-line tools to inspect, extract, build,
3164and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
3165for packaging and deployment of cross-compiled Windows applications.")
3166 (license license:lgpl2.1+)))
3167
3168(define-public libostree
3169 (package
3170 (name "libostree")
3171 (version "2025.1")
3172 (source
3173 (origin
3174 (method url-fetch)
3175 (uri (string-append
3176 "https://github.com/ostreedev/ostree/releases/download/v"
3177 (version-major+minor version) "/libostree-" version ".tar.xz"))
3178 (sha256
3179 (base32 "0lc3y710wknwmx40ssi5h7ndmf30niz7x0grd4lf96nn9ws15hzj"))))
3180 (build-system gnu-build-system)
3181 (arguments
3182 '(#:phases
3183 (modify-phases %standard-phases
3184 (add-before 'check 'pre-check
3185 (lambda _
3186 ;; Don't try to use the non-existing '/var/tmp' as test
3187 ;; directory.
3188 (setenv "TEST_TMPDIR" (getenv "TMPDIR")))))
3189 ;; XXX: fails with:
3190 ;; tap-driver.sh: missing test plan
3191 ;; tap-driver.sh: internal error getting exit status
3192 ;; tap-driver.sh: fatal: I/O or internal error
3193 #:tests? #f))
3194 (native-inputs
3195 (list attr ; for tests
3196 bison
3197 `(,glib "bin") ; for 'glib-mkenums'
3198 gobject-introspection
3199 pkg-config
3200 libxslt))
3201 (inputs
3202 (list avahi
3203 docbook-xml
3204 docbook-xsl
3205 e2fsprogs
3206 fuse-2
3207 glib
3208 gpgme
3209 libarchive
3210 libsoup-minimal
3211 util-linux))
3212 (home-page "https://ostreedev.github.io/ostree/")
3213 (synopsis "Operating system and container binary deployment and upgrades")
3214 (description
3215 "@code{libostree} is both a shared library and suite of command line
3216tools that combines a \"git-like\" model for committing and downloading
3217bootable file system trees, along with a layer for deploying them and managing
3218the boot loader configuration.")
3219 (license license:lgpl2.0+)))
3220
3221(define-public flatpak
3222 (package
3223 (name "flatpak")
3224 (version "1.18.2")
3225 (source
3226 (origin
3227 (method url-fetch)
3228 (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
3229 version "/flatpak-" version ".tar.xz"))
3230 (sha256
3231 (base32 "044fy3bvh17gp37mgaix6qw0s6zargi2m4w4k70s6sf32k5zh3w0"))
3232 (patches
3233 (search-patches "flatpak-fix-fonts-icons.patch"
3234 "flatpak-fix-icon-validation.patch"
3235 "flatpak-unset-gdk-pixbuf-for-sandbox.patch"))))
3236 (build-system meson-build-system)
3237 (arguments
3238 (list
3239 #:configure-flags
3240 #~(list
3241 "-Dsystem_helper=disabled"
3242 "-Dwayland_security_context=enabled"
3243 "-Dlocalstatedir=/var"
3244 (string-append "-Dsystem_bubblewrap="
3245 (assoc-ref %build-inputs "bubblewrap")
3246 "/bin/bwrap")
3247 (string-append "-Dsystem_dbus_proxy="
3248 (assoc-ref %build-inputs "xdg-dbus-proxy")
3249 "/bin/xdg-dbus-proxy"))
3250 #:phases
3251 #~(modify-phases %standard-phases
3252 (add-after 'unpack 'disable-failing-tests
3253 (lambda _
3254 (substitute* "tests/meson.build"
3255 ;; The following tests fail with error message related to fusermount3
3256 ;; failing an unmount operation ("No such file or directory").
3257 ((".*http-utils.*") "")
3258 ((".*summaries.*") "")
3259 ((".*prune.*") ""))))
3260 (add-after 'unpack 'fix-tests
3261 (lambda* (#:key inputs #:allow-other-keys)
3262 (copy-recursively
3263 (search-input-directory inputs "lib/locale")
3264 "/tmp/locale")
3265 (for-each make-file-writable (find-files "/tmp"))
3266 (substitute* "tests/make-test-runtime.sh"
3267 (("cp `which.*") "echo guix\n")
3268 (("cp -r /usr/lib/locale/C\\.\\*")
3269 (string-append "mkdir ${DIR}/usr/lib/locale/en_US; \
3270cp -r /tmp/locale/*/en_US.*")))
3271 (substitute* "tests/libtest.sh"
3272 (("/bin/kill") (which "kill"))
3273 (("/usr/bin/python3") (which "python3")))))
3274 (add-after 'unpack 'p11-kit-fix
3275 (lambda* (#:key inputs #:allow-other-keys)
3276 (let ((p11-path (search-input-file inputs "/bin/p11-kit")))
3277 (substitute* "session-helper/flatpak-session-helper.c"
3278 (("\"p11-kit\",")
3279 (string-append "\"" p11-path "\","))
3280 (("if \\(g_find_program_in_path \\(\"p11-kit\"\\)\\)")
3281 (string-append "if (g_find_program_in_path (\""
3282 p11-path "\"))"))))))
3283 (add-after 'unpack 'fix-icon-validation
3284 (lambda* (#:key outputs #:allow-other-keys)
3285 (let* ((out (assoc-ref outputs "out"))
3286 (store (dirname out)))
3287 (substitute* "icon-validator/validate-icon.c"
3288 (("@storeDir@") store)))))
3289 (add-before 'check 'pre-check
3290 (lambda _
3291 ;; Set $HOME to writable location for testcommon tests.
3292 (setenv "HOME" "/tmp")))
3293 (add-after 'install 'wrap-flatpak
3294 (lambda* (#:key inputs #:allow-other-keys)
3295 (let ((flatpak (string-append #$output "/bin/flatpak"))
3296 (glib-networking (assoc-ref inputs "glib-networking")))
3297 (wrap-program flatpak
3298 ;; Prevent error:
3299 ;; "No GSettings schemas are installed on the system"
3300 `("GSETTINGS_SCHEMA_DIR" =
3301 (,(string-append
3302 #$(this-package-input "gsettings-desktop-schemas")
3303 "/share/glib-2.0/schemas")))
3304 ;; Allow GIO to find TLS backend.
3305 `("GIO_EXTRA_MODULES" prefix
3306 (,(string-append glib-networking "/lib/gio/modules"))))))))))
3307 (native-inputs
3308 (list bison
3309 dbus ; for dbus-daemon
3310 gettext-minimal
3311 `(,glib "bin") ; for glib-mkenums + gdbus-codegen
3312 gtk-doc/stable
3313 (libc-utf8-locales-for-target)
3314 gobject-introspection
3315 libcap
3316 pkg-config
3317 python
3318 python-pyparsing
3319 socat
3320 wayland ; wayland-scanner
3321 wayland-protocols
3322 which))
3323 (inputs
3324 (list appstream
3325 appstream-glib
3326 bash-minimal
3327 bubblewrap
3328 curl
3329 fuse
3330 gsettings-desktop-schemas
3331 gdk-pixbuf
3332 libcap
3333 libsoup
3334 libxml2
3335 p11-kit
3336 polkit
3337 util-linux
3338 wayland
3339 xdg-dbus-proxy
3340 zstd))
3341 (propagated-inputs (list glib-networking
3342 gnupg
3343 gsettings-desktop-schemas
3344 ;; Required for flatpak-validate-icon SVG validation.
3345 (librsvg-for-system)
3346 ;; The following are listed in Requires or
3347 ;; Requires.private of `flatpak.pc'.
3348 curl
3349 dconf
3350 gpgme
3351 json-glib
3352 libarchive
3353 libostree
3354 libseccomp
3355 libxau))
3356 (native-search-paths
3357 (list ;; Flatpak creates desktop files on its own.
3358 ;; If those desktop files contain DBusActivatable=true, the application
3359 ;; will be invoked by using dbus activation. But dbus activation
3360 ;; doesn't use $PATH but rather does execve while the working directory
3361 ;; is "/". That means, if the Exec entry contains just "flatpak",
3362 ;; that won't be ever found.
3363 ;; When flatpak creates desktop files, it uses a path from
3364 ;; $FLATPAK_BINARY if set.
3365 ;; See <https://codeberg.org/guix/guix/issues/438>.
3366 (search-path-specification
3367 (variable "FLATPAK_BINARY")
3368 (separator #f)
3369 (files '("bin/flatpak"))
3370 (file-type 'regular))))
3371 (home-page "https://flatpak.org")
3372 (synopsis "System for building, distributing, and running sandboxed desktop
3373applications")
3374 (description "Flatpak is a system for building, distributing, and running
3375sandboxed desktop applications on GNU/Linux.")
3376 (license license:lgpl2.1+)))
3377
3378(define-public fpm
3379 (package
3380 (name "fpm")
3381 (version "1.16.0")
3382 (source (origin
3383 (method git-fetch) ;for tests
3384 (uri (git-reference
3385 (url "https://github.com/jordansissel/fpm")
3386 (commit (string-append "v" version))))
3387 (file-name (git-file-name name version))
3388 (sha256
3389 (base32
3390 "0h4yw57y0p0x335767y058lbv46f6xjf3jvv49vxw5vfzzhqbl3c"))))
3391 (build-system ruby-build-system)
3392 (arguments
3393 (list #:phases
3394 #~(modify-phases %standard-phases
3395 (add-after 'extract-gemspec 'patch-paths
3396 (lambda* (#:key inputs #:allow-other-keys)
3397 (substitute* '("lib/fpm/util.rb"
3398 "spec/fpm/util_spec.rb"
3399 "spec/fpm/package/rpm_spec.rb")
3400 (("\"/bin/sh\"")
3401 (string-append "\"" (search-input-file inputs "bin/sh")
3402 "\"")))))
3403 (add-after 'extract-gemspec 'relax-requirements
3404 (lambda _
3405 (substitute* "fpm.gemspec"
3406 (("\"clamp\", \"~> 1.0.0\"")
3407 "\"clamp\", \">= 1.0.0\""))))
3408 (add-after 'extract-gemspec 'disable-problematic-tests
3409 ;; Disable some tests which are failing (see:
3410 ;; https://github.com/jordansissel/fpm/issues/2000).
3411 (lambda _
3412 ;; There are 4 'NoMethodError' test failures in the
3413 ;; command_spec suite, for unknown reasons.
3414 (delete-file "spec/fpm/command_spec.rb")
3415 (substitute* "spec/fpm/package_spec.rb"
3416 (("@oldtmp = ENV\\[\"TMP\"]" all)
3417 "skip('fails with guix')"))
3418 (substitute* "spec/fpm/package/cpan_spec.rb"
3419 ;; This test is marked as expected to fail (pending) when
3420 ;; TRAVIS_OS_NAME is set, but passes with Guix; skip it.
3421 (("it \"should unpack tarball containing" all)
3422 (string-append "x" all)))
3423 (substitute* "spec/fpm/package/gem_spec.rb"
3424 ;; This test fails for unknown reason; perhaps a patched
3425 ;; shebang.
3426 (("it 'should not change the shebang'" all)
3427 (string-append "x" all)))))
3428 (replace 'check
3429 (lambda* (#:key tests? #:allow-other-keys)
3430 (when tests?
3431 ;; Set TRAVIS_OS_NAME to skip tests known to cause
3432 ;; problems in minimal environments.
3433 (setenv "TRAVIS_OS_NAME" "GNU Guix")
3434 (invoke "rspec")))))))
3435 (native-inputs
3436 (list dpkg
3437 libarchive
3438 node-lts
3439 perl-app-cpanminus
3440 python
3441 python-setuptools
3442 ruby-rspec
3443 squashfs-tools
3444 zstd))
3445 (inputs
3446 (list bash-minimal
3447 ruby-arr-pm
3448 ruby-backports
3449 ruby-cabin
3450 ruby-clamp
3451 ruby-pleaserun
3452 ruby-rexml
3453 ruby-stud))
3454 (home-page "https://github.com/jordansissel/fpm/")
3455 (synopsis "Package building and mangling tool")
3456 (description "@command{fpm} is a command to convert directories, RPMs,
3457Python eggs, Ruby gems, and more to RPMs, debs, Solaris packages and more.")
3458 (license license:expat)))
3459
3460(define-public akku
3461 (package
3462 (name "akku")
3463 (version "1.1.0")
3464 (source (origin
3465 (method git-fetch)
3466 (uri (git-reference
3467 (url "https://gitlab.com/akkuscm/akku.git")
3468 (commit (string-append "v" version))))
3469 (file-name (git-file-name name version))
3470 (sha256 (base32 "1pi18aamg1fd6f9ynfl7zx92052xzf0zwmhi2pwcwjs1kbah19f5"))))
3471 (build-system gnu-build-system)
3472 (arguments
3473 '(#:phases (modify-phases %standard-phases
3474 (replace 'bootstrap
3475 (lambda* (#:key outputs #:allow-other-keys)
3476 (for-each patch-shebang
3477 '("bootstrap"
3478 ".akku/env"))
3479 (let* ((home "/tmp")
3480 (datadir (string-append home "/.local/share/akku/")))
3481 (mkdir-p datadir)
3482 (invoke "touch" (string-append datadir "index.db"))
3483 (setenv "HOME" home))
3484 (invoke "./bootstrap")))
3485 (add-after 'install 'wrap-executables
3486 (lambda* (#:key outputs inputs #:allow-other-keys)
3487 (let ((out (assoc-ref outputs "out"))
3488 (curl (assoc-ref inputs "curl")))
3489 (wrap-program (string-append out "/bin/akku")
3490 `("LD_LIBRARY_PATH" ":" prefix
3491 (,(string-append curl "/lib"))))))))))
3492 (native-inputs
3493 (list which autoconf automake pkg-config))
3494 (inputs
3495 (list bash-minimal guile-3.0 curl))
3496 (home-page "https://akkuscm.org/")
3497 (synopsis "Language package manager for Scheme")
3498 (description
3499 "Akku.scm is a project-based language package manager for R6RS and R7RS Scheme.
3500It is mainly meant for programmers who develop portable programs or libraries in Scheme,
3501but could potentially work for end-users of those programs. It also has a translator
3502from R7RS, which allows most R7RS code to run on R6RS implementations.")
3503 (license license:gpl3+)))
3504
3505(define-public asdf-vm
3506 (package
3507 (name "asdf-vm")
3508 (version "0.20.0")
3509 (source
3510 (origin
3511 (method git-fetch)
3512 (uri (git-reference
3513 (url "https://github.com/asdf-vm/asdf")
3514 (commit (string-append "v" version))))
3515 (file-name (git-file-name name version))
3516 (sha256
3517 (base32 "0xkrsrdijxxi79m0kimm38lhjybyzn6ng3jdgvra21jm4wk4gbda"))))
3518 (build-system go-build-system)
3519 (arguments
3520 (list
3521 #:install-source? #f
3522 #:import-path "github.com/asdf-vm/asdf/cmd/asdf"
3523 #:unpack-path "github.com/asdf-vm/asdf"
3524 #:embed-files
3525 #~(list "bash_autocomplete"
3526 "powershell_autocomplete.ps1"
3527 "zsh_autocomplete")
3528 #:test-subdirs ;Test only those subdirs that don't include integration tests
3529 #~(list "../../internal/cli/set"
3530 "../../internal/completions"
3531 "../../internal/config"
3532 "../../internal/data"
3533 "../../internal/exec"
3534 "../../internal/execute"
3535 "../../internal/hook"
3536 "../../internal/paths"
3537 "../../internal/toolversions")))
3538 (native-inputs
3539 (list go-github-com-go-git-go-git-v5
3540 go-github-com-mgechev-revive
3541 go-github-com-otiai10-copy
3542 go-github-com-rogpeppe-go-internal-1.14
3543 go-github-com-stretchr-testify
3544 go-github-com-urfave-cli-v3
3545 go-golang-org-x-sys
3546 go-gopkg-in-ini-v1
3547 go-honnef-co-go-tools
3548 go-mvdan-cc-gofumpt))
3549 (home-page "https://asdf-vm.com")
3550 (synopsis "Multi language extendible version manager")
3551 (description
3552 "ASDF is a version manager for programming language runtimes and tools.
3553Versions can be defined and managed on a per-project basis. It features a
3554plugin system that allows it to be extended to support further languages. It
3555currently supports a many popular runtimes, such as Ruby, Node.js, Elixir, and
3556Erlang.")
3557 (license license:expat)))
3558
3559(define-public modules
3560 (package
3561 (name "modules")
3562 (version "4.8.0")
3563 (source
3564 (origin
3565 (method url-fetch)
3566 (uri (string-append "mirror://sourceforge/modules/Modules/modules-"
3567 version "/modules-" version ".tar.bz2"))
3568 (sha256 (base32 "1amz8qdqbvfdc8jv0j4720vywbz2gi7l3sr1lh37ilfbxy9lq9g9"))))
3569 (build-system gnu-build-system)
3570 (arguments
3571 `(#:configure-flags
3572 (list (string-append "--with-bin-search-path="
3573 (assoc-ref %build-inputs "tcl") "/bin" ":"
3574 (assoc-ref %build-inputs "procps") "/bin" ":"
3575 (assoc-ref %build-inputs "less") "/bin" ":"
3576 (assoc-ref %build-inputs "coreutils") "/bin")
3577 (string-append "--with-tcl=" (assoc-ref %build-inputs "tcl") "/lib")
3578 "--disable-compat-version")
3579 #:test-target "test"
3580 #:phases
3581 (modify-phases %standard-phases
3582 (add-before 'configure 'patch-add-modules
3583 (lambda* (#:key inputs #:allow-other-keys)
3584 (let ((coreutils (assoc-ref inputs "coreutils")))
3585 (substitute* "script/add.modules.in"
3586 (("/bin/(cat|cp|rm)" _ command)
3587 (string-append coreutils "/bin/" command))
3588 (("/bin/echo")
3589 "echo")))))
3590 (add-before 'configure 'patch-scripts-for-python-3
3591 (lambda _
3592 ;; Patch the script for python-3.
3593 (substitute* "script/createmodule.py.in"
3594 (("pathkeys.sort\\(\\)") "pathkeys = sorted(pathkeys)")
3595 (("print\\(\"\\\\t\"\\*") "print(\"\\t\"*int")
3596 (("@PYTHON@") (which "python3")))))
3597 (add-before 'check 'patch-/bin/sh-and-nixbld-groups-in-tests
3598 (lambda _
3599 (use-modules (srfi srfi-1))
3600 (let* ((groups-file (string-append (getcwd) "/nixbld-groups"))
3601 (groups-file-z (string-append groups-file "-z"))
3602 (nixbld-groups
3603 (fold
3604 (lambda (id prev)
3605 (catch #t
3606 (lambda () (cons (group:name (getgrnam id)) prev))
3607 (lambda _ prev)))
3608 '()
3609 (vector->list (getgroups)))))
3610 ;; Simulate "id -G -n" command output.
3611 (call-with-output-file groups-file
3612 (lambda (port)
3613 (display (string-join nixbld-groups " ") port)
3614 (display #\newline port)))
3615 ;; Simulate "id -G -n -z" command output.
3616 (call-with-output-file groups-file-z
3617 (lambda (port)
3618 (for-each
3619 (lambda (group-name)
3620 (display group-name port)
3621 (display #\null port))
3622 nixbld-groups)))
3623 ;; Generate "modulecmd-test.tcl" before running "make test".
3624 (invoke "make" "modulecmd-test.tcl")
3625 ;; Substitute shell.
3626 (substitute*
3627 '("modulecmd-test.tcl"
3628 "modulecmd.tcl"
3629 "testsuite/modules.70-maint/380-edit.exp"
3630 "compat/init/filter")
3631 (("/bin/sh") (which "sh")))
3632 ;; Skip tests that use supplementary groups.
3633 (for-each
3634 delete-file
3635 '("testsuite/modules.20-locate/112-hide-user-group.exp"
3636 "testsuite/modules.20-locate/117-forbid-user-group.exp"
3637 "testsuite/modules.20-locate/119-hide-cascading.exp"
3638 "testsuite/modules.50-cmds/140-system.exp"
3639 "testsuite/modules.50-cmds/287-info-usergroups.exp"
3640 "testsuite/modules.50-cmds/440-module-tag.exp"
3641 "testsuite/modules.70-maint/220-config.exp"))
3642 (for-each
3643 (lambda (file)
3644 (substitute* file
3645 (("/bin/sh") (which "bash"))
3646 ;; For some reason "kvm" group cannot be resolved for
3647 ;; "nixbld" user. We replace "id ..." commands with
3648 ;; "cat ..." that simulates them.
3649 (("exec id -G -n -z") (string-append "exec cat " groups-file-z))
3650 (("exec id -G -n") (string-append "exec cat " groups-file))))
3651 '("testsuite/modules.00-init/005-init_ts.exp"
3652 "testsuite/install.00-init/005-init_ts.exp"
3653 "modulecmd-test.tcl"))))))))
3654 (native-inputs
3655 (list dejagnu autoconf which))
3656 (inputs
3657 (list tcl less procps coreutils python-3))
3658 (home-page "https://modules.sourceforge.net/")
3659 (synopsis "Shell environment variables and aliases management")
3660 (description "Modules simplify shell initialization and let users
3661modify their environment during the session with modulefiles. Modules are
3662used on high-performance clusters to dynamically add and remove paths
3663to specific versions of applications.")
3664 (license license:gpl2+)))
3665
3666(define-public gnome-packagekit
3667 (package
3668 (name "gnome-packagekit")
3669 (version "43.0")
3670 (source (origin
3671 (method url-fetch)
3672 (uri
3673 (string-append "mirror://gnome/sources/" name "/"
3674 (version-major version) "/"
3675 name "-" version ".tar.xz"))
3676 (sha256
3677 (base32
3678 "15giqmk8w375kkyzmwzfc9xnyafqzp86ncbh5zmb48x9aak5b96d"))))
3679 (build-system meson-build-system)
3680 (arguments
3681 (list #:configure-flags
3682 #~(list "-Dsystemd=false")
3683 #:phases
3684 #~(modify-phases %standard-phases
3685 (add-before 'check 'start-xorg-server
3686 (lambda _
3687 (system "Xvfb :1 &")
3688 (setenv "DISPLAY" ":1")))
3689 (add-before 'install 'setenv
3690 (lambda _
3691 ;; Prevent gtk-update-icon-cache, glib-compile-schemas,
3692 ;; update-desktop-database (since we are doing it ourselves with
3693 ;; glib-or-gtk phases).
3694 (setenv "DESTDIR" "/"))))
3695 #:glib-or-gtk? #t))
3696 (native-inputs
3697 (list gettext-minimal pkg-config (list glib "bin") xorg-server-for-tests))
3698 (inputs
3699 (list glib gtk+ packagekit))
3700 (synopsis "GNOME frontend for PackageKit")
3701 (description "This package provides a PackageKit frontend for GNOME.
3702PackageKit is a common unified interface for package managers.")
3703 (home-page "https://gitlab.gnome.org/GNOME/gnome-packagekit")
3704 (license license:gpl2+)))