From 3fa30960ea226307b09569e7a4040774f4514324 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 1 Oct 2025 08:27:01 +0900 Subject: [PATCH] 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 --- gnu/packages/gl.scm | 5 ++++- gnu/packages/rust-apps.scm | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index e1cf9474339..02951473dff 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -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. diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index 496417bbee9..7e281d46e98 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm @@ -12,7 +12,7 @@ ;;; Copyright © 2021 Sharlatan Hellseher ;;; Copyright © 2021, 2022, 2025 Zheng Junjie ;;; Copyright © 2021 Alexandru-Sergiu Marton -;;; Copyright © 2021, 2023, 2024 Maxim Cournoyer +;;; Copyright © 2021, 2023-2025 Maxim Cournoyer ;;; Copyright © 2021, 2022 Petr Hodina ;;; Copyright © 2021 jgart ;;; Copyright © 2021 Nicolas Graves @@ -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")