~ruther/guix-local

3fa30960ea226307b09569e7a4040774f4514324 — Maxim Cournoyer 7 months ago b733de0
gnu: mesa-opencl: Introduce rust-bindgen-cli-next to avoid mesa rebuild.

* gnu/packages/rust-apps.scm (rust-bindgen-cli-next): New variant.
(rust-bindgen-cli) [inputs]: Revert to use default clang.
* gnu/packages/gl.scm (mesa-opencl) [native-inputs]: Replace rust-bindgen-cli
with rust-bindgen-cli-next.

Change-Id: Ia1acb30869d368f54a3b41250ef4d95ebbcd90b0
2 files changed, 11 insertions(+), 3 deletions(-)

M gnu/packages/gl.scm
M gnu/packages/rust-apps.scm
M gnu/packages/gl.scm => gnu/packages/gl.scm +4 -1
@@ 62,6 62,7 @@
  #:use-module (gnu packages python-build)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages rust)
  #:use-module (gnu packages rust-apps)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages video)
  #:use-module (gnu packages vulkan)


@@ 679,7 680,9 @@ from software emulation to complete hardware acceleration for modern GPUs.")
                                                (string-trim-both old-path))))
                  (if (file-exists? new-path)
                      (call-with-output-file rusticl.icd
                        (lambda (port) (format port "~a\n" new-path)))))))))))))
                        (lambda (port) (format port "~a\n" new-path)))))))))))
    (native-inputs (modify-inputs (package-native-inputs mesa)
                     (replace "rust-bindgen-cli" rust-bindgen-cli-next)))))

;;; ICD was part of the Gallium (Clover) OpenCL driver, which was replaced
;;; with Rusticl.

M gnu/packages/rust-apps.scm => gnu/packages/rust-apps.scm +7 -2
@@ 12,7 12,7 @@
;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.ccom>
;;; Copyright © 2021, 2022, 2025 Zheng Junjie <z572@z572.online>
;;; Copyright © 2021 Alexandru-Sergiu Marton <brown121407@posteo.ro>
;;; Copyright © 2021, 2023, 2024 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2021, 2023-2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2021, 2022 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2021 jgart <jgart@dismail.de>
;;; Copyright © 2021 Nicolas Graves <ngraves@ngraves.fr>


@@ 2559,7 2559,7 @@ support, watch support (like @command{top}) and a tree view.")
                 (string-append share "/elvish/lib/bindgen")
                 (lambda _
                   (invoke bindgen "--generate-shell-completions" "elvish")))))))))
    (inputs (cons* bash-minimal clang-18 (cargo-inputs 'rust-bindgen-cli)))
    (inputs (cons* bash-minimal clang (cargo-inputs 'rust-bindgen-cli)))
    (home-page "https://rust-lang.github.io/rust-bindgen/")
    (synopsis "Generate Rust FFI bindings to C and C++ libraries")
    (description "This package can be used to automatically generate Rust FFI


@@ 2567,6 2567,11 @@ bindings to C and C++ libraries.  This package provides the @command{bindgen}
command.")
    (license license:bsd-3)))

(define-public rust-bindgen-cli-next
  (package/inherit rust-bindgen-cli
    (inputs (modify-inputs (package-inputs rust-bindgen-cli)
              (replace "clang" clang-18)))))

(define-public sniffglue
  (package
    (name "sniffglue")