diff options
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/local.mk | 6 | ||||
-rw-r--r-- | gnu/packages/base.scm | 15 | ||||
-rw-r--r-- | gnu/packages/busybox.scm | 3 | ||||
-rw-r--r-- | gnu/packages/code.scm | 4 | ||||
-rw-r--r-- | gnu/packages/containers.scm | 4 | ||||
-rw-r--r-- | gnu/packages/elf.scm | 13 | ||||
-rw-r--r-- | gnu/packages/emacs-xyz.scm | 26 | ||||
-rw-r--r-- | gnu/packages/engineering.scm | 66 | ||||
-rw-r--r-- | gnu/packages/fluidplug.scm | 480 | ||||
-rw-r--r-- | gnu/packages/gnome.scm | 10 | ||||
-rw-r--r-- | gnu/packages/libusb.scm | 37 | ||||
-rw-r--r-- | gnu/packages/llvm.scm | 28 | ||||
-rw-r--r-- | gnu/packages/machine-learning.scm | 37 | ||||
-rw-r--r-- | gnu/packages/patches/busybox-no-cbq.patch | 56 | ||||
-rw-r--r-- | gnu/packages/patches/rocclr-5.6.0-enable-gfx800.patch | 44 | ||||
-rw-r--r-- | gnu/packages/patches/rocm-bandwidth-test-5.5.0-fix-includes.patch | 79 | ||||
-rw-r--r-- | gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch | 56 | ||||
-rw-r--r-- | gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch | 25 | ||||
-rw-r--r-- | gnu/packages/python-xyz.scm | 32 | ||||
-rw-r--r-- | gnu/packages/rocm.scm | 145 | ||||
-rw-r--r-- | gnu/services/networking.scm | 8 | ||||
-rw-r--r-- | gnu/tests/messaging.scm | 79 |
22 files changed, 972 insertions, 281 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 140c2415a1..d5fbb0fdef 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -50,7 +50,7 @@ # Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> # Copyright © 2022, 2024, 2025 Remco van 't Veer <remco@remworks.net> # Copyright © 2022, 2024, 2025 Artyom V. Poptsov <poptsov.artyom@gmail.com> -# Copyright © 2022, 2023 John Kehayias <john.kehayias@protonmail.com> +# Copyright © 2022, 2023, 2025 John Kehayias <john.kehayias@protonmail.com> # Copyright © 2022 muradm <mail@muradm.net> # Copyright © 2022 Hilton Chain <hako@ultrarare.space> # Copyright © 2022 Alex Griffin <a@ajgrf.com> @@ -306,6 +306,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/flashing-tools.scm \ %D%/packages/flex.scm \ %D%/packages/fltk.scm \ + %D%/packages/fluidplug.scm \ %D%/packages/fonts.scm \ %D%/packages/fontutils.scm \ %D%/packages/fpga.scm \ @@ -1084,6 +1085,7 @@ dist_patch_DATA = \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/bubblewrap-fix-locale-in-tests.patch \ %D%/packages/patches/busybox-add-missing-sha-NI-guard.patch \ + %D%/packages/patches/busybox-no-cbq.patch \ %D%/packages/patches/c2rust-ast-exporter-local-search.patch \ %D%/packages/patches/cadical-add-shared-library.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ @@ -2250,8 +2252,6 @@ dist_patch_DATA = \ %D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch \ %D%/packages/patches/rng-tools-revert-build-randstat.patch \ %D%/packages/patches/rocclr-5.6.0-enable-gfx800.patch \ - %D%/packages/patches/rocm-bandwidth-test-5.5.0-fix-includes.patch \ - %D%/packages/patches/rocm-comgr-3.1.0-dependencies.patch \ %D%/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch \ %D%/packages/patches/rottlog-direntry.patch \ %D%/packages/patches/ruby-actionpack-remove-browser-tests.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 4909a375a1..320081d818 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014 Alex Kost <alezost@gmail.com> ;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> -;;; Copyright © 2016, 2017, 2019-2023 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2016, 2017, 2019-2023, 2025 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016, 2020, 2023, 2024, 2025 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2016, 2018 Alex Vong <alexvong1995@gmail.com> ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org> @@ -369,10 +369,15 @@ differences.") ;; XXX: On 32-bit Hurd platforms, 'time_t' is defined as a 32-bit ;; integer in 'hurd_types.defs', so this Gnulib test always fails. #:make-flags - #~#$(if (and (not (%current-target-system)) - (string=? (%current-system) "i586-gnu")) - #~'("XFAIL_TESTS=test-year2038") - #~'()) + #~#$(cond ((and (not (%current-target-system)) + (string=? (%current-system) "i586-gnu")) + #~'("XFAIL_TESTS=test-year2038")) + ;; TODO: Figure out why these gnulib tests are failing. + ((and (not (%current-target-system)) + (target-ppc64le?)) + #~'("XFAIL_TESTS=test-float-h large-subopt")) + (else + #~'())) #:configure-flags #~#$(if (%current-target-system) diff --git a/gnu/packages/busybox.scm b/gnu/packages/busybox.scm index 053994a52a..fea4531620 100644 --- a/gnu/packages/busybox.scm +++ b/gnu/packages/busybox.scm @@ -47,7 +47,8 @@ (base32 "1923f21rnlbv1qjvk2qhgqnki5mkgr6z0p8dvzs9jr3l5vrxy49k")) (patches - (search-patches "busybox-add-missing-sha-NI-guard.patch")))) + (search-patches "busybox-add-missing-sha-NI-guard.patch" + "busybox-no-cbq.patch")))) (build-system gnu-build-system) (arguments (list #:phases diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index 9ab21880c8..83e28d63ed 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm @@ -190,14 +190,14 @@ desired software component.") (define-public cflow (package (name "cflow") - (version "1.7") + (version "1.8") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/cflow/cflow-" version ".tar.bz2")) (sha256 (base32 - "11khr78090jjyqa2l26bdz0myjx6b212lz216dhjc7h0z754c4fh")))) + "1f4s979phyjz8qss10d0fqa4paa6z3wwdz23d9zqgixnamxn48c3")))) (build-system gnu-build-system) ;; Needed to have cflow-mode.el installed. diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm index d119c1226a..1a2aa6b75d 100644 --- a/gnu/packages/containers.scm +++ b/gnu/packages/containers.scm @@ -684,7 +684,7 @@ being rootless and not requiring any daemon to be running.") (define-public buildah (package (name "buildah") - (version "1.40.1") + (version "1.41.0") (source (origin (method git-fetch) @@ -692,7 +692,7 @@ being rootless and not requiring any daemon to be running.") (url "https://github.com/containers/buildah") (commit (string-append "v" version)))) (sha256 - (base32 "109xvnx65gbajxipq2h0669bzzxyc6hfmdcijgngijxj5kwx5cgq")) + (base32 "12vl3g5h9m9pw0zpi88j7sjx0db8ardigh2x8h3a3qa9m5hlnqnb")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index 9ee51a0918..096c8b22a4 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2022 Daniel Maksymow <daniel.maksymow@tuta.io> ;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2025 John Kehayias <john.kehayias@protonmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -304,6 +305,18 @@ static analysis of the ELF binaries at hand.") (description "Libelf is a C library to access ELF object files.") (license lgpl2.0+))) + +;; This is a shared library version of libelf, currently only needed for ROCm +;; packages in (gnu packages rocm). +(define-public libelf-shared + (package + (inherit libelf) + (arguments + (substitute-keyword-arguments (package-arguments libelf) + ((#:make-flags flags #~'()) + #~(append #$flags '("CFLAGS=-fPIC"))))) + (properties `((hidden? . #t) ,@(package-properties libelf))))) + (define-public patchelf (package (name "patchelf") diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 9669967ba4..8953aed271 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -691,6 +691,32 @@ just one-off queries and multiple independent sessions. It requires an OpenAI API key.") (license license:gpl3+))) +(define-public emacs-gptel-prompts + ;; No releases. + (let ((commit "deca98e1aff1b0570cd1672addfb6dcc74402332") + (revision "0")) + (package + (name "emacs-gptel-prompts") + (version (git-version "1.0" revision commit)) + (source + (origin + (uri (git-reference + (url "https://github.com/jwiegley/gptel-prompts/") + (commit commit))) + (method git-fetch) + (sha256 + (base32 "0wh2ydiy1k6j0hdw7n7qyzx6c2g4mcpd3gp79h1ay1hh0f85596b")) + (file-name (git-file-name name version)))) + (build-system emacs-build-system) + (arguments (list #:tests? #f)) ;no tests + (propagated-inputs (list emacs-gptel)) + (home-page "https://github.com/jwiegley/gptel-prompts/") + (synopsis "Alternative Gptel directives management") + (description + "This package offers an advanced way to manage Gptel directives, using +files rather than customizing the variable directly.") + (license license:gpl2+)))) + (define-public emacs-gptel-quick (let ((commit "d7a3aedefdc656a136d5664f2dac165a1f6ebf0e") (revision "1")) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index c6905d3308..451d5ab9c9 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -3438,6 +3438,72 @@ models in the STL and OFF file formats.") (home-page "https://openscad.org/") (license license:gpl2+)))) +(define-public pythonscad + (let ((commit "e2641ca1a208a9a54a034a8818a9774ad4d5867c") + (version "0.0.0") + (revision "0")) + (package + (inherit openscad) + (name "pythonscad") + (version (git-version version revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pythonscad/pythonscad") + (commit commit) + ;; Needed for libraries/MCAD, a library specific to OpenSCAD + ;; which is included as a submodule. All other libraries are + ;; deleted in the patch-source build phase. + (recursive? #t))) + (sha256 + (base32 "1i6yajamdrha2kpgyhn7jn6dv35qmgq0zsqv8cdzdqg5142v66ay")) + (modules '((guix build utils))) + (snippet #~(begin + ;; Delete all unbundled libraries to replace them with + ;; guix packages. + (delete-file-recursively "submodules") + (substitute* "CMakeLists.txt" + ;; Remove bundled libraries from cmake. + (("add_subdirectory\\(submodules\\)") + "")))) + (file-name (git-file-name name version)))) + (arguments + (substitute-keyword-arguments (package-arguments openscad) + ((#:configure-flags flags + '()) + #~(append #$flags + (list "-DENABLE_LIBFIVE=ON" "-DUSE_BUILTIN_LIBFIVE=OFF" + (string-append "-DPYTHON_VERSION=" + #$(version-major+minor + (package-version python)))))) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'patch-source + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "CMakeLists.txt" + ;; Fix detection of EGL (see + ;; https://github.com/openscad/openscad/issues/5880). + (("target_link_libraries\\(OpenSCAD PRIVATE OpenGL::EGL\\)") + "find_package(ECM REQUIRED NO_MODULE) + list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) + find_package(EGL REQUIRED) + target_link_libraries(OpenSCAD PRIVATE EGL::EGL)") + ;; Use the system sanitizers-cmake module. + (("\\$\\{CMAKE_SOURCE_DIR\\}/submodules/sanitizers-cmake/cmake") + (string-append (assoc-ref inputs "sanitizers-cmake") + "/share/sanitizers-cmake/cmake"))))))))) + (inputs (modify-inputs (package-inputs openscad) + (append curl libfive))) + (synopsis "Script-based 3D modeling app whith Python support") + (description + "PythonSCAD is a programmatic 3D modeling application. It allows you +to turn simple code into 3D models suitable for 3D printing. It is a fork of +OpenSCAD which not only adds support for using Python as a native language, +but also adds new features and improves existing ones.") + (home-page "https://pythonscad.org/") + (license license:gpl2+)))) + (define-public emacs-scad-mode (package (name "emacs-scad-mode") diff --git a/gnu/packages/fluidplug.scm b/gnu/packages/fluidplug.scm new file mode 100644 index 0000000000..c731f295ba --- /dev/null +++ b/gnu/packages/fluidplug.scm @@ -0,0 +1,480 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2025 Giacomo Leidi <goodoldpaul@autistici.org> +;;; +;;; 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 (gnu packages fluidplug) + #:use-module (guix build-system gnu) + #:use-module (guix download) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module ((guix licenses) + #:prefix license:) + #:use-module (guix packages) + #:use-module (guix records) + #:use-module (guix utils) + #:use-module (gnu packages audio) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) + #:use-module (gnu packages pkg-config) + #:use-module (srfi srfi-1) + #:export (fluidplug-plugin + fluidplug-plugin? + fluidplug-plugin-name + fluidplug-plugin-path + fluidplug-plugin-hash + fluidplug-plugin-license + + fluidplug-lv2 + + fluidplug-plugin->package + fluidplug-airfont320-lv2 + fluidplug-avl-drumkits-perc-lv2 + fluidplug-black-pearl-4a-lv2 + fluidplug-black-pearl-4b-lv2 + fluidplug-black-pearl-5-lv2 + fluidplug-red-zeppelin-4-lv2 + fluidplug-red-zeppelin-5-lv2 + fluidplug-fluidgm-lv2 + fluidplug-fluidbass-lv2 + fluidplug-fluidbrass-lv2 + fluidplug-fluidchromperc-lv2 + fluidplug-fluiddrums-lv2 + fluidplug-fluidensemble-lv2 + fluidplug-fluidethnic-lv2 + fluidplug-fluidguitars-lv2 + fluidplug-fluidorgans-lv2 + fluidplug-fluidpercussion-lv2 + fluidplug-fluidpianos-lv2 + fluidplug-fluidpipes-lv2 + fluidplug-fluidreeds-lv2 + fluidplug-fluidsoundfx-lv2 + fluidplug-fluidstrings-lv2 + fluidplug-fluidsynthfx-lv2 + fluidplug-fluidsynthleads-lv2 + fluidplug-fluidsynthpads-lv2)) + +(define-record-type* <fluidplug-plugin> + fluidplug-plugin make-fluidplug-plugin + fluidplug-plugin? + (name fluidplug-plugin-name) ;string + (hash fluidplug-plugin-hash) ;string + (path fluidplug-plugin-path) ;string + (license fluidplug-plugin-license ;license + (default license:cc-by-sa4.0))) + +(define (fluidplug-plugin->package-name record) + (string-append "fluidplug-" + (string-downcase + (string-replace-substring + (fluidplug-plugin-name record) "_" "-")) + "-lv2")) + +(define (fluidplug-plugin->origin record) + (origin + (method url-fetch) + (uri + (string-append "https://download.linuxaudio.org/" + "musical-instrument-libraries/sf2/" + (fluidplug-plugin-path record))) + (sha256 + (base32 (fluidplug-plugin-hash record))))) + +(define (fluidplug-plugin->local-path record) + (string-append "./" (fluidplug-plugin-name record) ".lv2/" + (basename (fluidplug-plugin-path record)))) + +(define airfont320 + (fluidplug-plugin + (name "AirFont320") + (path "airfont_a340u.tar.7z") + (hash "1x4xzm4khq823i4p18ydbkjza2nv3hzwyxp7vf3gzqs374jdcqbw") + (license license:gpl2))) + +(define avl-drumkits-perc + (fluidplug-plugin + (name "AVL_Drumkits_Perc") + (path "AVL-Drumkits-1.1-SF2-splitted/AVL_Drumkits_Perc_1.1.tar.7z") + (hash "0l1zvzw9dg922wf9llcl9zlw5ybjmayg7yqacp253xcr2jz1hn7m") + (license license:cc-by-sa3.0))) + +(define black-pearl-4a + (fluidplug-plugin + (name "Black_Pearl_4A") + (path "AVL-Drumkits-1.1-SF2-splitted/Black_Pearl_4A-1.1.tar.7z") + (hash "0flzlg5m2r3df8dchydzg3xllcv7ignr7hx6qxzy51s6gzrlbzli") + (license license:cc-by-sa3.0))) + +(define black-pearl-4b + (fluidplug-plugin + (name "Black_Pearl_4B") + (path "AVL-Drumkits-1.1-SF2-splitted/Black_Pearl_4B-1.1.tar.7z") + (hash "1z5q8z4k81xnbcv0gpc2xgrzqm9fg4n2yly1kaw82q7sm29vi0z9") + (license license:cc-by-sa3.0))) + +(define black-pearl-5 + (fluidplug-plugin + (name "Black_Pearl_5") + (path "AVL-Drumkits-1.1-SF2-splitted/Black_Pearl_5-1.1.tar.7z") + (hash "0mg41wc912sfj2mydn86ychwk21l3ngbn7k3qsm6jgf1ipmsip9y") + (license license:cc-by-sa3.0))) + +(define red-zeppelin-4 + (fluidplug-plugin + (name "Red_Zeppelin_4") + (path "AVL-Drumkits-1.1-SF2-splitted/Red_Zeppelin_4-1.1.tar.7z") + (hash "0pcswg4hlyn8j6nghbwvxa71ibp6r0wxcbxjzxs4iim43vpxc659") + (license license:cc-by-sa3.0))) + +(define red-zeppelin-5 + (fluidplug-plugin + (name "Red_Zeppelin_5") + (path "AVL-Drumkits-1.1-SF2-splitted/Red_Zeppelin_5-1.1.tar.7z") + (hash "18hhmi1d1i7gr2rp4wn28pnfwl825rmhmjnvxvvcwdmis6nad4gm") + (license license:cc-by-sa3.0))) + +(define fluidgm + (fluidplug-plugin + (name "FluidGM") + (path "fluidr3.tar.7z") + (hash "00ka1b2pxn0g2g0hm7kdg5w785pfx8f9585238d183wjdkc3a8m6") + (license license:expat))) + +(define fluidbass + (fluidplug-plugin + (name "FluidBass") + (path "fluidr3-splitted/fluidr3gm_bass.sf2.tar.7z") + (hash "1zhixrxkwvmn6xkpy9f8zkrwxmaqwdcx0jz7zg8lc2amqkx9wqan"))) + +(define fluidbrass + (fluidplug-plugin + (name "FluidBrass") + (path "fluidr3-splitted/fluidr3gm_brass.sf2.tar.7z") + (hash "027l3q4q9011xzbzsrsp5nj3h05w9dj7d8b943xzck7q4sp9alkp"))) + +(define fluidchromperc + (fluidplug-plugin + (name "FluidChromPerc") + (path "fluidr3-splitted/fluidr3gm_chromaticpercussion.sf2.tar.7z") + (hash "1233fh36wlifrawh57v8vycxc0g4pbvy3qr9f596g9n7mm4h51f7"))) + +(define fluiddrums + (fluidplug-plugin + (name "FluidDrums") + (path "fluidr3-splitted/fluidr3gm_drums.sf2.tar.7z") + (hash "01pv3aj52pz8xy29acprwkb69jxhrn64kx7w29ch5bl091lccqgr"))) + +(define fluidensemble + (fluidplug-plugin + (name "FluidEnsemble") + (path "fluidr3-splitted/fluidr3gm_ensemble.sf2.tar.7z") + (hash "0rswcgzapcjmwddh2hgicym27hqz3p43r2s8j7hy1s40hzk3nbax"))) + +(define fluidethnic + (fluidplug-plugin + (name "FluidEthnic") + (path "fluidr3-splitted/fluidr3gm_ethnic.sf2.tar.7z") + (hash "0z1z37wn6lw1n919bkpfirachg5wwddi7f0g4l9vimazv34ds1b1"))) + +(define fluidguitars + (fluidplug-plugin + (name "FluidGuitars") + (path "fluidr3-splitted/fluidr3gm_guitar.sf2.tar.7z") + (hash "1d5jxx4sgbyh9sqmfksggcsri9hal7mw83a6h1vqb9xf59gnmx1i"))) + +(define fluidorgans + (fluidplug-plugin + (name "FluidOrgans") + (path "fluidr3-splitted/fluidr3gm_organ.sf2.tar.7z") + (hash "12zlq28cmr2hsgn1319hidzcm8yifx6vsqsqk544z3qkhc8cg4fr"))) + +(define fluidpercussion + (fluidplug-plugin + (name "FluidPercussion") + (path "fluidr3-splitted/fluidr3gm_percussive.sf2.tar.7z") + (hash "1gql0g1zk09n6r90mav47khdc406jhmg5iql6i2zjmg9l7yg65n3"))) + +(define fluidpianos + (fluidplug-plugin + (name "FluidPianos") + (path "fluidr3-splitted/fluidr3gm_piano.sf2.tar.7z") + (hash "06a817xvx7qj8plr1vhpanbdr97cbmzky0pp6xhff916s5k0jg2r"))) + +(define fluidpipes + (fluidplug-plugin + (name "FluidPipes") + (path "fluidr3-splitted/fluidr3gm_pipe.sf2.tar.7z") + (hash "09wzvsabcif27687g71g4m75zz08zpwpm2dzwh8a7xsfi5qdynf2"))) + +(define fluidreeds + (fluidplug-plugin + (name "FluidReeds") + (path "fluidr3-splitted/fluidr3gm_reed.sf2.tar.7z") + (hash "1yb0whi67wz7ag6hcfdns69m1ic3fq6firvbb893ilnx8h17yjak"))) + +(define fluidsoundfx + (fluidplug-plugin + (name "FluidSoundFX") + (path "fluidr3-splitted/fluidr3gm_soundeffects.sf2.tar.7z") + (hash "0sg8gca9735gy0pna63vgsfnabk54dl30n1lnhcf976n7y0npzfx"))) + +(define fluidstrings + (fluidplug-plugin + (name "FluidStrings") + (path "fluidr3-splitted/fluidr3gm_strings.sf2.tar.7z") + (hash "1nnxr62i3p3hhdpwlly62c4cvf7f3dzq818fmlnlxp25215h17bs"))) + +(define fluidsynthfx + (fluidplug-plugin + (name "FluidSynthFX") + (path "fluidr3-splitted/fluidr3gm_syntheffects.sf2.tar.7z") + (hash "0rlq58v9m6wjk45kxmza54y8fkj1b8y1zg00r80nwyqz6rylgjh4"))) + +(define fluidsynthleads + (fluidplug-plugin + (name "FluidSynthLeads") + (path "fluidr3-splitted/fluidr3gm_synthlead.sf2.tar.7z") + (hash "0axi5dyqf8zh1gn82qq0jpzr0cgbsjn4xm0yrlqld4k6h9ggj475"))) + +(define fluidsynthpads + (fluidplug-plugin + (name "FluidSynthPads") + (path "fluidr3-splitted/fluidr3gm_synthpad.sf2.tar.7z") + (hash "1q4pd6ymb08yc6rz68wlidjp5kp7pygc2aw45djw9wr8id6pnadi"))) + +(define fluidplug-plugins + (list airfont320 + avl-drumkits-perc + black-pearl-4a + black-pearl-4b + black-pearl-5 + red-zeppelin-4 + red-zeppelin-5 + fluidgm + fluidbass + fluidbrass + fluidchromperc + fluiddrums + fluidensemble + fluidethnic + fluidguitars + fluidorgans + fluidpercussion + fluidpianos + fluidpipes + fluidreeds + fluidsoundfx + fluidstrings + fluidsynthfx + fluidsynthleads + fluidsynthpads)) + +(define fluidplug-lv2 + (let ((version "0.0.5") + (revision "0") + ;; Latest commit from the default brach. + (commit "1cf494cb3a5b1f7f2a95f872768a1eef141c3e0a")) + (package + (name "fluidplug-lv2") + (version (git-version version revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/falkTX/FluidPlug") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0rqy4xzswkvmqa4mwyy5nz6r8w4bxjfg2rafbid4lb0izjnhma8q")))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f ;there are no tests. + #:make-flags #~(list (string-append "CC=" #$(cc-for-target)) + (string-append "DESTDIR=" #$output) + "PREFIX=") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'conditionally-enable-amd64-optimizations + (lambda _ + (let ((system #$(or (%current-target-system) + (%current-system)))) + (unless (string-prefix? "x86_64" system) + (substitute* "Makefile.mk" + (("-msse -msse2 -mfpmath=sse") "")))))) + (add-after 'conditionally-enable-amd64-optimizations + 'disable-plugin-download + (lambda _ + ;; SoundFonts can't be downloaded at build time + ;; in Guix, so it is disabled. + (substitute* "Makefile" + (("wget") "# wget")))) + (add-after 'disable-plugin-download 'unpack-plugins + (lambda _ + (use-modules (srfi srfi-1)) + (for-each + (lambda (p) + (define source (first p)) + (define target (second p)) + (symlink source target)) + '(#$@(map + (lambda (p) + (list (fluidplug-plugin->origin p) + (fluidplug-plugin->local-path p))) + fluidplug-plugins))))) + (delete 'configure)))) + (native-inputs + (list gnu-make p7zip pkg-config)) + (inputs (list fluidsynth lv2)) + (native-search-paths + (list (search-path-specification + (variable "LV2_PATH") + (files '("lib/lv2"))))) + (synopsis + "SoundFonts as LV2 plugins via FluidSynth") + (description + "@code{FluidPlug} provides SoundFonts as LV2 plugins via FluidSynth.") + (home-page "https://github.com/falkTX/FluidPlug") + (license + (delete-duplicates + (map fluidplug-plugin-license fluidplug-plugins)))))) + +(define (fluidplug-plugin->package record) + (package + (inherit fluidplug-lv2) + (name (fluidplug-plugin->package-name record)) + (arguments + (substitute-keyword-arguments (package-arguments fluidplug-lv2) + ((#:make-flags make-flags) + #~(list (string-append "CC=" #$(cc-for-target)) + (string-append "DESTDIR=" #$output) + "PREFIX=")) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'unpack-plugins + (lambda _ + (symlink #$(fluidplug-plugin->origin record) + #$(fluidplug-plugin->local-path record)))) + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke `("make" ,@make-flags + #$(fluidplug-plugin-name record))))) + (replace 'install + (lambda _ + (let* ((plugin-directory + (string-append #$(fluidplug-plugin-name record) + ".lv2")) + (lib (string-append #$output "/lib/lv2")) + (share/doc (string-append #$output "/share/doc")) + (plugin-lib (string-append lib "/" plugin-directory))) + + ;; Install plugin + (for-each + (lambda (f) + (install-file f plugin-lib)) + (find-files plugin-directory + "^.*\\.(sf2|so|ttl)$")) + + ;; Install license + (for-each + (lambda (f) + (install-file f share/doc)) + (find-files plugin-directory "(README|License\\.pdf)")) + + ;; Install UI + (copy-recursively (string-append plugin-directory "/modgui") + (string-append plugin-lib "/modgui"))))))))) + (description + (string-append (package-description fluidplug-lv2) " + +This package provides the @code{" (fluidplug-plugin-name record) + "} LV2 plugin.")) + (license (fluidplug-plugin-license record)))) + +(define fluidplug-airfont320-lv2 + (fluidplug-plugin->package airfont320)) + +(define fluidplug-avl-drumkits-perc-lv2 + (fluidplug-plugin->package avl-drumkits-perc)) + +(define fluidplug-black-pearl-4a-lv2 + (fluidplug-plugin->package black-pearl-4a)) + +(define fluidplug-black-pearl-4b-lv2 + (fluidplug-plugin->package black-pearl-4b)) + +(define fluidplug-black-pearl-5-lv2 + (fluidplug-plugin->package black-pearl-5)) + +(define fluidplug-red-zeppelin-4-lv2 + (fluidplug-plugin->package red-zeppelin-4)) + +(define fluidplug-red-zeppelin-5-lv2 + (fluidplug-plugin->package red-zeppelin-5)) + +(define fluidplug-fluidgm-lv2 + (fluidplug-plugin->package fluidgm)) + +(define fluidplug-fluidbass-lv2 + (fluidplug-plugin->package fluidbass)) + +(define fluidplug-fluidbrass-lv2 + (fluidplug-plugin->package fluidbrass)) + +(define fluidplug-fluidchromperc-lv2 + (fluidplug-plugin->package fluidchromperc)) + +(define fluidplug-fluiddrums-lv2 + (fluidplug-plugin->package fluiddrums)) + +(define fluidplug-fluidensemble-lv2 + (fluidplug-plugin->package fluidensemble)) + +(define fluidplug-fluidethnic-lv2 + (fluidplug-plugin->package fluidethnic)) + +(define fluidplug-fluidguitars-lv2 + (fluidplug-plugin->package fluidguitars)) + +(define fluidplug-fluidorgans-lv2 + (fluidplug-plugin->package fluidorgans)) + +(define fluidplug-fluidpercussion-lv2 + (fluidplug-plugin->package fluidpercussion)) + +(define fluidplug-fluidpianos-lv2 + (fluidplug-plugin->package fluidpianos)) + +(define fluidplug-fluidpipes-lv2 + (fluidplug-plugin->package fluidpipes)) + +(define fluidplug-fluidreeds-lv2 + (fluidplug-plugin->package fluidreeds)) + +(define fluidplug-fluidsoundfx-lv2 + (fluidplug-plugin->package fluidsoundfx)) + +(define fluidplug-fluidstrings-lv2 + (fluidplug-plugin->package fluidstrings)) + +(define fluidplug-fluidsynthfx-lv2 + (fluidplug-plugin->package fluidsynthfx)) + +(define fluidplug-fluidsynthleads-lv2 + (fluidplug-plugin->package fluidsynthleads)) + +(define fluidplug-fluidsynthpads-lv2 + (fluidplug-plugin->package fluidsynthpads)) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 4d178e5a88..170faa8020 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2015-2020, 2023, 2024 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015, 2016, 2017, 2018, 2021 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 David Thompson <davet@gnu.org> -;;; Copyright © 2015-2024 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2015-2025 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016, 2017, 2018 Rene Saavedra <pacoon@protonmail.com> ;;; Copyright © 2016 Jochem Raat <jchmrt@riseup.net> ;;; Copyright © 2016, 2017, 2019 Kei Kebreau <kkebreau@posteo.net> @@ -5051,6 +5051,11 @@ indicators etc).") (base32 "17zhkf2pjwrghdgk5nhfvzqakb2xwk2jj19316xjr0s9n3djv3z4")))) (build-system meson-build-system) + (arguments + (list + ;; TODO: Figure out why some tests SIGABRT on aarch64-linux. + #:tests? (and (not (%current-target-system)) + (not (target-aarch64?))))) (native-inputs (list `(,glib "bin") ; for gio-querymodules pkg-config gettext-minimal)) @@ -9851,7 +9856,8 @@ easy, safe, and automatic.") (arguments (list #:glib-or-gtk? #t - #:test-options `(list ,@(if (target-riscv64?) + #:test-options `(list ,@(if (or (target-riscv64?) + (target-aarch64?)) `("--timeout-multiplier" "10") '("--timeout-multiplier" "2"))) #:configure-flags diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index eb6dc9a844..61c43ceccb 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com> ;;; Copyright © 2024 hapster <o.rojon@posteo.net> ;;; Copyright © 2025 Janneke Nieuwenhuizen <janneke@gnu.org> +;;; Copyright © 2025 Evgeny Pisemsky <mail@pisemsky.site> ;;; ;;; This file is part of GNU Guix. ;;; @@ -809,3 +810,39 @@ HID-Class devices.") (license:non-copyleft "https://github.com/trezor/cython-hidapi/blob/master/LICENSE-orig.txt" "You are free to use cython-hidapi code for any purpose."))))) + +(define-public hidapitester + (package + (name "hidapitester") + (version "0.5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/todbot/hidapitester") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0pilnq01yd4974xicy6as330f5b74pnj9mn5gvg1s21f78lxx4is")))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (replace 'install + (lambda _ + (install-file "hidapitester" + (string-append #$output "/bin"))))) + #:make-flags + #~(list (string-append "CC=" #$(cc-for-target)) + (string-append "GIT_TAG=v" #$version)))) + (native-inputs (list pkg-config)) + (inputs (list hidapi eudev)) + (home-page "https://github.com/todbot/hidapitester") + (synopsis "Command-line program to exercise hidapi") + (description + "The hidapitester program is a simple, low-dependency command-line tool to test +out every API call in hidapi.") + (license license:gpl3))) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 0accbd4503..8c2b28cc6c 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -22,7 +22,7 @@ ;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net> ;;; Copyright © 2021, 2022 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2022, 2024 Greg Hogan <code@greghogan.com> -;;; Copyright © 2022, 2024 John Kehayias <john.kehayias@protonmail.com> +;;; Copyright © 2022, 2024, 2025 John Kehayias <john.kehayias@protonmail.com> ;;; Copyright © 2022 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com> ;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space> @@ -1661,30 +1661,30 @@ Library.") (define-public llvm-for-rocm (package - ;; Based on LLVM 14 as of v5.0.0 - (inherit llvm-14) + ;; Currently based on LLVM 19. + (inherit llvm-19) (name "llvm-for-rocm") - (version "5.6.0") ;this must match '%rocm-version' + (version "6.4.2") ;this must match '%rocm-version' (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/RadeonOpenCompute/llvm-project.git") + (url "https://github.com/ROCm/llvm-project.git") (commit (string-append "rocm-" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "1kg6q6aqijjrwaznj0gr3nd01gykrnqqnk8vz8wyfifr18l9jrgx")))) + "1j2cr362k7snsh5c1z38ikyihmjvy0088rj0f0dhng6cjwgysryp")))) (arguments - (substitute-keyword-arguments (package-arguments llvm-14) + (substitute-keyword-arguments (package-arguments llvm-19) ((#:configure-flags flags) - #~(list"-DLLVM_ENABLE_PROJECTS=llvm;clang;lld" - "-DLLVM_TARGETS_TO_BUILD=AMDGPU;X86" - "-DCMAKE_SKIP_BUILD_RPATH=FALSE" - "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE" - "-DBUILD_SHARED_LIBS:BOOL=TRUE" - "-DLLVM_VERSION_SUFFIX=")))) + #~(list "-DLLVM_ENABLE_PROJECTS=llvm;clang;lld" + "-DLLVM_TARGETS_TO_BUILD=AMDGPU;X86" + "-DCMAKE_SKIP_BUILD_RPATH=FALSE" + "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE" + "-DBUILD_SHARED_LIBS:BOOL=TRUE" + "-DLLVM_VERSION_SUFFIX=")))) (properties `((hidden? . #t) - ,@(package-properties llvm-14))))) + ,@(package-properties llvm-19))))) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 3d29913703..1865b22895 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -683,7 +683,7 @@ Performance is achieved by using the LLVM JIT compiler.") (deprecated-package "guile-aiscm-next" guile-aiscm)) (define-public llama-cpp - (let ((tag "b5013")) + (let ((tag "b6056")) (package (name "llama-cpp") (version (string-append "0.0.0-" tag)) @@ -695,7 +695,7 @@ Performance is achieved by using the LLVM JIT compiler.") (commit tag))) (file-name (git-file-name name tag)) (sha256 - (base32 "0s73dz871x53dr366lkzq19f677bwgma2ri8m5vhbfa9p8yp4p3r")))) + (base32 "1y9blrd7c8snazjmjkzj0148v328pigncvf1l9g1ih735b67zpd0")))) (build-system cmake-build-system) (arguments (list @@ -730,11 +730,23 @@ Performance is achieved by using the LLVM JIT compiler.") #~(modify-phases %standard-phases (add-after 'unpack 'patch-paths (lambda* (#:key inputs #:allow-other-keys) - (substitute* "ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp" - (("\"/bin/sh\"") - (string-append "\"" (search-input-file inputs "/bin/sh") "\""))))) + (substitute* (format #f "~a~a" + "ggml/src/ggml-vulkan/vulkan-shaders/" + "vulkan-shaders-gen.cpp") + (("\"/bin/sh\"") + (string-append "\"" (search-input-file inputs "/bin/sh") + "\""))))) (add-after 'unpack 'fix-tests (lambda _ + ;; test-thread-safety downloads ML model from network, + ;; cannot run in Guix build environment + (substitute* '("tests/CMakeLists.txt") + (("llama_build_and_test\\(test-thread-safety.cpp.*") + "") + ;; error while handling argument "-m": expected value for + ;; argument + (("llama_build_and_test\\(test-arg-parser.cpp.*") + "")) ;; test-eval-callback downloads ML model from network, cannot ;; run in Guix build environment (substitute* '("examples/eval-callback/CMakeLists.txt") @@ -800,9 +812,15 @@ independently to be able to run a LLaMA model.") "-DGGML_AVX2=OFF" "-DGGML_AVX512=OFF" "-DGGML_AVX512_VBMI=OFF" - "-DGGML_AVX512_VNNI=OFF") + "-DGGML_AVX512_VNNI=OFF" + "-DGGML_VULKAN=ON") #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp" + (("\"/bin/sh\"") + (string-append "\"" (search-input-file inputs "/bin/sh") "\""))))) #$@(if (not (target-64bit?)) '((add-after 'unpack 'skip-failing-tests (lambda _ @@ -823,9 +841,10 @@ independently to be able to run a LLaMA model.") (("\\$\\{VAD_TARGET\\} PROPERTIES LABELS \"base;en\"") "${VAD_TEST} PROPERTIES DISABLED true"))))))) (native-inputs - (list pkg-config)) + (list pkg-config shaderc)) (inputs - (list openblas sdl2 git)) + (list openblas sdl2 git spirv-headers spirv-tools + vulkan-headers vulkan-loader)) (synopsis "OpenAI's Whisper model in C/C++") (description "This package is a high-performance inference of OpenAI's @@ -843,7 +862,7 @@ without dependencies, with @item C-style API @end itemize") (properties '((tunable? . #true))) ;use AVX512, FMA, etc. when available - (home-page "https://github.com/ggerganov/whisper.cpp") + (home-page "https://github.com/ggml-org/whisper.cpp/") (license license:expat))) (define-public mcl diff --git a/gnu/packages/patches/busybox-no-cbq.patch b/gnu/packages/patches/busybox-no-cbq.patch new file mode 100644 index 0000000000..a887b42755 --- /dev/null +++ b/gnu/packages/patches/busybox-no-cbq.patch @@ -0,0 +1,56 @@ +Downloaded from Debian +https://sources.debian.org/data/main/b/busybox/1%3A1.37.0-6/debian/patches/busybox-1.36.1-no-cbq.patch +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1071648 +Origin: fedora +Date: Tue, 16 Jul 2024 07:46:38 +0000 +Forwarded: yes, https://bugs.busybox.net/show_bug.cgi?id=15931 + +diff -up busybox-1.36.1/networking/tc.c.no-cbq busybox-1.36.1/networking/tc.c +--- busybox-1.36.1/networking/tc.c.no-cbq 2024-01-29 10:24:09.135082923 -0500 ++++ busybox-1.36.1/networking/tc.c 2024-01-29 10:28:12.009502552 -0500 +@@ -31,7 +31,7 @@ + //usage: "qdisc [handle QHANDLE] [root|"IF_FEATURE_TC_INGRESS("ingress|")"parent CLASSID]\n" + /* //usage: "[estimator INTERVAL TIME_CONSTANT]\n" */ + //usage: " [[QDISC_KIND] [help|OPTIONS]]\n" +-//usage: " QDISC_KIND := [p|b]fifo|tbf|prio|cbq|red|etc.\n" ++//usage: " QDISC_KIND := [p|b]fifo|tbf|prio|red|etc.\n" + //usage: "qdisc show [dev STRING]"IF_FEATURE_TC_INGRESS(" [ingress]")"\n" + //usage: "class [classid CLASSID] [root|parent CLASSID]\n" + //usage: " [[QDISC_KIND] [help|OPTIONS] ]\n" +@@ -230,7 +230,7 @@ static int cbq_parse_opt(int argc, char + { + return 0; + } +-#endif ++ + static int cbq_print_opt(struct rtattr *opt) + { + struct rtattr *tb[TCA_CBQ_MAX+1]; +@@ -322,6 +322,7 @@ static int cbq_print_opt(struct rtattr * + done: + return 0; + } ++#endif + + static FAST_FUNC int print_qdisc( + const struct sockaddr_nl *who UNUSED_PARAM, +@@ -373,7 +374,8 @@ static FAST_FUNC int print_qdisc( + if (qqq == 0) { /* pfifo_fast aka prio */ + prio_print_opt(tb[TCA_OPTIONS]); + } else if (qqq == 1) { /* class based queuing */ +- cbq_print_opt(tb[TCA_OPTIONS]); ++ /* cbq_print_opt(tb[TCA_OPTIONS]); */ ++ printf("cbq not supported"); + } else { + /* don't know how to print options for this qdisc */ + printf("(options for %s)", name); +@@ -444,7 +446,8 @@ static FAST_FUNC int print_class( + /* nothing. */ /*prio_print_opt(tb[TCA_OPTIONS]);*/ + } else if (qqq == 1) { /* class based queuing */ + /* cbq_print_copt() is identical to cbq_print_opt(). */ +- cbq_print_opt(tb[TCA_OPTIONS]); ++ /* cbq_print_opt(tb[TCA_OPTIONS]); */ ++ printf("cbq not supported"); + } else { + /* don't know how to print options for this class */ + printf("(options for %s)", name); diff --git a/gnu/packages/patches/rocclr-5.6.0-enable-gfx800.patch b/gnu/packages/patches/rocclr-5.6.0-enable-gfx800.patch index 2948234029..21fd88b82e 100644 --- a/gnu/packages/patches/rocclr-5.6.0-enable-gfx800.patch +++ b/gnu/packages/patches/rocclr-5.6.0-enable-gfx800.patch @@ -1,16 +1,30 @@ -#From xuhuisheng -#at https://github.com/RadeonOpenCompute/ROCm/issues/1659#issuecomment-1041026624 +See <https://github.com/ROCm/clr/pull/97>. -diff --git a/utils/flags.hpp b/utils/flags.hpp -index 8f0228cc..2eaa47c5 100644 ---- a/utils/flags.hpp -+++ b/utils/flags.hpp -@@ -245,7 +245,7 @@ release(bool, ROC_SYSTEM_SCOPE_SIGNAL, true, \ - "Enable system scope for signals (uses interrupts).") \ - release(bool, ROC_SKIP_COPY_SYNC, false, \ - "Skips copy syncs if runtime can predict the same engine.") \ --release(bool, ROC_ENABLE_PRE_VEGA, false, \ -+release(bool, ROC_ENABLE_PRE_VEGA, true, \ - "Enable support of pre-vega ASICs in ROCm path") \ - release(bool, HIP_FORCE_QUEUE_PROFILING, false, \ - "Force command queue profiling by default") \ +From 909fa3dcb644f7ca422ed1a980a54ac426d831b1 Mon Sep 17 00:00:00 2001 +From: Jeremy Newton <Jeremy.Newton@amd.com> +Date: Fri, 27 Sep 2024 13:29:12 -0400 +Subject: [PATCH] Fix gfx8 opencl + +This condition was added when we supported PAL openCL on gfx8, but when +ROC_ENABLE_PRE_VEGA was dropped and PAL OpenCL on Linux was deprecated, +this logic should have been dropped completely. + +Change-Id: I0a68ef4723d9ebde7d958c58dbb0b6991f69d817 +Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com> +--- + rocclr/device/device.hpp | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/rocclr/device/device.hpp b/rocclr/device/device.hpp +index ef82630325..6409cebc90 100644 +--- a/rocclr/device/device.hpp ++++ b/rocclr/device/device.hpp +@@ -1431,8 +1431,5 @@ class Isa { + + /// @returns If the ROCm runtime supports the ISA. + bool runtimeRocSupported() const { +- if (!IS_HIP && (versionMajor_ == 8)) { +- return false; +- } + return runtimeRocSupported_; + } diff --git a/gnu/packages/patches/rocm-bandwidth-test-5.5.0-fix-includes.patch b/gnu/packages/patches/rocm-bandwidth-test-5.5.0-fix-includes.patch deleted file mode 100644 index a5404ad62c..0000000000 --- a/gnu/packages/patches/rocm-bandwidth-test-5.5.0-fix-includes.patch +++ /dev/null @@ -1,79 +0,0 @@ -See <https://github.com/RadeonOpenCompute/rocm_bandwidth_test/pull/90>. - -From a58f9fd4cb5d1120b9ce58c912ca87fa14720f73 Mon Sep 17 00:00:00 2001 -From: pppig236 <weikaik@umich.edu> -Date: Tue, 2 May 2023 15:19:52 -0400 -Subject: [PATCH] fix include for rocm 5.5.0 - ---- - base_test.hpp | 8 +------- - common.hpp | 11 ++--------- - rocm_bandwidth_test.hpp | 8 +------- - 3 files changed, 4 insertions(+), 23 deletions(-) - -diff --git a/base_test.hpp b/base_test.hpp -index 3e79de1..af99a85 100755 ---- a/base_test.hpp -+++ b/base_test.hpp -@@ -42,14 +42,8 @@ - - #ifndef ROC_BANDWIDTH_TEST_BASE_H_ - #define ROC_BANDWIDTH_TEST_BASE_H_ --#if(defined(RBT_HSA_VERSION_FLAT) && ((RBT_HSA_VERSION_FLAT) < RBT_HSA_VERSION_FILEREORG)) --// Hsa package with out file reorganization --// This is for backward compatibility and will be deprecated from future release --#include "hsa.h" --#else - // Hsa package with file reorganization --#include "hsa/hsa.h" --#endif -+#include <hsa/hsa.h> - #include <iostream> - #include <string> - #include <vector> -diff --git a/common.hpp b/common.hpp -index d2933a0..3c4858f 100755 ---- a/common.hpp -+++ b/common.hpp -@@ -48,16 +48,9 @@ - #include <vector> - #include <cmath> - #include <stdio.h> --#if(defined(RBT_HSA_VERSION_FLAT) && ((RBT_HSA_VERSION_FLAT) < RBT_HSA_VERSION_FILEREORG)) --// Hsa package with out file reorganization --// This is for backward compatibility and will be deprecated from future release --#include "hsa.h" --#include "hsa_ext_amd.h" --#else - // Hsa package with file reorganization --#include "hsa/hsa.h" --#include "hsa/hsa_ext_amd.h" --#endif -+#include <hsa/hsa.h> -+#include <hsa/hsa_ext_amd.h> - - using namespace std; - -diff --git a/rocm_bandwidth_test.hpp b/rocm_bandwidth_test.hpp -index f7eb338..b8550a7 100755 ---- a/rocm_bandwidth_test.hpp -+++ b/rocm_bandwidth_test.hpp -@@ -43,14 +43,8 @@ - #ifndef __ROC_BANDWIDTH_TEST_H__ - #define __ROC_BANDWIDTH_TEST_H__ - --#if(defined(RBT_HSA_VERSION_FLAT) && ((RBT_HSA_VERSION_FLAT) < RBT_HSA_VERSION_FILEREORG)) --// Hsa package with out file reorganization --// This is for backward compatibility and will be deprecated from future release --#include "hsa.h" --#else - // Hsa package with file reorganization --#include "hsa/hsa.h" --#endif -+#include <hsa/hsa.h> - #include "base_test.hpp" - #include "common.hpp" - --- -2.40.1 - diff --git a/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch b/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch deleted file mode 100644 index 6462b81eb9..0000000000 --- a/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch +++ /dev/null @@ -1,56 +0,0 @@ -See https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/25 for -original patch. - -From c65cba2e73f9118e128b9ab7e655ee0f8a7798e7 Mon Sep 17 00:00:00 2001 -From: Craig Andrews <candrews@integralblue.com> -Date: Sun, 1 Mar 2020 19:24:22 -0500 -Subject: [PATCH] Link additional required LLVM libraries - -Without these additional required dependencies, linking fails with errors such as: -`undefined reference to llvm::errs()'` ---- - CMakeLists.txt | 20 ++++++++++++++++++-- - 1 file changed, 18 insertions(+), 2 deletions(-) - -diff --git a/lib/comgr/CMakeLists.txt b/lib/comgr/CMakeLists.txt -index fd3ae4a..131e581 100644 ---- a/lib/comgr/CMakeLists.txt -+++ b/lib/comgr/CMakeLists.txt -@@ -322,7 +322,11 @@ install(FILES - - if(TARGET clangFrontendTool) - set(CLANG_LIBS -- clangFrontendTool) -+ clangFrontendTool -+ clangFrontend -+ clangBasic -+ clangDriver -+ clangSerialization) - else() - set(CLANG_LIBS - clang-cpp) -@@ -337,8 +341,23 @@ if (LLVM_LINK_LLVM_DYLIB) - else() - llvm_map_components_to_libnames(LLVM_LIBS - ${LLVM_TARGETS_TO_BUILD} -+ Option - DebugInfoDWARF -- Symbolize) -+ Symbolize -+ Support -+ Object -+ TargetParser -+ Bitreader -+ BitWriter -+ MC -+ MCParser -+ MCDisassembler -+ Core -+ IRReader -+ CodeGen -+ Linker -+ Demangle -+ BinaryFormat) - endif() - - target_link_options(amd_comgr diff --git a/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch b/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch index 65ad362307..da96b3ade8 100644 --- a/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch +++ b/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch @@ -1,11 +1,11 @@ Do not build and install clinfo. -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0dc5bf4..95a12af 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -27,7 +27,7 @@ else() - find_package(OpenCL REQUIRED) +diff --git a/opencl/CMakeLists.txt b/opencl/CMakeLists.txt +index 7b97cfdef..23eec15b2 100644 +--- a/opencl/CMakeLists.txt ++++ b/opencl/CMakeLists.txt +@@ -33,7 +33,7 @@ if(BUILD_ICD) + add_subdirectory(khronos/icd) endif() add_subdirectory(amdocl) -add_subdirectory(tools/clinfo) @@ -13,15 +13,16 @@ index 0dc5bf4..95a12af 100644 add_subdirectory(tools/cltrace) if(BUILD_TESTS) add_subdirectory(tests/ocltst) -diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt -index a703f58..c07546a 100644 ---- a/packaging/CMakeLists.txt -+++ b/packaging/CMakeLists.txt -@@ -12,6 +12,6 @@ endif() +diff --git a/opencl/packaging/CMakeLists.txt b/opencl/packaging/CMakeLists.txt +index 7d9e6366f..f8d08e0fc 100644 +--- a/opencl/packaging/CMakeLists.txt ++++ b/opencl/packaging/CMakeLists.txt +@@ -16,7 +16,7 @@ endif() set(CPACK_DEB_COMPONENT_INSTALL ON) set(CPACK_RPM_COMPONENT_INSTALL ON) -install(TARGETS clinfo DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT binary) +#install(TARGETS clinfo DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT binary) install(TARGETS amdocl DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary) - install(FILES ${CMAKE_SOURCE_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT binary) + install(TARGETS amdocl DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT asan) + install(FILES ${opencl_SOURCE_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT binary) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 03f2828cfc..851917c26d 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -165,6 +165,7 @@ ;;; Copyright © 2025 Nguyễn Gia Phong <mcsinyx@disroot.org> ;;; Copyright © 2025, Cayetano Santos <csantosb@inventati.org> ;;; Copyright © 2025 Jake Forster <jakecameron.forster@gmail.com> +;;; Copyright © 2025 Luis Felipe López Acevedo <sirgazil@zoho.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -1175,6 +1176,37 @@ attribution. It uses similarity detection algorithms to compare code files and highlight matching sections.") (license license:agpl3+))) +(define-public python-wheel-filename + (package + (name "python-wheel-filename") + (version "1.4.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "wheel_filename" version)) + (sha256 + (base32 "1zcqq8mydjjrk8x5xlm53bavs51jm40nz42a7500pd6bbm31r2c7")))) + (build-system pyproject-build-system) + (native-inputs (list python-hatchling python-pytest python-pytest-cov)) + (home-page "https://github.com/wheelodex/wheel-filename") + (synopsis "Parse wheel filenames") + (description + "This software allows you to verify +@url{https://packaging.python.org/en/latest/specifications/binary-distribution-format/, wheel} +filenames and parse them into their component fields. + +This package adheres strictly to the standard, with the following +exceptions: + +@itemize @bullet +@item +Version components may be any sequence of the relevant set of +characters; they are not verified for PEP 440 compliance. +@item +The @file{.whl} file extension is matched case-insensitively. +@end itemize") + (license license:expat))) + (define-public python-xmldiff (package (name "python-xmldiff") diff --git a/gnu/packages/rocm.scm b/gnu/packages/rocm.scm index dca3d58387..cd320dcf81 100644 --- a/gnu/packages/rocm.scm +++ b/gnu/packages/rocm.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net> -;;; Copyright © 2022, 2023 John Kehayias <john.kehayias@protonmail.com> +;;; Copyright © 2022, 2023, 2025 John Kehayias <john.kehayias@protonmail.com> ;;; ;;; This program is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by @@ -31,13 +31,27 @@ #:use-module (gnu packages llvm) #:use-module (gnu packages opencl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) #:use-module (gnu packages version-control) #:use-module (gnu packages vim) #:use-module (gnu packages xdisorg)) ;; The components are tightly integrated and can only be upgraded as a unit. If ;; you want to upgrade ROCm, bump this version number and update hashes below. -(define %rocm-version "5.6.0") +(define %rocm-version "6.4.2") + +;; As of version 6.1.0 several of the ROCm projects are contained within their +;; forked LLVM repository. This is the same as the source for llvm-for-rocm. +(define %rocm-llvm-origin + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/RadeonOpenCompute/llvm-project.git") + (commit (string-append "rocm-" %rocm-version)))) + (file-name (git-file-name "llvm-for-rocm" %rocm-version)) + (sha256 + (base32 + "1j2cr362k7snsh5c1z38ikyihmjvy0088rj0f0dhng6cjwgysryp")))) (define-public rocm-cmake (package @@ -51,11 +65,11 @@ (file-name (git-file-name name version)) (sha256 (base32 - "183s2ksn142r7nl7l56qvyrgvvkdgqfdzmgkfpp4a6g9mjp88ady")))) + "1af9z59bm8pj577x43q614v3ff039wijvcdpgw6sdsq1c0ssj260")))) (build-system cmake-build-system) (arguments `(#:tests? #f)) ; Tests try to use git commit (native-inputs (list git)) - (home-page "https://github.com/RadeonOpenCompute/rocm-cmake") + (home-page "https://github.com/ROCm/rocm-cmake") (synopsis "ROCm cmake modules") (description "ROCm cmake modules provides cmake modules for common build tasks needed for the ROCM software stack.") @@ -65,22 +79,20 @@ tasks needed for the ROCM software stack.") (package (name "rocm-device-libs") (version %rocm-version) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/RadeonOpenCompute/ROCm-Device-Libs.git") - (commit (string-append "rocm-" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1jg96ycy99s9fis8sk1b7qx5p33anw16mqlm07zqbnhry2gqkcbh")))) + (source %rocm-llvm-origin) (build-system cmake-build-system) (arguments - `(#:configure-flags + `(#:build-type "Release" + #:configure-flags (list "-DCMAKE_SKIP_BUILD_RPATH=FALSE" - "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"))) + "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "amd/device-libs")))))) (inputs (list llvm-for-rocm)) - (home-page "https://github.com/RadeonOpenCompute/ROCm-Device-Libs") + (home-page "https://github.com/ROCm/ROCm-Device-Libs") (synopsis "ROCm Device libraries") (description "AMD-specific device-side language runtime libraries, namely oclc, ocml, ockl, opencl, hip and hc.") @@ -90,49 +102,45 @@ oclc, ocml, ockl, opencl, hip and hc.") (package (name "rocm-comgr") (version %rocm-version) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport.git") - (commit (string-append "rocm-" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "15s2dx0pdvjv3xfccq5prkplcbwps8x9jas5qk93q7kv8wx57p3b")) - (patches - (search-patches "rocm-comgr-3.1.0-dependencies.patch")))) + (source %rocm-llvm-origin) (build-system cmake-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'chdir - (lambda _ - (chdir "lib/comgr")))))) - (inputs (list llvm-for-rocm rocm-device-libs)) - (home-page "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport") + (list + #:build-type "Release" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'prepare-to-build + (lambda _ + (chdir "amd/comgr") + (setenv "ROCM_PATH" + #$(this-package-input "rocm-device-libs"))))))) + (inputs (list rocm-device-libs)) + (native-inputs (list llvm-for-rocm python)) + (home-page "https://github.com/ROCm/ROCm-CompilerSupport") (synopsis "ROCm Code Object Manager") (description "The Comgr library provides APIs for compiling and inspecting AMDGPU code objects.") (license license:ncsa))) +;; This package is deprecated; this is the last version released. (define-public roct-thunk-interface (package (name "roct-thunk-interface") - (version %rocm-version) + (version "6.2.4") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface.git") + (url "https://github.com/ROCm/ROCT-Thunk-Interface.git") (commit (string-append "rocm-" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "0v8j4gkbb21gqqmz1b4nmampx5ywva99ipsx8lcjr5ckcg84fn9x")))) + "1y3mn4860z7ca71cv4hhag7racpc208acy8rws8ldw5k8yjc68m0")))) (build-system cmake-build-system) (arguments `(#:tests? #f)) ; Not sure how to run tests. (inputs (list libdrm numactl)) (native-inputs (list `(,gcc "lib") pkg-config)) - (home-page "https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface") + (home-page "https://github.com/ROCm/ROCT-Thunk-Interface") (synopsis "Radeon Open Compute Thunk Interface") (description "User-mode API interfaces used to interact with the ROCk driver.") @@ -145,62 +153,42 @@ driver.") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/RadeonOpenCompute/ROCR-Runtime.git") + (url "https://github.com/ROCm/ROCR-Runtime.git") (commit (string-append "rocm-" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "07wh7s1kgvpw8ydxmr2wvvn05fdqcmcc20qjbmnc3cbbhxviksyr")))) + "01gqbzqm5m28dw9b2calrbp9a23w2cc2gwi3pay8yl8qvk4jgkff")))) (build-system cmake-build-system) (arguments (list #:tests? #f ; No tests. + #:build-type "Release" #:phases #~(modify-phases %standard-phases (add-after 'unpack 'add-rocm-device-lib-path (lambda _ - (substitute* "src/image/blit_src/CMakeLists.txt" - (("-O2") - (string-append - "-O2 --rocm-device-lib-path=" - #$(this-package-input "rocm-device-libs") - "/amdgcn/bitcode/"))))) - (add-after 'add-rocm-device-lib-path 'chdir - (lambda _ - (chdir "src")))))) + (setenv "ROCM_PATH" + #$(this-package-input "rocm-device-libs"))))))) (inputs (list libdrm - libelf + libelf-shared llvm-for-rocm numactl rocm-device-libs ; For bitcode. roct-thunk-interface)) (native-inputs (list pkg-config xxd)) - (home-page "https://github.com/RadeonOpenCompute/ROCR-Runtime") + (home-page "https://github.com/ROCm/ROCR-Runtime") (synopsis "ROCm Platform Runtime") (description "User-mode API interfaces and libraries necessary for host applications to launch compute kernels to available HSA ROCm kernel agents.") (license license:ncsa))) -;; This is the source only for ROCclr as from v4.5 it should only be built as -;; part of a client. A warning is output if attempting to build stand-alone -;; and there is no install. -(define rocclr-src - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ROCm-Developer-Tools/ROCclr.git") - (commit (string-append "rocm-" %rocm-version)))) - (sha256 - (base32 - "1fzvnngxcvxscn718cqfglm4izccx88zjdr3g5ldfqw7hyd034sk")) - (patches (search-patches "rocclr-5.6.0-enable-gfx800.patch")))) - (define-public rocm-opencl-runtime (package (name "rocm-opencl-runtime") (version %rocm-version) - (home-page "https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime") + (home-page "https://github.com/ROCm/clr") (source (origin (method git-fetch) (uri (git-reference @@ -209,20 +197,21 @@ applications to launch compute kernels to available HSA ROCm kernel agents.") (file-name (git-file-name name version)) (sha256 (base32 - "1azfxf0ac3mnbyfgn30bz5glwlmaigzdz0cd29jzc4b05hks1yr3")) + "00zr1fw84nifn2b2zd4wxf00f1171hjmz1lypzzmydsk5yw01q0c")) (patches (search-patches + "rocclr-5.6.0-enable-gfx800.patch" ;; Guix includes a program clinfo already. "rocm-opencl-runtime-4.3-noclinfo.patch")))) (build-system cmake-build-system) (arguments (list #:tests? #f ; Not sure how to run them. + #:build-type "Release" #:configure-flags #~(list (string-append "-DAMD_OPENCL_PATH=" #$(package-source this-package)) - ;; The ROCclr source is needed to build the runtime. - (string-append "-DROCCLR_PATH=" #$rocclr-src) + "-DCLR_BUILD_OCL=ON" (string-append "-DROCM_PATH=" #$output) ;; Don't build the ICD loader as we have the opencl-icd-loader ;; package already. @@ -231,6 +220,11 @@ applications to launch compute kernels to available HSA ROCm kernel agents.") "-DFILE_REORG_BACKWARD_COMPATIBILITY=OFF") #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'no-os-release + (lambda _ + (substitute* "opencl/packaging/CMakeLists.txt" + (("\"/etc/os-release\"") + "\"/dev/null\"")))) (add-after 'install 'create-icd ;; Manually install ICD, which simply consists of dumping ;; the path of the .so into the correct file. @@ -260,12 +254,12 @@ and in-process/in-memory compilation.") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/RadeonOpenCompute/rocminfo.git") + (url "https://github.com/ROCm/rocminfo.git") (commit (string-append "rocm-" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "150bvyxp9krq8f7jqd1g5b4l85rih4ch322y4sg1hnciqpabn6a6")))) + "15mzmxz011sg42jg0dbxz57f4fagmxzdjc6zhd0yab3cq7k1kiv2")))) (build-system cmake-build-system) (arguments (list @@ -280,7 +274,7 @@ and in-process/in-memory compilation.") (("grep") (search-input-file inputs "bin/grep")))))))) (inputs (list rocr-runtime kmod)) - (home-page "https://github.com/RadeonOpenCompute/rocminfo") + (home-page "https://github.com/ROCm/rocminfo") (synopsis "ROCm Application for Reporting System Info") (description "List @acronym{HSA,Heterogeneous System Architecture} Agents available to ROCm and show their properties.") @@ -293,17 +287,16 @@ available to ROCm and show their properties.") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/RadeonOpenCompute/rocm_bandwidth_test.git") + (url "https://github.com/ROCm/rocm_bandwidth_test.git") (commit (string-append "rocm-" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "0ca6r8xijw3a3hrlgkqqsf3iqyia6sdmidgmjl12f5vypxzp5kmm")) - (patches (search-patches "rocm-bandwidth-test-5.5.0-fix-includes.patch")))) + "1afmyx0dkif7djdcm5rfhnsibbrkj4py6dvh0gw4x3v750ms69wv")))) (build-system cmake-build-system) (arguments `(#:tests? #f)) ; No tests. (inputs (list rocr-runtime)) - (home-page "https://github.com/RadeonOpenCompute/rocm_bandwidth_test") + (home-page "https://github.com/ROCm/rocm_bandwidth_test") (synopsis "Bandwidth test for ROCm") (description "RocBandwidthTest is designed to capture the performance characteristics of buffer copying and kernel read/write operations. The help diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 6dc4eb2b1b..c5ebb1b673 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -1199,8 +1199,8 @@ Onion Service.") alist "Association list of port to address mappings. The following example: @lisp -'((22 . \"127.0.0.1:22\") - (80 . \"127.0.0.1:8080\")) +'((22 \"127.0.0.1:22\") + (80 \"127.0.0.1:8080\")) @end lisp maps ports 22 and 80 of the Onion Service to the local ports 22 and 8080.")) @@ -1395,8 +1395,8 @@ networking daemon."))) @var{mapping}. @var{mapping} is a list of port/host tuples, such as: @example - '((22 . \"127.0.0.1:22\") - (80 . \"127.0.0.1:8080\")) + '((22 \"127.0.0.1:22\") + (80 \"127.0.0.1:8080\")) @end example In this example, port 22 of the hidden service is mapped to local port 22, and diff --git a/gnu/tests/messaging.scm b/gnu/tests/messaging.scm index f1f4247c58..0601ff6f69 100644 --- a/gnu/tests/messaging.scm +++ b/gnu/tests/messaging.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2017-2018, 2021-2022 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2025 Evgeny Pisemsky <mail@pisemsky.site> ;;; ;;; This file is part of GNU Guix. ;;; @@ -42,7 +43,8 @@ %test-bitlbee %test-ngircd %test-pounce - %test-quassel)) + %test-quassel + %test-mosquitto)) (define (run-xmpp-test name xmpp-service pid-file create-account) "Run a test of an OS running XMPP-SERVICE, which writes its PID to PID-FILE." @@ -592,3 +594,78 @@ OPENSSL:localhost:7000,verify=0 &") (name "quassel") (description "Connect to a quassel IRC server.") (value (run-quassel-test)))) + + +;;; +;;; Mosquitto. +;;; + +(define (run-mosquitto-test) + (define os + (marionette-operating-system + (simple-operating-system (service dhcpcd-service-type) + (service mosquitto-service-type)) + #:imported-modules (source-module-closure + '((gnu services herd))))) + + (define vm + (virtual-machine + (operating-system os))) + + (define test + (with-imported-modules '((gnu build marionette)) + #~(begin + (use-modules (srfi srfi-64) + (gnu build marionette)) + + (define marionette + (make-marionette (list #$vm))) + + (test-runner-current (system-test-runner #$output)) + (test-begin "mosquitto") + + (test-assert "service runs" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (wait-for-service 'mosquitto)) + marionette)) + + (test-assert "service listens on TCP port 1883" + (wait-for-tcp-port 1883 marionette)) + + (test-equal "service receives a message" + 0 + (marionette-eval + '(system* #$(file-append mosquitto "/bin/mosquitto_pub") + "-t" "test-topic" + "-m" "Hello, mosquitto!" + "-r") + marionette)) + + (test-equal "service returns a message" + "Hello, mosquitto!" + (marionette-eval + '(begin + (use-modules (ice-9 popen) + (ice-9 rdelim)) + (let* ((port (open-pipe* OPEN_READ + #$(file-append + mosquitto + "/bin/mosquitto_sub") + "-t" "test-topic" + "-C" "1")) + (msg (read-line port))) + (close-pipe port) + msg)) + marionette)) + + (test-end)))) + + (gexp->derivation "mosquitto-test" test)) + +(define %test-mosquitto + (system-test + (name "mosquitto") + (description "Test a running Mosquitto MQTT broker.") + (value (run-mosquitto-test)))) |