guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: Merge branch 'master' into core-updates


From: guix-commits
Subject: 01/03: Merge branch 'master' into core-updates
Date: Sun, 7 Jan 2024 15:54:50 -0500 (EST)

civodul pushed a commit to branch core-updates
in repository guix.

commit b71d2ba8785e9883f4f2d239c557c9034b6be876
Merge: c5d670308c 5f8a993aa8
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Jan 7 21:17:02 2024 +0100

    Merge branch 'master' into core-updates
    
    Change-Id: I150b4077fffca97c860439292a8d053579d64cb7

 .guix-authorizations                               |     3 +-
 Makefile.am                                        |    47 +-
 build-aux/test-driver.scm                          |     3 +-
 doc/contributing.texi                              |     7 +-
 doc/guix-cookbook.texi                             |   248 +-
 doc/guix.texi                                      |   338 +-
 etc/completion/bash/guix                           |    11 +-
 etc/hurd-manifest.scm                              |     9 +-
 etc/teams.scm                                      |    28 +-
 .../arm.scm => etc/teams/rust/rust-manifest.scm    |    33 +-
 gnu/bootloader/u-boot.scm                          |    17 +
 gnu/build/chromium-extension.scm                   |    43 +-
 gnu/build/cross-toolchain.scm                      |    41 +-
 gnu/build/icecat-extension.scm                     |     1 +
 gnu/build/shepherd.scm                             |    90 -
 gnu/ci.scm                                         |    21 +-
 gnu/home/services/sound.scm                        |   102 +-
 gnu/installer.scm                                  |     2 +-
 gnu/local.mk                                       |    29 +-
 gnu/packages/admin.scm                             |    17 +-
 gnu/packages/algebra.scm                           |     2 +-
 gnu/packages/aux-files/findclass.php               |   125 +
 gnu/packages/aux-files/linux-libre/6.5-arm.conf    | 10836 -------
 gnu/packages/aux-files/linux-libre/6.5-arm64.conf  | 11563 -------
 gnu/packages/aux-files/linux-libre/6.5-i686.conf   | 11726 -------
 gnu/packages/aux-files/linux-libre/6.5-x86_64.conf | 11852 -------
 gnu/packages/avr-xyz.scm                           |    47 +-
 gnu/packages/avr.scm                               |    82 +-
 gnu/packages/axoloti.scm                           |     7 +-
 gnu/packages/backup.scm                            |     7 +-
 gnu/packages/base.scm                              |     2 +-
 gnu/packages/bioconductor.scm                      |   484 +-
 gnu/packages/bioinformatics.scm                    |   805 +-
 gnu/packages/bittorrent.scm                        |    27 +-
 gnu/packages/bootloaders.scm                       |    36 +-
 gnu/packages/bootstrap.scm                         |     5 +-
 gnu/packages/browser-extensions.scm                |    76 +-
 gnu/packages/cdrom.scm                             |    30 +-
 gnu/packages/check.scm                             |     8 +-
 gnu/packages/chez.scm                              |     2 +-
 gnu/packages/chicken.scm                           |     4 +-
 gnu/packages/configuration-management.scm          |     1 +
 gnu/packages/cook.scm                              |     2 +-
 gnu/packages/cpp.scm                               |     7 +-
 gnu/packages/cran.scm                              |  1357 +-
 gnu/packages/crates-graphics.scm                   |    48 +-
 gnu/packages/crates-io.scm                         |  9999 ++++--
 gnu/packages/cross-base.scm                        |   323 +-
 gnu/packages/cross-toolchain.scm                   |    42 +
 gnu/packages/cryptsetup.scm                        |     6 +-
 gnu/packages/databases.scm                         |     9 +-
 gnu/packages/debian.scm                            |    13 +-
 gnu/packages/debug.scm                             |     4 +-
 gnu/packages/dezyne.scm                            |    94 +-
 gnu/packages/diffoscope.scm                        |     4 +-
 gnu/packages/disk.scm                              |    25 +-
 gnu/packages/display-managers.scm                  |   169 +-
 gnu/packages/ed.scm                                |    58 -
 gnu/packages/electronics.scm                       |     2 +-
 gnu/packages/elixir-xyz.scm                        |   294 +
 gnu/packages/elixir.scm                            |    63 +-
 gnu/packages/emacs-xyz.scm                         |   708 +-
 gnu/packages/engineering.scm                       |    15 +-
 gnu/packages/file-systems.scm                      |    35 +-
 gnu/packages/finance.scm                           |     9 +-
 gnu/packages/firmware.scm                          |   246 +-
 gnu/packages/fonts.scm                             |    10 +-
 gnu/packages/game-development.scm                  |   242 +-
 gnu/packages/games.scm                             |   231 +-
 gnu/packages/gcc.scm                               |    20 +-
 gnu/packages/geo.scm                               |    11 +-
 gnu/packages/gl.scm                                |    54 +-
 gnu/packages/gnome.scm                             |   147 +-
 gnu/packages/gnunet.scm                            |    15 +-
 gnu/packages/gnupg.scm                             |    19 +-
 gnu/packages/gnuzilla.scm                          |    47 +-
 gnu/packages/golang-check.scm                      |    12 +
 gnu/packages/golang-web.scm                        |  1467 +
 gnu/packages/golang.scm                            |  1609 +-
 gnu/packages/graph.scm                             |    50 +-
 gnu/packages/graphics.scm                          |     6 +-
 gnu/packages/graphviz.scm                          |    12 +-
 gnu/packages/gtk.scm                               |     3 +-
 gnu/packages/guile-xyz.scm                         |   223 +-
 gnu/packages/high-availability.scm                 |     1 +
 gnu/packages/i2p.scm                               |    44 +-
 gnu/packages/image.scm                             |    74 +-
 gnu/packages/ipfs.scm                              |     1 +
 gnu/packages/java.scm                              |    28 +
 gnu/packages/javascript.scm                        |    17 +-
 gnu/packages/lean.scm                              |    51 +-
 gnu/packages/libsigsegv.scm                        |    27 +-
 gnu/packages/linux.scm                             |   125 +-
 gnu/packages/lisp-check.scm                        |     6 +-
 gnu/packages/lisp-xyz.scm                          |   423 +-
 gnu/packages/lisp.scm                              |    15 +-
 gnu/packages/llvm.scm                              |    15 +-
 gnu/packages/machine-learning.scm                  |   268 +-
 gnu/packages/mail.scm                              |     3 +-
 gnu/packages/mate.scm                              |     2 +-
 gnu/packages/maths.scm                             |     4 +-
 gnu/packages/messaging.scm                         |     6 +-
 gnu/packages/minetest.scm                          |     6 +-
 gnu/packages/mp3.scm                               |    21 +-
 gnu/packages/mpd.scm                               |     9 +-
 gnu/packages/multiprecision.scm                    |    16 +-
 gnu/packages/music.scm                             |    48 +-
 gnu/packages/nano.scm                              |    51 -
 gnu/packages/ncdu.scm                              |    24 +-
 gnu/packages/ncurses.scm                           |     8 +-
 gnu/packages/networking.scm                        |    74 +-
 gnu/packages/node-xyz.scm                          |    71 +
 gnu/packages/node.scm                              |     4 +-
 gnu/packages/ocaml.scm                             |  1476 +-
 gnu/packages/package-management.scm                |    13 +-
 gnu/packages/pascal.scm                            |    73 +-
 gnu/packages/password-utils.scm                    |    23 +-
 gnu/packages/patches/dante-non-darwin.patch        |    15 +
 .../emacs-ess-fix-obsolete-function-alias.patch    |    23 -
 .../emacs-haskell-mode-no-redefine-builtin.patch   |    75 -
 gnu/packages/patches/fpc-glibc-2.34-compat.patch   |   190 +
 .../patches/freeimage-CVE-2020-21428.patch         |    17 +
 .../patches/freeimage-CVE-2020-22524.patch         |   229 +
 .../onnx-1.13.1-use-system-googletest.patch        |    55 +
 .../patches/openmw-assume-nonconst-SIGSTKSZ.patch  |    39 -
 .../patches/python-pytorch2-system-libraries.patch |   156 +
 gnu/packages/patches/python-uqbar-python3.10.patch |    23 +
 .../patches/racket-backport-8.10-rktboot.patch     |   130 -
 .../racket-backport-8.11-layered-docs.patch        |    36 +
 gnu/packages/patches/slim-config.patch             |    43 +-
 gnu/packages/patches/slim-display.patch            |    74 +-
 gnu/packages/patches/slim-reset.patch              |    33 -
 gnu/packages/patches/slim-session.patch            |    17 -
 gnu/packages/patches/slim-sigusr1.patch            |    33 -
 .../patches/transmission-4.0.5-fix-build.patch     |    39 +
 .../patches/u-boot-allow-disabling-openssl.patch   |    56 +-
 .../patches/u-boot-fix-build-python-3.10.patch     |    37 -
 .../patches/u-boot-fix-u-boot-lib-build.patch      |    24 -
 .../patches/u-boot-rk3399-enable-emmc-phy.patch    |    26 -
 .../patches/u-boot-rockchip-inno-usb.patch         |    16 +-
 .../u-boot-sifive-prevent-reloc-initrd-fdt.patch   |    16 -
 .../xnnpack-for-torch2-system-libraries.patch      |  2660 ++
 gnu/packages/patchutils.scm                        |     2 +-
 gnu/packages/pdf.scm                               |    39 +-
 gnu/packages/php-xyz.scm                           |    50 +
 gnu/packages/plan9.scm                             |   136 +-
 gnu/packages/protobuf.scm                          |     4 +-
 gnu/packages/pypy.scm                              |    21 +-
 gnu/packages/python-check.scm                      |    32 +
 gnu/packages/python-science.scm                    |     1 +
 gnu/packages/python-xyz.scm                        |   328 +-
 gnu/packages/qt.scm                                |    95 +
 gnu/packages/racket.scm                            |    49 +-
 gnu/packages/radio.scm                             |     4 +-
 gnu/packages/rust-apps.scm                         |   558 +-
 gnu/packages/rust.scm                              |   278 +-
 gnu/packages/shellutils.scm                        |    81 +-
 gnu/packages/skarnet.scm                           |     7 +-
 gnu/packages/ssh.scm                               |    11 +-
 gnu/packages/sssd.scm                              |     4 +-
 gnu/packages/statistics.scm                        |   774 +-
 gnu/packages/syncthing.scm                         |     5 +-
 gnu/packages/syndication.scm                       |    50 +-
 gnu/packages/tbb.scm                               |    46 +-
 gnu/packages/telegram.scm                          |     2 +-
 gnu/packages/terminals.scm                         |     6 +-
 gnu/packages/text-editors.scm                      |    60 +
 gnu/packages/tls.scm                               |    10 +-
 gnu/packages/tor.scm                               |   289 +-
 gnu/packages/uucp.scm                              |     1 +
 gnu/packages/valgrind.scm                          |    10 +-
 gnu/packages/version-control.scm                   |   138 +-
 gnu/packages/video.scm                             |   268 +-
 gnu/packages/vim.scm                               |    55 +-
 gnu/packages/virtualization.scm                    |     6 +-
 gnu/packages/vnc.scm                               |     2 +-
 gnu/packages/vpn.scm                               |    11 +-
 gnu/packages/vulkan.scm                            |     7 +-
 gnu/packages/web-browsers.scm                      |    14 +-
 gnu/packages/web.scm                               |     9 +-
 gnu/packages/webkit.scm                            |    36 +-
 gnu/packages/wine.scm                              |   105 +-
 gnu/packages/wm.scm                                |    12 +-
 gnu/packages/xdisorg.scm                           |    57 +
 gnu/packages/xfce.scm                              |     8 +-
 gnu/packages/xorg.scm                              |    32 +-
 gnu/services/base.scm                              |    12 +-
 gnu/services/ci.scm                                |    42 +-
 gnu/services/databases.scm                         |    41 +-
 gnu/services/docker.scm                            |    14 +-
 gnu/services/guix.scm                              |   143 +-
 gnu/services/mail.scm                              |   200 +-
 gnu/services/messaging.scm                         |    91 +-
 gnu/services/networking.scm                        |    36 +-
 gnu/services/security-token.scm                    |    29 +-
 gnu/services/shepherd.scm                          |    21 +-
 gnu/services/telephony.scm                         |   132 +-
 gnu/services/web.scm                               |    54 +-
 gnu/services/xorg.scm                              |    15 +-
 gnu/system.scm                                     |     1 -
 gnu/system/examples/vm-image.tmpl                  |    28 +-
 gnu/system/file-systems.scm                        |     2 +-
 gnu/system/images/orangepi-r1-plus-lts-rk3328.scm  |    76 +
 gnu/system/install.scm                             |     7 +
 gnu/tests/mail.scm                                 |    67 +-
 gnu/tests/telephony.scm                            |    17 +-
 gnu/tests/virtualization.scm                       |     6 +-
 guix/build-system/cargo.scm                        |   139 +-
 guix/build-system/composer.scm                     |   166 +
 guix/build-system/gnu.scm                          |     7 +-
 guix/build-system/meson.scm                        |    14 +-
 guix/build-system/mix.scm                          |   186 +
 guix/build-system/zig.scm                          |   119 +-
 guix/build/cargo-build-system.scm                  |    69 +-
 guix/build/composer-build-system.scm               |   301 +
 guix/build/mix-build-system.scm                    |   161 +
 guix/build/syscalls.scm                            |     1 +
 guix/build/zig-build-system.scm                    |     7 +-
 guix/deprecation.scm                               |     2 +-
 guix/download.scm                                  |    26 +-
 guix/gexp.scm                                      |    31 +-
 guix/import/composer.scm                           |   268 +
 guix/import/cran.scm                               |    24 +-
 guix/import/go.scm                                 |    37 +-
 guix/least-authority.scm                           |    25 +-
 guix/platform.scm                                  |     3 +
 guix/platforms/arm.scm                             |     2 +
 guix/platforms/{mips.scm => avr.scm}               |    15 +-
 guix/platforms/mips.scm                            |     1 +
 guix/platforms/powerpc.scm                         |     3 +
 guix/platforms/riscv.scm                           |     1 +
 guix/platforms/x86.scm                             |    15 +
 guix/scripts/challenge.scm                         |    11 +-
 guix/scripts/download.scm                          |     2 +-
 guix/scripts/import.scm                            |     2 +-
 guix/scripts/import/composer.scm                   |   107 +
 guix/scripts/weather.scm                           |    61 +-
 guix/store.scm                                     |    18 +-
 guix/ui.scm                                        |     4 +-
 guix/utils.scm                                     |    18 +-
 nix/libstore/build.cc                              |     6 +
 nix/libstore/globals.cc                            |     4 +-
 nix/libstore/worker-protocol.hh                    |     5 +-
 nix/nix-daemon/nix-daemon.cc                       |    17 +
 po/doc/guix-cookbook.de.po                         |  2843 +-
 po/doc/guix-manual.de.po                           | 31471 +++++++++---------
 po/doc/guix-manual.fr.po                           | 31591 ++++++++++---------
 po/guix/de.po                                      |    16 +-
 po/guix/es.po                                      |     8 +-
 po/guix/it.po                                      |   126 +-
 po/guix/ja.po                                      |    84 +-
 po/guix/zh_CN.po                                   |    66 +-
 tests/composer.scm                                 |    88 +
 tests/gexp.scm                                     |    54 +
 tests/go.scm                                       |     6 +-
 tests/store.scm                                    |    25 +-
 tests/utils.scm                                    |    12 +
 257 files changed, 58433 insertions(+), 88198 deletions(-)

diff --cc gnu/packages/cross-base.scm
index 8569037c9a,6ee7b315d8..2c0155832c
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@@ -610,96 -654,127 +654,149 @@@ the base compiler.  Use XBINUTILS as th
                        (xbinutils (cross-binutils target))
                        (xheaders (cross-kernel-headers target)))
    "Return LIBC cross-built for TARGET, a GNU triplet. Use XGCC and XBINUTILS
- and the cross tool chain."
-   (if (target-mingw? target)
-       (let ((machine (substring target 0 (string-index target #\-))))
-         (make-mingw-w64 machine
-                         #:xgcc xgcc
-                         #:xbinutils xbinutils))
-       (package
-         (inherit libc)
-         (name (string-append "glibc-cross-" target))
-         (arguments
-          (substitute-keyword-arguments
-              `( ;; Disable stripping (see above.)
-                #:strip-binaries? #f
- 
-                ;; This package is used as a target input, but it should not 
have
-                ;; the usual cross-compilation inputs since that would include
-                ;; itself.
-                #:implicit-cross-inputs? #f
- 
-                ;; We need SRFI 26.
-                #:modules ((guix build gnu-build-system)
-                           (guix build utils)
-                           (srfi srfi-26))
- 
-                ,@(package-arguments libc))
-            ((#:configure-flags flags)
-             `(cons ,(string-append "--host=" target)
-                    ,(if (target-hurd? target)
-                         `(append (list "--disable-werror"
-                                        ,@%glibc/hurd-configure-flags)
-                                  ,flags)
-                         flags)))
-            ((#:phases phases)
-             `(modify-phases ,phases
-                (add-before 'configure 'set-cross-kernel-headers-path
-                  (lambda* (#:key inputs #:allow-other-keys)
-                    (let* ((kernel (assoc-ref inputs "kernel-headers"))
-                           (cpath (string-append kernel "/include")))
-                      (for-each (cut setenv <> cpath)
-                                ',%gcc-cross-include-paths)
-                      (setenv "CROSS_LIBRARY_PATH"
-                              (string-append kernel "/lib")) ; for Hurd's 
libihash
-                      #t)))
-                (add-before 'configure 'add-cross-binutils-to-PATH
-                  (lambda* (#:key inputs #:allow-other-keys)
-                    ;; Add BINUTILS/TARGET/bin to $PATH so that 'gcc
-                    ;; -print-prog-name=objdump' returns the correct name.  See
-                    ;; 
<https://inbox.sourceware.org/libc-alpha/d72f5f6f-cc3a-bd89-0800-ffb068928e0f@linaro.org/t/>.
-                    (define cross-objdump
-                      (search-input-file
-                       inputs
-                       (string-append ,target "/bin/objdump")))
- 
-                    (define cross-binutils
-                      (dirname cross-objdump))
- 
-                    (format #t "adding '~a' to the front of 'PATH'~%"
-                            cross-binutils)
-                    (setenv "PATH" (string-append cross-binutils ":"
-                                                  (getenv "PATH")))))
- 
-                ;; This phase would require running 'localedef' built for
-                ;; TARGET, which is impossible by definition.
-                (delete 'install-utf8-c-locale)
- 
-                ,@(if (target-hurd? target)
-                      '((add-after 'install 'augment-libc.so
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let* ((out (assoc-ref outputs "out")))
-                              (substitute* (string-append out "/lib/libc.so")
-                                (("/[^ ]+/lib/libc.so.0.3")
-                                 (string-append out "/lib/libc.so.0.3"
-                                                " libmachuser.so 
libhurduser.so"))))
-                            #t)))
-                      '())))))
- 
-         ;; Shadow the native "kernel-headers" because glibc's recipe expects 
the
-         ;; "kernel-headers" input to point to the right thing.
-         (propagated-inputs `(("kernel-headers" ,xheaders)))
- 
-         (native-inputs `(("cross-gcc" ,xgcc)
-                          ("cross-binutils" ,xbinutils)
-                          ,@(if (target-hurd? target)
-                                `(("cross-mig"
-                                   ,(cross-mig target
-                                               #:xgcc xgcc
-                                               #:xbinutils xbinutils)))
-                                '())
-                          ,@(package-inputs libc) ;FIXME: static-bash
-                          ,@(package-native-inputs libc))))))
+ and the cross tool chain.  If TARGET doesn't have a standard C library #f is
+ returned."
+   (match target
+    ((? target-mingw?)
+     (let ((machine (substring target 0 (string-index target #\-))))
+       (make-mingw-w64 machine
+                       #:xgcc xgcc
+                       #:xbinutils xbinutils)))
+    ((or (? target-linux?) (? target-hurd?))
+     (package
+       (inherit libc)
+       (name (string-append "glibc-cross-" target))
+       (arguments
+        (substitute-keyword-arguments
+          `(;; Disable stripping (see above.)
+            #:strip-binaries? #f
+ 
+            ;; This package is used as a target input, but it should not have
+            ;; the usual cross-compilation inputs since that would include
+            ;; itself.
+            #:implicit-cross-inputs? #f
+ 
+            ;; We need SRFI 26.
+            #:modules ((guix build gnu-build-system)
+                       (guix build utils)
+                       (srfi srfi-26))
+ 
+            ,@(package-arguments libc))
+          ((#:configure-flags flags)
+           `(cons ,(string-append "--host=" target)
+                  ,(if (target-hurd? target)
+                       `(append (list "--disable-werror"
+                                      ,@%glibc/hurd-configure-flags)
+                                ,flags)
+                       flags)))
+          ((#:phases phases)
+           `(modify-phases ,phases
+              (add-before 'configure 'set-cross-kernel-headers-path
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let* ((kernel (assoc-ref inputs "kernel-headers"))
+                         (cpath (string-append kernel "/include")))
+                    (for-each (cut setenv <> cpath)
+                              ',%gcc-cross-include-paths)
+                    (setenv "CROSS_LIBRARY_PATH"
 -                              (string-append kernel "/lib")) ; for Hurd's 
libihash
 -                      #t)))
++                           (string-append kernel "/lib")) ; for Hurd's 
libihash
++                   #t)))
++             (add-before 'configure 'add-cross-binutils-to-PATH
++               (lambda* (#:key inputs #:allow-other-keys)
++                 ;; Add BINUTILS/TARGET/bin to $PATH so that 'gcc
++                 ;; -print-prog-name=objdump' returns the correct name.  See
++                 ;; 
<https://inbox.sourceware.org/libc-alpha/d72f5f6f-cc3a-bd89-0800-ffb068928e0f@linaro.org/t/>.
++                 (define cross-objdump
++                   (search-input-file
++                    inputs
++                    (string-append ,target "/bin/objdump")))
++
++                 (define cross-binutils
++                   (dirname cross-objdump))
++
++                 (format #t "adding '~a' to the front of 'PATH'~%"
++                         cross-binutils)
++                 (setenv "PATH" (string-append cross-binutils ":"
++                                               (getenv "PATH")))))
++
++             ;; This phase would require running 'localedef' built for
++             ;; TARGET, which is impossible by definition.
++             (delete 'install-utf8-c-locale)
++
+              ,@(if (target-hurd? target)
+                    '((add-after 'install 'augment-libc.so
+                        (lambda* (#:key outputs #:allow-other-keys)
+                          (let* ((out (assoc-ref outputs "out")))
+                            (substitute* (string-append out "/lib/libc.so")
+                              (("/[^ ]+/lib/libc.so.0.3")
+                               (string-append out "/lib/libc.so.0.3"
+                                              " libmachuser.so 
libhurduser.so"))))
+                          #t)))
+                    '())))))
+ 
+       ;; Shadow the native "kernel-headers" because glibc's recipe expects the
+       ;; "kernel-headers" input to point to the right thing.
+       (propagated-inputs `(("kernel-headers" ,xheaders)))
+ 
+       (native-inputs `(("cross-gcc" ,xgcc)
+                        ("cross-binutils" ,xbinutils)
+                        ,@(if (target-hurd? target)
+                              `(("cross-mig"
+                                 ,(cross-mig target
+                                             #:xgcc xgcc
+                                             #:xbinutils xbinutils)))
+                              '())
+                        ,@(package-inputs libc) ;FIXME: static-bash
+                        ,@(package-native-inputs libc)))))
+    ((? target-avr?)
+     (make-avr-libc #:xbinutils xbinutils
+                    #:xgcc xgcc))
+    (else #f)))
+ 
+ (define* (cross-gcc-toolchain/implementation target
+                                              #:key
+                                              (base-gcc %xgcc)
+                                              (xbinutils (cross-binutils 
target))
+                                              (libc (cross-libc
+                                                      target
+                                                      #:xgcc (cross-gcc target 
#:xgcc base-gcc)
+                                                      #:xbinutils xbinutils))
+                                              (xgcc (cross-gcc target
+                                                               #:xgcc base-gcc
+                                                               #:libc libc
+                                                               #:xbinutils 
xbinutils)))
+   "Returns PACKAGE that contains a cross-compilation tool chain for TARGET
+ with XBINUTILS, XGCC and LIBC (if exists for TARGET)."
+   (package
+     (name (string-append (package-name xgcc) "-toolchain"))
+     (version (package-version xgcc))
+     (source #f)
+     (build-system trivial-build-system)
+     (arguments
+      (list #:modules '((guix build union))
+            #:builder
+            #~(begin
+                (use-modules (ice-9 match)
+                             (guix build union))
+ 
+                (match %build-inputs
+                  (((names . directory) ...)
+                   (union-build #$output directory))))))
+     (inputs `(,xbinutils ,xgcc ,@(if libc (list libc) '())))
+     (home-page (package-home-page xgcc))
+     (synopsis
+      (format #f "Complete GCC tool chain for C/C++ development (~a)" target))
+     (description "This package provides a complete GCC cross toolchain for
+ C/C++ development to be installed in user profiles.  This includes GCC, as
+ well as libc (headers and binariesl), and Binutils.  GCC is the GNU Compiler
+ Collection.")
+     (license (delete-duplicates `(,(package-license xgcc)
+                                   ,(package-license xbinutils)
+                                   ,@(if libc
+                                         (list (package-license libc))
+                                         '()))))))
+ 
+ (define cross-gcc-toolchain
+   (memoize cross-gcc-toolchain/implementation))
  
  
  ;;; Concrete cross tool chains are instantiated like this:
diff --cc gnu/packages/dezyne.scm
index a1dcb05213,a5732f75bf..32adefe8b6
--- a/gnu/packages/dezyne.scm
+++ b/gnu/packages/dezyne.scm
@@@ -105,3 -111,43 +111,43 @@@ has formal semantics expressed in @url{
      (license (list license:agpl3+       ;Dezyne itself
                     license:lgpl3+       ;Dezyne runtime library
                     license:cc0)))) ;Code snippets, images, test data
+ 
+ (define-public scmackerel
+   (package
+     (name "scmackerel")
+     (version "0.5.3")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://dezyne.org/download/scmackerel/";
+                            name "-" version ".tar.gz"))
+        (sha256
+         (base32 "1sgrkw3idsni1ylf0slwgzzwq31b1yx6s0j17yq99c88agk9cvd6"))))
+     (inputs (list bash-minimal
+                   guile-3.0
+                   guile-readline
+                   mcrl2-minimal))
+     (native-inputs (list guile-3.0 pkg-config))
+     (build-system gnu-build-system)
+     (arguments
+      (list
+       #:modules `((ice-9 popen)
 -                  ,@%gnu-build-system-modules)
++                  ,@%default-gnu-modules)
+       #:phases
+       #~(modify-phases %standard-phases
+           (add-before 'configure 'setenv
+             (lambda _
+               (setenv "GUILE_AUTO_COMPILE" "0")))
+           (add-after 'install 'install-readmes
+             (lambda _
+               (let* ((base (string-append #$name "-" #$version))
+                      (doc (string-append #$output "/share/doc/" base)))
+                 (mkdir-p doc)
+                 (copy-file "NEWS" (string-append doc "/NEWS"))))))))
+     (synopsis "AST library in GNU Guile")
+     (description "SCMackerel is a library in GNU Guile to create abstract
+ syntax trees (ASTs).  Initially written for @url{https://mcrl2.org,mCRL2} and
+ now also supporting other languages, such as C, C++, and C#.  Based on GNU
+ Guix records.")
+     (home-page "https://gitlab.com/janneke/scmackerel";)
+     (license (list license:gpl3+))))
diff --cc gnu/packages/gnupg.scm
index a535201265,a6ba57d7f3..70ed84a111
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@@ -21,8 -21,9 +21,9 @@@
  ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
  ;;; Copyright © 2021 Nikita Domnitskii <nikita@domnitskii.me>
  ;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org>
 -;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 +;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+ ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
diff --cc gnu/packages/guile-xyz.scm
index c4b64a9100,75e3754046..bd7be0237a
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@@ -5433,49 -5576,41 +5572,41 @@@ high-level API for network management t
               (commit (string-append "v" version))))
         (file-name (string-append name "-" version))
         (sha256
-         (base32
-          "0srkmchd4kmfa7q65r6fdzwklhgdlck1ll0s7smzs8ddjdgz2lwm"))))
+         (base32 "0srkmchd4kmfa7q65r6fdzwklhgdlck1ll0s7smzs8ddjdgz2lwm"))))
      (build-system gnu-build-system)
      (arguments
-      `(#:make-flags '("GUILE_AUTO_COMPILE=0")     ;to prevent guild warnings
+      `(#:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
         #:modules (((guix build guile-build-system)
                     #:select (target-guile-effective-version))
 -                  ,@%gnu-build-system-modules)
 +                  ,@%default-gnu-modules)
         #:imported-modules ((guix build guile-build-system)
 -                           ,@%gnu-build-system-modules)
 +                           ,@%default-gnu-imported-modules)
-        #:phases
-        (modify-phases %standard-phases
-          (add-after 'install 'wrap-program
-            (lambda* (#:key inputs outputs #:allow-other-keys)
-              (let* ((out       (assoc-ref outputs "out"))
-                     (bin       (string-append out "/bin"))
-                     (guile-lib (assoc-ref inputs "guile-lib"))
-                     (json      (assoc-ref inputs "guile-json"))
-                     (tls       (assoc-ref inputs "guile-gnutls"))
-                     (version   (target-guile-effective-version))
-                     (scm       (string-append "/share/guile/site/"
-                                               version))
-                     (go        (string-append  "/lib/guile/"
-                                                version "/site-ccache")))
-                (wrap-program (string-append bin "/gitlab-cli")
-                  `("GUILE_LOAD_PATH" prefix
-                    (,(string-append out scm)
-                     ,(string-append guile-lib scm)
-                     ,(string-append json scm)
-                     ,(string-append tls scm)))
-                  `("GUILE_LOAD_COMPILED_PATH" prefix
-                    (,(string-append out go)
-                     ,(string-append guile-lib go)
-                     ,(string-append json go)
-                     ,(string-append tls go))))))))))
-     (native-inputs
-      (list autoconf automake pkg-config texinfo))
-     (inputs
-      `(("bash" ,bash-minimal)
-        ("guile" ,guile-2.2)
-        ("guile-json" ,guile2.2-json)
-        ("guile-lib" ,guile2.2-lib)
-        ("guile-gnutls" ,guile2.2-gnutls)))
+        #:phases (modify-phases %standard-phases
+                   (add-after 'install 'wrap-program
+                     (lambda* (#:key inputs outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (bin (string-append out "/bin"))
+                              (guile-lib (assoc-ref inputs "guile2.2-lib"))
+                              (json (assoc-ref inputs "guile2.2-json"))
+                              (tls (assoc-ref inputs "guile2.2-gnutls"))
+                              (version (target-guile-effective-version))
+                              (scm (string-append "/share/guile/site/" 
version))
+                              (go (string-append "/lib/guile/" version
+                                                 "/site-ccache")))
+                         (wrap-program (string-append bin "/gitlab-cli")
+                           `("GUILE_LOAD_PATH" prefix
+                             (,(string-append out scm) ,(string-append
+                                                         guile-lib scm)
+                              ,(string-append json scm)
+                              ,(string-append tls scm)))
+                           `("GUILE_LOAD_COMPILED_PATH" prefix
+                             (,(string-append out go) ,(string-append guile-lib
+                                                        go)
+                              ,(string-append json go)
+                              ,(string-append tls go))))))))))
+     (native-inputs (list autoconf automake pkg-config texinfo))
+     (inputs (list bash-minimal guile-2.2 guile2.2-json guile2.2-lib
+                   guile2.2-gnutls))
      (home-page "https://github.com/artyom-poptsov/guile-gitlab";)
      (synopsis "Guile interface to GitLab")
      (description
diff --cc gnu/packages/multiprecision.scm
index 39cfd660ce,591170b508..5221d1ec0b
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@@ -6,9 -6,9 +6,9 @@@
  ;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
  ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
  ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
- ;;; Copyright © 2018, 2019, 2021, 2023 Efraim Flashner <efraim@flashner.co.il>
+ ;;; Copyright © 2018, 2019, 2021, 2023, 2024 Efraim Flashner 
<efraim@flashner.co.il>
  ;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
 -;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 +;;; Copyright © 2022, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
  ;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
  ;;;
@@@ -45,37 -45,57 +45,39 @@@
  
  (define-public gmp
    (package
 -   (name "gmp")
 -   (version "6.2.1")
 -   (source (origin
 -            (method url-fetch)
 -            (uri
 -             (string-append "mirror://gnu/gmp/gmp-"
 -                            version ".tar.xz"))
 -            (sha256
 -             (base32
 -              "1wml97fdmpcynsbw9yl77rj29qibfp652d0w3222zlfx5j8jjj7x"))
 -            (patches (search-patches "gmp-faulty-test.patch"))))
 -   (build-system gnu-build-system)
 -   (native-inputs (list m4))
 -   (outputs '("out" "debug"))
 -   (arguments
 -    `(#:parallel-tests? #f ; mpz/reuse fails otherwise
 +    (name "gmp")
 +    (version "6.3.0")
 +    (source (origin
 +              (method url-fetch)
 +              (uri
 +               (string-append "mirror://gnu/gmp/gmp-"
 +                              version ".tar.xz"))
 +              (sha256
 +               (base32
 +                "1648ad1mr7c1r8lkkqshrv1jfjgfdb30plsadxhni7mq041bihm3"))
 +              (patches (search-patches "gmp-faulty-test.patch"))))
 +    (build-system gnu-build-system)
 +    (native-inputs (list m4))
 +    (outputs '("out" "debug"))
 +    (arguments
 +     (list
 +      #:parallel-tests? #f              ; mpz/reuse fails otherwise
        #:configure-flags
 -      '(;; Build a "fat binary", with routines for several
 -        ;; sub-architectures.
 -        "--enable-fat"
 -        "--enable-cxx"
 -        ,@(cond ((target-mingw?)
 -                 ;; Static and shared cannot be built in one go:
 -                 ;; they produce different headers.  We need shared.
 -                 `("--disable-static"
 -                   "--enable-shared"))
 -                ((target-x32?)
 -                 `("ABI=x32"))
 -                (else '())))
 -      ;; Remove after core-updates merge.
 -      ;; Workaround for gcc-7 transition breakage, -system and cross-build,
 -      ;; Note: See <http://bugs.gnu.org/22186> for why not 'CPATH'.
 -      ;; Note: See <http://bugs.gnu.org/30756> for why not 'C_INCLUDE_PATH' & 
co.
 -      ,@(if (target-mingw?)
 -            `(#:phases
 -              (modify-phases %standard-phases
 -                (add-before 'configure 'setenv
 -                  (lambda _
 -                    (let ((gcc (assoc-ref %build-inputs "cross-gcc"))
 -                          (libc (assoc-ref %build-inputs "cross-libc")))
 -                      (setenv "CROSS_CPLUS_INCLUDE_PATH"
 -                              (string-append gcc "/include/c++"
 -                                             ":" gcc "/include"
 -                                             ":" libc "/include"))
 -                      (format #t "environment variable 
`CROSS_CPLUS_INCLUDE_PATH' set to `~a'\n"
 -                              (getenv "CROSS_CPLUS_INCLUDE_PATH"))
 -                      #t)))))
 -            '())))
 -   (synopsis "Multiple-precision arithmetic library")
 -   (description
 -    "The @acronym{GMP, the GNU Multiple Precision Arithmetic} library performs
 +      #~(list
 +         ;; Build a "fat binary", with routines for several sub-architectures.
 +         "--enable-fat"
 +         "--enable-cxx"
-          #$@(if (target-mingw?)
-                 ;; Static and shared cannot be built in one go: they produce
-                 ;; different headers.  We need shared.
-                 '("--disable-static"
-                   "--enable-shared")
-                 '()))))
++         #$@(cond ((target-mingw?)
++                   ;; Static and shared cannot be built in one go: they
++                   ;; produce different headers.  We need shared.
++                   '("--disable-static"
++                     "--enable-shared"))
++                  ((target-x32?)
++                   `("ABI=x32"))
++                  (else '())))))
 +    (synopsis "Multiple-precision arithmetic library")
 +    (description
 +     "The @acronym{GMP, the GNU Multiple Precision Arithmetic} library 
performs
  arbitrary-precision arithmetic on signed integers, rational numbers and 
floating
  point numbers.  The precision is only limited by the available memory.
  The library is highly optimized, with a design focus on execution speed.
diff --cc gnu/packages/statistics.scm
index 26c1ac14ec,712b1a9c37..95cfc4e652
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@@ -6943,18 -6804,58 +6804,58 @@@ Java package that provides routines fo
        (build-system gnu-build-system)
        (arguments
         (let ((base-directory "/share/emacs/site-lisp"))
-          `(#:make-flags (list (string-append "PREFIX=" %output)
-                               (string-append "ETCDIR=" %output
-                                              ,base-directory "/etc")
-                               (string-append "LISPDIR=" %output
-                                              ,base-directory)
-                               (string-append "INFODIR=" %output
-                                              "/share/info"))
-            #:phases
-            (modify-phases %standard-phases
-              (delete 'configure)
-              (replace 'check
-                (lambda _ (invoke "make" "test")))))))
+          (list
+           #:modules '((guix build gnu-build-system)
+                       (guix build utils)
+                       (guix build emacs-utils))
 -          #:imported-modules `(,@%gnu-build-system-modules
++          #:imported-modules `(,@%default-gnu-imported-modules
+                                (guix build emacs-build-system)
+                                (guix build emacs-utils))
+           #:make-flags
+           #~(list (string-append "PREFIX=" #$output)
+                   (string-append "ETCDIR=" #$output #$base-directory "/etc")
+                   (string-append "LISPDIR=" #$output #$base-directory)
+                   (string-append "INFODIR=" #$output "/share/info"))
+           #:phases
+           #~(modify-phases %standard-phases
+               (delete 'configure)
+               (add-before 'check 'skip-failing-tests
+                 ;; XXX: Skip 10 failing tests (out of 187).
+                 (lambda _
+                   (let-syntax
+                       ((disable-tests
+                         (syntax-rules ()
+                           ((_ file ())
+                            (syntax-error "test names list must not be empty"))
+                           ((_ file (test-name ...))
+                            (substitute* file
+                              (((string-append "^\\(ert-deftest " test-name 
".*")
+                                all)
+                               (string-append all "(skip-unless nil)\n"))
+                              ...)))))
+                     (disable-tests (list "test/ess-test-inf.el"
+                                          "test/ess-test-r.el")
+                                    ("ess--derive-connection-path"
+                                     "ess-eval-line-test"
+                                     "ess-eval-region-test"
+                                     "ess-mock-remote-process"
+                                     "ess-r-load-ESSR-github-fetch-no"
+                                     "ess-r-load-ESSR-github-fetch-yes"
+                                     "ess-set-working-directory-test"
+                                     "ess-test-r-startup-directory")))
+                   ;; The two tests below use a different syntax.
+                   (emacs-batch-edit-file "test/ess-test-r-eval.el"
+                     '(progn
+                       (mapc (lambda (test)
+                               (goto-char (point-min))
+                               (search-forward (format "etest-deftest %s " 
test))
+                               (beginning-of-line)
+                               (kill-sexp))
+                             '("ess-r-eval-ns-env-roxy-tracebug-test"
+                               "ess-r-eval-sink-freeze-test"))
+                       (basic-save-buffer)))))
+               (replace 'check
+                 (lambda _ (invoke "make" "test")))))))
        (native-inputs
         (list perl r-roxygen2 texinfo))
        (inputs
diff --cc gnu/packages/text-editors.scm
index daeb4a9860,0769dacc86..5b07d5cfb4
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@@ -102,6 -109,37 +109,37 @@@
    #:use-module (gnu packages xml)
    #:use-module (gnu packages xorg))
  
+ (define-public ed
+   (package
+     (name "ed")
 -    (version "1.18")
++    (version "1.19")
+     (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/ed/ed-"
+                                  version ".tar.lz"))
+              (sha256
+               (base32
 -               "0krb8rsb0cd8mgz0c5pqgnjbbrj7zjl7mf9099r8gi80k2nyza5c"))))
++               "0j6dfznfhll4afvrr714nrz0pp5zkcyvkb4xs2bam42789f2wbyf"))))
+     (build-system gnu-build-system)
+     (native-inputs (list lzip))
+     (arguments
+      `(#:configure-flags (list ,(string-append "CC=" (cc-for-target)))
+        #:phases
+        (modify-phases %standard-phases
+          (add-before 'patch-source-shebangs 'patch-test-suite
+                      (lambda _
+                        (substitute* "testsuite/check.sh"
+                          (("/bin/sh") (which "sh"))))))))
+     (home-page "https://www.gnu.org/software/ed/";)
+     (synopsis "Line-oriented text editor")
+     (description
+      "Ed is a line-oriented text editor: rather than offering an overview of
+ a document, ed performs editing one line at a time.  It can be executed both
+ interactively and via shell scripts.  Its method of command input allows
+ complex tasks to be performed in an automated way.  GNU ed offers several
+ extensions over the standard utility.")
+     (license license:gpl3+)))
+ 
  (define-public vis
    (package
      (name "vis")
diff --cc gnu/packages/tls.scm
index 9baf371a47,806a761d9b..426398114f
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@@ -199,7 -199,8 +199,7 @@@ living in the same process."
  (define-public gnutls
    (package
      (name "gnutls")
-     (version "3.8.1")
 -    (version "3.7.7")
 -    (replacement gnutls-3.8.2)
++    (version "3.8.2")
      (source (origin
                (method url-fetch)
                ;; Note: Releases are no longer on ftp.gnu.org since the
@@@ -207,10 -208,11 +207,10 @@@
                (uri (string-append "mirror://gnupg/gnutls/v"
                                    (version-major+minor version)
                                    "/gnutls-" version ".tar.xz"))
 -              (patches (search-patches "gnutls-skip-trust-store-test.patch"
 -                                       "gnutls-cross.patch"))
 +              (patches (search-patches "gnutls-skip-trust-store-test.patch"))
                (sha256
                 (base32
-                 "1742jiigwsfhx7nj5rz7dwqr8d46npsph6b68j7siar0mqarx2xs"))))
 -                "01i1gl15k6qwvxmxx0by1mn9nlmcmym18wdpm7dn9awfsp8474dy"))))
++                "0xzgmp1ck5ifvdki4jg29r278w2p1m3a0qz38g99v6zsdw0yarg7"))))
      (build-system gnu-build-system)
      (arguments
       (list #:tests? (not (or (%current-target-system)
diff --cc gnu/packages/version-control.scm
index 4c09de1954,40d7a00dae..4b8cbbef88
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@@ -48,9 -48,8 +48,10 @@@
  ;;; Copyright © 2022 Dhruvin Gandhi <contact@dhruvin.dev>
  ;;; Copyright © 2015, 2022 David Thompson <davet@gnu.org>
  ;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
 +;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
  ;;; Copyright © 2023 Kjartan Oli Agustsson <kjartanoli@disroot.org>
 +;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
+ ;;; Copyright © 2023 Steve George <steve@futurile.net>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
diff --cc gnu/packages/xdisorg.scm
index 4b5d03836d,449cbbaf6e..4774cc0a60
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@@ -2947,6 -2932,62 +2948,62 @@@ can optionally use some appearance sett
      (home-page "https://jgmenu.github.io/";)
      (license license:gpl2)))
  
+ (define-public x-resize
+   (package
+     (name "x-resize")
+     (version "0.2")
+     (source (origin
+               (method git-fetch)
+               (uri (git-reference
+                     (url "https://gitlab.com/Apteryks/x-resize";)
+                     (commit version)))
+               (file-name (git-file-name name version))
+               (sha256
+                (base32
+                 "10y2p55m5hbrma01kixsppq1a3ld0q1jk8hwx1d1jfgw9vd243j8"))))
+     (build-system gnu-build-system)
+     (arguments
+      (list
+       #:tests? #f                       ;no test suite
+       #:modules `(((guix build guile-build-system)
+                    #:select (target-guile-effective-version))
 -                  ,@%gnu-build-system-modules
++                  ,@%default-gnu-modules
+                   (srfi srfi-26))
+       #:phases
+       (with-imported-modules `((guix build guile-build-system)
 -                               ,@%gnu-build-system-modules)
++                               ,@%default-gnu-modules)
+         #~(modify-phases %standard-phases
+             (add-after 'install 'wrap
+               (lambda* (#:key inputs #:allow-other-keys)
+                 (let* ((version (target-guile-effective-version))
+                        (site-ccache (string-append "/lib/guile/" version
+                                                    "/site-ccache"))
+                        (site (string-append "/share/guile/site/" version))
+                        (dep-path
+                         (lambda (env path)
+                           (list env '=
+                                 (map (cut string-append <> path)
+                                      (list #$output
+                                            #$(this-package-input
+                                               "guile-lib")
+                                            #$(this-package-input
+                                               "guile-udev"))))))
+                        (bin (string-append #$output "/bin/")))
+                   (wrap-program (string-append bin "x-resize")
+                     (dep-path "GUILE_LOAD_PATH" site)
+                     (dep-path "GUILE_LOAD_COMPILED_PATH" site-ccache)
+                     (dep-path "GUILE_EXTENSIONS_PATH" "/lib")))))))))
+     (native-inputs (list autoconf automake guile-3.0 pkg-config))
+     (inputs (list guile-lib guile-udev xrandr))
+     (home-page "https://gitlab.com/Apteryks/x-resize/";)
+     (synopsis "Dynamic display resizing leveraging udev events")
+     (description "The @command{x-resize} command detects physical display
+ resolution changes via udev and invokes the @command{xrandr} command to
+ reconfigure the active display resolution accordingly.  It can be used to
+ implement dynamic resize support for desktop environments that lack native
+ support such as Xfce.")
+     (license license:gpl3+)))
+ 
  (define-public xwallpaper
    (package
      (name "xwallpaper")
diff --cc guix/build-system/composer.scm
index 0000000000,2ad7bbb36a..48ad90f253
mode 000000,100644..100644
--- a/guix/build-system/composer.scm
+++ b/guix/build-system/composer.scm
@@@ -1,0 -1,166 +1,166 @@@
+ ;;; GNU Guix --- Functional package management for GNU
+ ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
+ ;;;
+ ;;; This file is part of GNU Guix.
+ ;;;
+ ;;; GNU Guix is free software; you can redistribute it and/or modify it
+ ;;; under the terms of the GNU General Public License as published by
+ ;;; the Free Software Foundation; either version 3 of the License, or (at
+ ;;; your option) any later version.
+ ;;;
+ ;;; GNU Guix is distributed in the hope that it will be useful, but
+ ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+ ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ ;;; GNU General Public License for more details.
+ ;;;
+ ;;; You should have received a copy of the GNU General Public License
+ ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+ 
+ (define-module (guix build-system composer)
+   #:use-module (guix store)
+   #:use-module (guix utils)
+   #:use-module (guix derivations)
+   #:use-module (guix search-paths)
+   #:use-module (guix build-system)
+   #:use-module (guix build-system gnu)
+   #:use-module (guix gexp)
+   #:use-module (guix packages)
+   #:use-module (gnu packages)
+   #:use-module (ice-9 match)
+   #:use-module (srfi srfi-1)
+   #:export (%composer-build-system-modules
+             lower
+             composer-build
+             composer-build-system))
+ 
+ ;; Commentary:
+ ;;
+ ;; Standard build procedure for PHP packages using Composer. This is 
implemented
+ ;; as an extension of `gnu-build-system'.
+ ;;
+ ;; Code:
+ 
+ (define (default-php)
+   "Return the default PHP package."
+ 
+   ;; Do not use `@' to avoid introducing circular dependencies.
+   (let ((module (resolve-interface '(gnu packages php))))
+     (module-ref module 'php)))
+ 
+ (define (default-findclass)
+   "Return the default findclass script."
+   (search-auxiliary-file "findclass.php"))
+ 
+ (define (default-composer-classloader)
+   "Return the default composer-classloader package."
+ 
+   ;; Do not use `@' to avoid introducing circular dependencies.
+   (let ((module (resolve-interface '(gnu packages php-xyz))))
+     (module-ref module 'composer-classloader)))
+ 
+ (define %composer-build-system-modules
+   ;; Build-side modules imported by default.
+   `((guix build composer-build-system)
+     (guix build union)
 -    ,@%gnu-build-system-modules))
++    ,@%default-gnu-imported-modules))
+ 
+ (define* (lower name
+                 #:key source inputs native-inputs outputs system target
+                 (php (default-php))
+                 (composer-classloader (default-composer-classloader))
+                 (findclass (default-findclass))
+                 #:allow-other-keys
+                 #:rest arguments)
+   "Return a bag for NAME."
+   (define private-keywords
+     '(#:target #:php #:composer-classloader #:findclass #:inputs 
#:native-inputs))
+ 
+   (and (not target)                               ;XXX: no cross-compilation
+        (bag
+          (name name)
+          (system system)
+          (host-inputs `(,@(if source
+                               `(("source" ,source))
+                               '())
+                         ,@inputs
+ 
+                         ;; Keep the standard inputs of 'gnu-build-system'.
+                         ,@(standard-packages)))
+          (build-inputs `(("php" ,php)
+                          ("findclass.php" ,findclass)
+                        ("composer-classloader" ,composer-classloader)
+                          ,@native-inputs))
+          (outputs outputs)
+          (build composer-build)
+          (arguments (strip-keyword-arguments private-keywords arguments)))))
+ 
+ (define* (composer-build name inputs
+                          #:key
+                          guile source
+                          (outputs '("out"))
+                          (configure-flags ''())
+                          (search-paths '())
+                          (out-of-source? #t)
+                          (composer-file "composer.json")
+                          (tests? #t)
+                          (test-target "test")
+                          (test-flags ''())
+                          (install-target "install")
+                          (validate-runpath? #t)
+                          (patch-shebangs? #t)
+                          (strip-binaries? #t)
+                          (strip-flags #~'("--strip-debug"))
+                          (strip-directories #~'("lib" "lib64" "libexec"
+                                                "bin" "sbin"))
+                          (phases '(@ (guix build composer-build-system)
+                                      %standard-phases))
+                          (system (%current-system))
+                          (imported-modules %composer-build-system-modules)
+                          (modules '((guix build composer-build-system)
+                                     (guix build utils))))
+   "Build SOURCE using PHP, and with INPUTS. This assumes that SOURCE provides
+ a 'composer.json' file as its build system."
+   (define guile-json
+     (module-ref (resolve-interface '(gnu packages guile))
+                 'guile-json-4))
+ 
+   (define builder
+     (with-extensions (list guile-json)
+       (with-imported-modules imported-modules
+         #~(begin
+             (use-modules #$@(sexp->gexp modules))
+ 
+             #$(with-build-variables inputs outputs
+                 #~(composer-build
+                    #:source #$source
+                    #:system #$system
+                    #:outputs %outputs
+                    #:inputs %build-inputs
+                    #:search-paths '#$(map search-path-specification->sexp
+                                           search-paths)
+                    #:phases #$phases
+                    #:out-of-source? #$out-of-source?
+                    #:composer-file #$composer-file
+                    #:tests? #$tests?
+                    #:test-target #$test-target
+                    #:test-flags #$test-flags
+                    #:install-target #$install-target
+                    #:validate-runpath? #$validate-runpath?
+                    #:patch-shebangs? #$patch-shebangs?
+                    #:strip-binaries? #$strip-binaries?
+                    #:strip-flags #$strip-flags
+                    #:strip-directories #$strip-directories))))))
+ 
+   (gexp->derivation name builder
+                     #:system system
+                     #:target #f
+                     #:graft? #f
+                     #:guile-for-build guile))
+ 
+ (define composer-build-system
+   (build-system
+     (name 'composer)
+     (description "The standard Composer build system")
+     (lower lower)))
+ 
+ ;;; composer.scm ends here
diff --cc guix/build-system/mix.scm
index 0000000000,1b04053d70..c3c5821082
mode 000000,100644..100644
--- a/guix/build-system/mix.scm
+++ b/guix/build-system/mix.scm
@@@ -1,0 -1,186 +1,186 @@@
+ ;;; GNU Guix --- Functional package management for GNU
+ ;;; Copyright © 2023 Pierre-Henry Fröhring <contact@phfrohring.com>
+ ;;;
+ ;;; This file is part of GNU Guix.
+ ;;;
+ ;;; GNU Guix is free software; you can redistribute it and/or modify it
+ ;;; under the terms of the GNU General Public License as published by
+ ;;; the Free Software Foundation; either version 3 of the License, or (at
+ ;;; your option) any later version.
+ ;;;
+ ;;; GNU Guix is distributed in the hope that it will be useful, but
+ ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+ ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ ;;; GNU General Public License for more details.
+ ;;;
+ ;;; You should have received a copy of the GNU General Public License
+ ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+ 
+ ;; Commentary:
+ ;;
+ ;; Standard build procedure for Elixir packages using 'mix'.  This is
+ ;; implemented as an extension of 'gnu-build-system'.
+ ;;
+ ;; Code:
+ 
+ (define-module (guix build-system mix)
+   #:use-module (guix build mix-build-system)
+   #:use-module (guix build-system gnu)
+   #:use-module (guix build-system)
+   #:use-module (guix gexp)
+   #:use-module (guix monads)
+   #:use-module (guix packages)
+   #:use-module (guix search-paths)
+   #:use-module (guix store)
+   #:use-module (guix utils)
+   #:use-module (ice-9 match)
+   #:use-module (srfi srfi-1)
+   #:use-module (srfi srfi-26)
+   #:export (mix-build-system hexpm-uri))
+ 
+ ;; Lazily resolve bindings to avoid circular dependencies.
+ (define (default-glibc-utf8-locales)
+   (let* ((base (resolve-interface '(gnu packages base))))
+     (module-ref base 'glibc-utf8-locales)))
+ 
+ (define (default-elixir-hex)
+   (let ((elixir (resolve-interface '(gnu packages elixir))))
+     (module-ref elixir 'elixir-hex)))
+ 
+ (define (default-rebar3)
+   (let ((erlang (resolve-interface '(gnu packages erlang))))
+     (module-ref erlang 'rebar3)))
+ 
+ (define (default-elixir)
+   (let ((elixir (resolve-interface '(gnu packages elixir))))
+     (module-ref elixir 'elixir)))
+ 
+ (define* (strip-prefix name #:optional (prefix "elixir-"))
+   "Return NAME without the prefix PREFIX."
+   (if (string-prefix? prefix name)
+       (string-drop name (string-length prefix))
+       name))
+ 
+ (define (hexpm-uri name version)
+   "Return the URI where to fetch the sources of a Hex package NAME at VERSION.
+ NAME is the name of the package which should look like: elixir-pkg-name-X.Y.Z
+ See: https://github.com/hexpm/specifications/blob/main/endpoints.md";
+   ((compose
+     (cute string-append "https://repo.hex.pm/tarballs/"; <> "-" version ".tar")
+     (cute string-replace-substring <> "-" "_")
+     strip-prefix)
+    name))
+ 
+ ;; A number of environment variables specific to the Mix build system are
+ ;; reflected here.  They are documented at
+ ;; https://hexdocs.pm/mix/1.15.7/Mix.html#module-environment-variables.  Other
+ ;; parameters located in mix.exs are defined at
+ ;; https://hexdocs.pm/mix/1.15.7/Mix.Project.html#module-configuration
+ (define* (mix-build name
+                     inputs
+                     #:key
+                     source
+                     (tests? #t)
+                     (mix-path #f) ;See MIX_PATH.
+                     (mix-exs "mix.exs") ;See MIX_EXS.
+                     (build-per-environment #t) ;See :build_per_environment.
+                     (phases '%standard-phases)
+                     (outputs '("out"))
+                     (search-paths '())
+                     (system (%current-system))
+                     (guile #f)
+                     (imported-modules `((guix build mix-build-system)
 -                                        ,@%gnu-build-system-modules))
++                                        ,@%default-gnu-imported-modules))
+                     (modules '((guix build mix-build-system)
+                                (guix build utils))))
+   "Build SOURCE using Elixir, and with INPUTS."
+ 
+   ;; Check the documentation of :build_per_environment here:
+   ;; https://hexdocs.pm/mix/1.15.7/Mix.Project.html#module-configuration And
+   ;; "Environments" here:
+   ;; https://hexdocs.pm/mix/1.15.7/Mix.html#module-environments
+   (define mix-environments
+     (if build-per-environment
+         `("prod" ,@(if tests? '("test") '()))
+         '("shared")))
+ 
+   (define builder
+     (with-imported-modules imported-modules
+       #~(begin
+ 
+           (use-modules #$@(sexp->gexp modules))
+ 
+           #$(with-build-variables inputs outputs
+               #~(mix-build #:name #$name
+                            #:source #+source
+                            #:system #$system
+                            #:tests? #$tests?
+                            #:mix-path #$mix-path
+                            #:mix-exs #$mix-exs
+                            #:mix-environments '#$mix-environments
+                            #:build-per-environment #$build-per-environment
+                            #:phases #$(if (pair? phases)
+                                           (sexp->gexp phases)
+                                           phases)
+                            #:outputs %outputs
+                            #:search-paths '#$(sexp->gexp
+                                               (map
+                                                search-path-specification->sexp
+                                                search-paths))
+                            #:inputs
+                            %build-inputs)))))
+ 
+   (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+                                                   system
+                                                   #:graft? #f)))
+     (gexp->derivation name
+                       builder
+                       #:system system
+                       #:graft? #f       ;consistent with 'gnu-build'
+                       #:target #f
+                       #:guile-for-build guile)))
+ 
+ (define* (lower name
+                 #:key
+                 (elixir (default-elixir))
+                 (elixir-hex (default-elixir-hex))
+                 (glibc-utf8-locales (default-glibc-utf8-locales))
+                 (inputs '())
+                 (native-inputs '())
+                 (propagated-inputs '())
+                 (rebar3 (default-rebar3))
+                 (tests? #t)
+                 outputs
+                 source
+                 system
+                 target
+                 #:allow-other-keys #:rest arguments)
+   "Return a bag for NAME."
+   (let ((private-keywords
+          '(#:inputs #:native-inputs
+            #:outputs #:system #:target
+            #:elixir #:elixir-hex #:glibc-utf8-locales
+            #:rebar3 #:erlang))
+         (build-inputs
+          `(,@(standard-packages)
+            ("glibc-utf8-locales" ,glibc-utf8-locales)
+            ("erlang" ,(lookup-package-input elixir "erlang"))
+            ("rebar3" ,rebar3)
+            ("elixir" ,elixir)
+            ("elixir-hex" ,elixir-hex)
+            ,@inputs
+            ,@native-inputs)))
+   (bag (name name)
+        (system system)
+        (build-inputs build-inputs)
+        (host-inputs (if target inputs '()))
+        (outputs outputs)
+        (build mix-build)
+        (arguments (strip-keyword-arguments private-keywords arguments)))))
+ 
+ (define mix-build-system
+   (build-system (name 'mix)
+                 (description "The standard Mix build system")
+                 (lower lower)))
+ 
+ ;;; mix.scm ends here
diff --cc guix/build-system/zig.scm
index 41751f9116,1fa4782a2e..ad8a96b607
--- a/guix/build-system/zig.scm
+++ b/guix/build-system/zig.scm
@@@ -39,8 -39,7 +39,7 @@@
  (define %zig-build-system-modules
    ;; Build-side modules imported by default.
    `((guix build zig-build-system)
-     (guix build syscalls)
 -    ,@%gnu-build-system-modules))
 +    ,@%default-gnu-imported-modules))
  
  (define* (zig-build name inputs
                      #:key



reply via email to

[Prev in Thread] Current Thread [Next in Thread]