* [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2.
@ 2024-03-08 12:32 aurtzy
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 1/6] gnu: Add meson-1.3 aurtzy
` (7 more replies)
0 siblings, 8 replies; 22+ messages in thread
From: aurtzy @ 2024-03-08 12:32 UTC (permalink / raw)
To: 69637; +Cc: john.kehayias, aurtzy
Hello!
This series of patches updates Mesa to the latest stable version with the NVK
Vulkan driver for NVIDIA GPUs enabled for x86_64 systems.
Mesa 24.0.2 depends on a newer version of libdrm (>= 2.4.119), which is
pending in another issue (https://issues.guix.gnu.org/68845).
Some packages (rust-syn-2.0.39, rust-proc-macro2-1.0.70, rust-quote-1.0.33)
were added specifically to be used as sources that satisfy explicit versions
of dependencies required by Mesa (for NVK). Would it be better to inline
origins in the change-subproject-sources phase? The same question also
applies for the rust-unicode-ident-1 source.
Currently, the Rust dependencies are found in the build by substituting the
fallback https://* URLs in the relevant ./subprojects/*.wrap files with
file://*, then relying on the fallback to "download" from the store. It
seemed a bit hacky doing it this way, but I'm not aware of a better solution.
A newer Meson version is also required for NVK (>= 1.3.0), which this patch
series adds a new variable for.
x86_64-linux and i686-linux have been tested to successfully build.
Cheers,
aurtzy
aurtzy (6):
gnu: Add meson-1.3.
gnu: Add rust-syn-2.0.39.
gnu: Add rust-proc-macro2-1.0.70.
gnu: Add rust-quote-1.0.33.
gnu: Add rust-bindgen-cli-0.69.
gnu: mesa: Update to 24.0.2.
gnu/packages/build-tools.scm | 14 ++++++
gnu/packages/crates-io.scm | 95 ++++++++++++++++++++++++++++++++++++
gnu/packages/gl.scm | 68 +++++++++++++++++++-------
3 files changed, 160 insertions(+), 17 deletions(-)
base-commit: 0b5cbca689b2f91949e191ca256ffc9bb48c1141
--
2.41.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates 1/6] gnu: Add meson-1.3.
2024-03-08 12:32 [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2 aurtzy
@ 2024-03-08 20:27 ` aurtzy
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 2/6] gnu: Add rust-syn-2.0.39 aurtzy
` (6 subsequent siblings)
7 siblings, 0 replies; 22+ messages in thread
From: aurtzy @ 2024-03-08 20:27 UTC (permalink / raw)
To: 69637; +Cc: aurtzy
* gnu/packages/build-tools.scm (meson-1.3): New variable.
Change-Id: I3c280851d0ecd116572e982db7a0e90045bcd682
---
gnu/packages/build-tools.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 15d88ded80..e25266820f 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2021 qblade <qblade@protonmail.com>
;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022, 2023 Juliana Sims <juli@incana.org>
+;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -343,6 +344,19 @@ (define-public meson/newer
(base32
"073vf8059nzs6p5aaqr5wva4pgl81540szdb5yw9yhyajwgm8jyh"))))))
+(define-public meson-1.3
+ (package
+ (inherit meson/newer)
+ (version "1.3.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/mesonbuild/meson/"
+ "releases/download/" version "/meson-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1ajvkcyly1nsxwjc2vly1vlvfjrwpfnza5prfr104wxhr18b8bj9"))))))
+
(define-public meson-python
(package
(name "meson-python")
--
2.41.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates 2/6] gnu: Add rust-syn-2.0.39.
2024-03-08 12:32 [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2 aurtzy
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 1/6] gnu: Add meson-1.3 aurtzy
@ 2024-03-08 20:27 ` aurtzy
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 3/6] gnu: Add rust-proc-macro2-1.0.70 aurtzy
` (5 subsequent siblings)
7 siblings, 0 replies; 22+ messages in thread
From: aurtzy @ 2024-03-08 20:27 UTC (permalink / raw)
To: 69637; +Cc: aurtzy, Efraim Flashner
* gnu/packages/crates-io.scm (rust-syn-2.0.39): New variable.
Change-Id: I148a87e6927adb897da410c29edec28cc0d5687d
---
gnu/packages/crates-io.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 1a08748392..9be241da4b 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -42,6 +42,7 @@
;;; Copyright © 2024 Herman Rimm <herman@rimm.ee>
;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
;;; Copyright © 2024 Suhail Singh <suhail@bayesians.ca>
+;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -66817,6 +66818,20 @@ (define-public rust-syn-2
a syntax tree of Rust source code.")
(license (list license:expat license:asl2.0))))
+(define-public rust-syn-2.0.39
+ (package
+ (inherit rust-syn-2)
+ (name "rust-syn")
+ (version "2.0.39")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "syn" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0ymyhxnk1yi4pzf72qk3lrdm9lgjwcrcwci0hhz5vx7wya88prr3"))))))
+
(define-public rust-syn-1
(package
(name "rust-syn")
--
2.41.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates 3/6] gnu: Add rust-proc-macro2-1.0.70.
2024-03-08 12:32 [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2 aurtzy
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 1/6] gnu: Add meson-1.3 aurtzy
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 2/6] gnu: Add rust-syn-2.0.39 aurtzy
@ 2024-03-08 20:27 ` aurtzy
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 4/6] gnu: Add rust-quote-1.0.33 aurtzy
` (4 subsequent siblings)
7 siblings, 0 replies; 22+ messages in thread
From: aurtzy @ 2024-03-08 20:27 UTC (permalink / raw)
To: 69637; +Cc: aurtzy, Efraim Flashner
* gnu/packages/crates-io.scm (rust-proc-macro2-1.0.70): New variable.
Change-Id: I4b567bee92c789cb189df2a6e022c2cdcd11bcdb
---
gnu/packages/crates-io.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 9be241da4b..bf2ea0ff6b 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -49651,6 +49651,20 @@ (define-public rust-proc-macro2-1
in terms of the upstream unstable API.")
(license (list license:asl2.0 license:expat))))
+(define-public rust-proc-macro2-1.0.70
+ (package
+ (inherit rust-proc-macro2-1)
+ (name "rust-proc-macro2")
+ (version "1.0.70")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "proc-macro2" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0fzxg3dkrjy101vv5b6llc8mh74xz1vhhsaiwrn68kzvynxqy9rr"))))))
+
(define-public rust-proc-macro2-0.4
(package
(inherit rust-proc-macro2-1)
--
2.41.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates 4/6] gnu: Add rust-quote-1.0.33.
2024-03-08 12:32 [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2 aurtzy
` (2 preceding siblings ...)
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 3/6] gnu: Add rust-proc-macro2-1.0.70 aurtzy
@ 2024-03-08 20:27 ` aurtzy
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 5/6] gnu: Add rust-bindgen-cli-0.69 aurtzy
` (3 subsequent siblings)
7 siblings, 0 replies; 22+ messages in thread
From: aurtzy @ 2024-03-08 20:27 UTC (permalink / raw)
To: 69637; +Cc: aurtzy, Efraim Flashner
* gnu/packages/crates-io.scm (rust-quote-1.0.33): New variable.
Change-Id: I45591530fe0644ded11bd0048519ac59de82eec9
---
gnu/packages/crates-io.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index bf2ea0ff6b..97dfc03525 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -52524,6 +52524,19 @@ (define-public rust-quote-1
(description "Quasi-quoting macro quote!(...)")
(license (list license:asl2.0 license:expat))))
+(define-public rust-quote-1.0.33
+ (package
+ (inherit rust-quote-1)
+ (name "rust-quote")
+ (version "1.0.33")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "quote" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1biw54hbbr12wdwjac55z1m2x2rylciw83qnjn564a3096jgqrsj"))))))
+
(define-public rust-quote-0.6
(package
(inherit rust-quote-1)
--
2.41.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates 5/6] gnu: Add rust-bindgen-cli-0.69.
2024-03-08 12:32 [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2 aurtzy
` (3 preceding siblings ...)
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 4/6] gnu: Add rust-quote-1.0.33 aurtzy
@ 2024-03-08 20:27 ` aurtzy
2024-03-12 11:54 ` Efraim Flashner
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 6/6] gnu: mesa: Update to 24.0.2 aurtzy
` (2 subsequent siblings)
7 siblings, 1 reply; 22+ messages in thread
From: aurtzy @ 2024-03-08 20:27 UTC (permalink / raw)
To: 69637; +Cc: aurtzy, Efraim Flashner
* gnu/packages/crates-io.scm (rust-bindgen-cli-0.69): New variable.
Change-Id: I0841f34d73acf4e161c9f0ba0c6543d7f0d03092
---
gnu/packages/crates-io.scm | 53 ++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 97dfc03525..150b8884b1 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -6182,6 +6182,59 @@ (define-public rust-bindgen-0.69
bindings to C and C++ libraries.")
(license license:bsd-3)))
+(define-public rust-bindgen-cli-0.69
+ (package
+ (inherit rust-bindgen-0.69)
+ (name "rust-bindgen-cli")
+ (version "0.69.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/rust-lang/rust-bindgen.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0mksvspqymdypgflgx6xqfxdr9a5wwx534imgcnn3mk7ffz0sqlm"))))
+ (arguments
+ (cons*
+ ;; 1 test case fails (header_ptr32_has_different_size_h); related issue:
+ ;; https://github.com/rust-lang/rust-bindgen/issues/2638
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'install
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (bindgen (string-append bin "/bindgen"))
+ (llvm-dir (string-append
+ (assoc-ref inputs "clang")
+ "/lib")))
+ (mkdir-p bin)
+ (copy-file "target/release/bindgen" bindgen)
+ (wrap-program bindgen
+ `("LIBCLANG_PATH" = (,llvm-dir)))))))
+ (substitute-keyword-arguments (package-arguments rust-bindgen-0.69)
+ ((#:skip-build? _)
+ #f)
+ ((#:cargo-inputs original-inputs)
+ `(("rust-bindgen" ,rust-bindgen-0.69)
+ ("rust-block" ,rust-block-0.1)
+ ("rust-clap" ,rust-clap-complete-4)
+ ("rust-env-logger" ,rust-env-logger-0.10)
+ ("rust-libloading" ,rust-libloading-0.7)
+ ("rust-objc" ,rust-objc-0.2)
+ ("rust-owo-colors" ,rust-owo-colors-3)
+ ("rust-prettyplease" ,rust-prettyplease-0.2)
+ ("rust-quickcheck" ,rust-quickcheck-0.4)
+ ("rust-similar" ,rust-similar-2)
+ ,@original-inputs)))))
+ (native-inputs
+ (modify-inputs (package-native-inputs rust-bindgen-0.69)
+ (prepend clang)))))
+
(define-public rust-bindgen-0.66
(package
(inherit rust-bindgen-0.69)
--
2.41.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates 6/6] gnu: mesa: Update to 24.0.2.
2024-03-08 12:32 [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2 aurtzy
` (4 preceding siblings ...)
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 5/6] gnu: Add rust-bindgen-cli-0.69 aurtzy
@ 2024-03-08 20:27 ` aurtzy
2024-03-12 8:11 ` [bug#69637] [PATCH mesa-updates 0/6] " Efraim Flashner
2024-03-22 7:24 ` [bug#69637] [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3 aurtzy
7 siblings, 0 replies; 22+ messages in thread
From: aurtzy @ 2024-03-08 20:27 UTC (permalink / raw)
To: 69637; +Cc: aurtzy
* gnu/packages/gl.scm (mesa): Update to 24.0.2.
Change-Id: Ic4176f8a747bcb4c5210af6ccb4569589192e4a7
---
gnu/packages/gl.scm | 68 +++++++++++++++++++++++++++++++++------------
1 file changed, 51 insertions(+), 17 deletions(-)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index f8dc8c1d9d..156c7cacbe 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -20,6 +20,7 @@
;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com>
;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2024 Liliana Marie Prikler <liliana.prikler@gmail.com>
+;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,8 +41,10 @@ (define-module (gnu packages gl)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages bison)
+ #:use-module (gnu packages build-tools)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages crates-io)
#:use-module (gnu packages documentation)
#:use-module (gnu packages elf)
#:use-module (gnu packages flex)
@@ -55,6 +58,7 @@ (define-module (gnu packages gl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages rust)
#:use-module (gnu packages tls)
#:use-module (gnu packages video)
#:use-module (gnu packages vulkan)
@@ -297,17 +301,17 @@ (define libva-without-mesa
(define-public mesa
(package
(name "mesa")
- (version "23.3.2")
+ (version "24.0.2")
(source
- (origin
- (method url-fetch)
- (uri (list (string-append "https://archive.mesa3d.org/"
- "mesa-" version ".tar.xz")
- (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
- "mesa-" version ".tar.xz")))
- (sha256
- (base32
- "1p4swrbmz3kb1805kdj973hf8virgmix4m9qprmcb2bgl4gviz1w"))))
+ (origin
+ (method url-fetch)
+ (uri (list (string-append "https://archive.mesa3d.org/"
+ "mesa-" version ".tar.xz")
+ (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
+ "mesa-" version ".tar.xz")))
+ (sha256
+ (base32
+ "1s69asdh7cz10abr63q8qdiamdcy7cjkzd9yp398wvfhva78mqll"))))
(build-system meson-build-system)
(propagated-inputs
;; The following are in the Requires.private field of gl.pc.
@@ -340,15 +344,22 @@ (define-public mesa
python-mako
python-wrapper
(@ (gnu packages base) which)
- (if (%current-target-system)
- (list cmake-minimal-cross
- pkg-config-for-build
- wayland
- wayland-protocols)
- '())))
+ (append
+ (if (%current-target-system)
+ (list cmake-minimal-cross
+ pkg-config-for-build
+ wayland
+ wayland-protocols)
+ '())
+ (if (target-x86-64?)
+ (list clang-15
+ rust-bindgen-cli-0.69
+ rust)
+ '()))))
(outputs '("out" "bin"))
(arguments
(list
+ #:meson meson-1.3
#:configure-flags
#~(list
#$@(cond
@@ -381,7 +392,9 @@ (define-public mesa
;; Explicitly enable Vulkan on some architectures.
#$@(cond
- ((or (target-x86-32?) (target-x86-64?))
+ ((target-x86-64?)
+ '("-Dvulkan-drivers=intel,intel_hasvk,amd,swrast,nouveau-experimental"))
+ ((target-x86-32?)
'("-Dvulkan-drivers=intel,intel_hasvk,amd,swrast"))
((or (target-ppc64le?) (target-ppc32?))
'("-Dvulkan-drivers=amd,swrast"))
@@ -478,6 +491,27 @@ (define-public mesa
(("'lp_test_arit', ") ""))))
(_
'((display "No tests to disable on this architecture.\n"))))))
+ (add-after 'unpack 'change-subproject-sources
+ ;; Subproject source URLs are patched to point to the store,
+ ;; which avoids an attempt to download them mid-build.
+ (lambda _
+ (for-each
+ (lambda (subproject)
+ (let ((file (car subproject))
+ (input (cdr subproject)))
+ (substitute* file
+ (("https.*/download")
+ (string-append "file://" input)))))
+ '#$(if (target-x86-64?)
+ #~(("subprojects/syn.wrap"
+ . #$(package-source rust-syn-2.0.39))
+ ("subprojects/unicode-ident.wrap"
+ . #$(package-source rust-unicode-ident-1))
+ ("subprojects/quote.wrap"
+ . #$(package-source rust-quote-1.0.33))
+ ("subprojects/proc-macro2.wrap"
+ . #$(package-source rust-proc-macro2-1.0.70)))
+ '()))))
(add-before 'configure 'fix-dlopen-libnames
(lambda _
(let ((out #$output))
--
2.41.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2.
2024-03-08 12:32 [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2 aurtzy
` (5 preceding siblings ...)
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 6/6] gnu: mesa: Update to 24.0.2 aurtzy
@ 2024-03-12 8:11 ` Efraim Flashner
2024-03-21 1:52 ` aurtzy
2024-03-22 7:24 ` [bug#69637] [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3 aurtzy
7 siblings, 1 reply; 22+ messages in thread
From: Efraim Flashner @ 2024-03-12 8:11 UTC (permalink / raw)
To: aurtzy; +Cc: john.kehayias, 69637
[-- Attachment #1: Type: text/plain, Size: 2504 bytes --]
On Fri, Mar 08, 2024 at 07:32:39AM -0500, aurtzy wrote:
> Hello!
>
> This series of patches updates Mesa to the latest stable version with the NVK
> Vulkan driver for NVIDIA GPUs enabled for x86_64 systems.
>
> Mesa 24.0.2 depends on a newer version of libdrm (>= 2.4.119), which is
> pending in another issue (https://issues.guix.gnu.org/68845).
>
> Some packages (rust-syn-2.0.39, rust-proc-macro2-1.0.70, rust-quote-1.0.33)
> were added specifically to be used as sources that satisfy explicit versions
> of dependencies required by Mesa (for NVK). Would it be better to inline
> origins in the change-subproject-sources phase? The same question also
> applies for the rust-unicode-ident-1 source.
Are there other architectures which have rust based drivers? x86_64
isn't the only architecture which has rust building on it.
> Currently, the Rust dependencies are found in the build by substituting the
> fallback https://* URLs in the relevant ./subprojects/*.wrap files with
> file://*, then relying on the fallback to "download" from the store. It
> seemed a bit hacky doing it this way, but I'm not aware of a better solution.
The crates are also available in
%output/share/cargo/registry/name-version.crate, although I can't think
of a good way to address them by name without using find-files.
I would personally replace the versions requested by mesa with whatever
version we happen to have in guix so that we don't have to add special
versions just for mesa.
> A newer Meson version is also required for NVK (>= 1.3.0), which this patch
> series adds a new variable for.
>
> x86_64-linux and i686-linux have been tested to successfully build.
>
> Cheers,
>
> aurtzy
>
> aurtzy (6):
> gnu: Add meson-1.3.
> gnu: Add rust-syn-2.0.39.
> gnu: Add rust-proc-macro2-1.0.70.
> gnu: Add rust-quote-1.0.33.
> gnu: Add rust-bindgen-cli-0.69.
> gnu: mesa: Update to 24.0.2.
>
> gnu/packages/build-tools.scm | 14 ++++++
> gnu/packages/crates-io.scm | 95 ++++++++++++++++++++++++++++++++++++
> gnu/packages/gl.scm | 68 +++++++++++++++++++-------
> 3 files changed, 160 insertions(+), 17 deletions(-)
>
>
> base-commit: 0b5cbca689b2f91949e191ca256ffc9bb48c1141
> --
> 2.41.0
>
>
>
>
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates 5/6] gnu: Add rust-bindgen-cli-0.69.
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 5/6] gnu: Add rust-bindgen-cli-0.69 aurtzy
@ 2024-03-12 11:54 ` Efraim Flashner
0 siblings, 0 replies; 22+ messages in thread
From: Efraim Flashner @ 2024-03-12 11:54 UTC (permalink / raw)
To: aurtzy; +Cc: 69637
[-- Attachment #1: Type: text/plain, Size: 496 bytes --]
I've applied rust-bindgen-cli to the master branch. I renamed it to
remove the version at the end and I switched to the crate-uri since
there's no tests in the bindgen-cli folder of the bindgen git repo.
I also moved it to the rust-apps module and added the shell completions.
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2.
2024-03-12 8:11 ` [bug#69637] [PATCH mesa-updates 0/6] " Efraim Flashner
@ 2024-03-21 1:52 ` aurtzy
2024-03-21 4:39 ` John Kehayias via Guix-patches via
0 siblings, 1 reply; 22+ messages in thread
From: aurtzy @ 2024-03-21 1:52 UTC (permalink / raw)
To: Efraim Flashner; +Cc: john.kehayias, 69637
[-- Attachment #1: Type: text/plain, Size: 2312 bytes --]
On 3/12/24 04:11, Efraim Flashner wrote:
> Are there other architectures which have rust based drivers? x86_64
> isn't the only architecture which has rust building on it.
There doesn't appear to be any official documentation stating
architecture requirements for Mesa with NVK/Rust, however I have added
few new inputs other than rust to get NVK working. I've only done
extensive testing with x86_64 so I was unsure of potential issues with
including this on other architectures (other than i686 not building rust).
> The crates are also available in
> %output/share/cargo/registry/name-version.crate, although I can't think
> of a good way to address them by name without using find-files.
>
> I would personally replace the versions requested by mesa with whatever
> version we happen to have in guix so that we don't have to add special
> versions just for mesa.
I have/had tried a few approaches to use the crates already available in
Guix with no success so far. I've outlined the approaches below; still
looking into solutions, but perhaps there's something I'm missing or
haven't tried yet?
- Simply including crates as (native-)inputs does not make them
discoverable by meson.
- Mesa uses these *.wrap files which specify the rust dependency
versions, source URLs, and tar hashes. I currently get the build working
by relying on meson to fall back to "downloading" from a patched source
URL (pointing to store), although it still has to match the hash.
- I recently discovered a way to disable the hash requirement so I could
use a different input version (i.e. one from Guix), but doing it causes
"File src/lib.rs does not exist" errors. I'm still looking into this
right now, as it seems promising.
- Old IRC logs point to projects like newsboat and librsvg which also
mix cargo with with another build system, but these start with
cargo-build-system with phases added/replaced from the second build
system. Cargo.toml doesn't exist in Mesa either (which
cargo-build-system seems to depend on), so experimenting with using
cargo-build-system didn't yield much.
I wanted to look more into the third bullet before responding, but I
felt it would be unfortunate to have this information rot while trying
to make time for hacking - hopefully it's still useful.
Cheers,
aurtzy
[-- Attachment #2: Type: text/html, Size: 3029 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2.
2024-03-21 1:52 ` aurtzy
@ 2024-03-21 4:39 ` John Kehayias via Guix-patches via
2024-03-21 10:58 ` Efraim Flashner
0 siblings, 1 reply; 22+ messages in thread
From: John Kehayias via Guix-patches via @ 2024-03-21 4:39 UTC (permalink / raw)
To: aurtzy; +Cc: 69637, Efraim Flashner
Hi aurtzy and Efraim,
On Wed, Mar 20, 2024 at 09:52 PM, aurtzy wrote:
> On 3/12/24 04:11, Efraim Flashner wrote:
>
> Are there other architectures which have rust based drivers? x86_64
> isn't the only architecture which has rust building on it.
>
> There doesn't appear to be any official documentation stating architecture requirements for Mesa with
> NVK/Rust, however I have added few new inputs other than rust to get NVK working. I've only done extensive
> testing with x86_64 so I was unsure of potential issues with including this on other architectures (other than
> i686 not building rust).
>
I guess this is the main question, if we will try to enable the NVK
driver for other architectures, if that is supported. We could also
leave it for the known working x86_64 to start. I would say we could
provide a mesa variant package for testing, but that might be
difficult as far as I know (e.g. trying to get Xorg to use a different
mesa package looked difficult from what I saw others try).
We could try just checking for where rust is available (is that just
supported-systems for the rust package, or do we have other logic?)
and building with NVK to see what fails... Though with how long it can
take us to build on other architectures, that might take a while to
find out and then correct.
> The crates are also available in
> %output/share/cargo/registry/name-version.crate, although I can't think
> of a good way to address them by name without using find-files.
>
> I would personally replace the versions requested by mesa with whatever
> version we happen to have in guix so that we don't have to add special
> versions just for mesa.
>
> I have/had tried a few approaches to use the crates already available in Guix with no success so far. I've
> outlined the approaches below; still looking into solutions, but perhaps there's something I'm missing or
> haven't tried yet?
>
> - Simply including crates as (native-)inputs does not make them discoverable by meson.
>
> - Mesa uses these *.wrap files which specify the rust dependency versions, source URLs, and tar hashes. I
> currently get the build working by relying on meson to fall back to "downloading" from a patched source URL
> (pointing to store), although it still has to match the hash.
>
> - I recently discovered a way to disable the hash requirement so I could use a different input version (i.e. one
> from Guix), but doing it causes "File src/lib.rs does not exist" errors. I'm still looking into this right now, as it
> seems promising.
>
> - Old IRC logs point to projects like newsboat and librsvg which also mix cargo with with another build
> system, but these start with cargo-build-system with phases added/replaced from the second build system.
> Cargo.toml doesn't exist in Mesa either (which cargo-build-system seems to depend on), so experimenting
> with using cargo-build-system didn't yield much.
>
> I wanted to look more into the third bullet before responding, but I felt it would be unfortunate to have this
> information rot while trying to make time for hacking - hopefully it's still useful.
>
> Cheers,
>
> aurtzy
Thanks for this additional info, aurtzy, and your work on this!
Efraim, any thoughts on the rust related stuff based on these other
attempts? I'm not familiar enough with rust, rust packaging, or what
mesa is doing in the meson builds to comment right now.
I would like to get the build farm cranking on the updates I have
queued for mesa-updates (cairo, libdrm, mesa, vulkan). We could also
do just the version update of mesa to start, or just NVK on x86_64,
leaving future changes for the next round. I don't have a preference
myself, other than wanting to get this branch moving with these
updates.
Thoughts?
And thanks both of you again!
John
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2.
2024-03-21 4:39 ` John Kehayias via Guix-patches via
@ 2024-03-21 10:58 ` Efraim Flashner
0 siblings, 0 replies; 22+ messages in thread
From: Efraim Flashner @ 2024-03-21 10:58 UTC (permalink / raw)
To: John Kehayias; +Cc: 69637, aurtzy
[-- Attachment #1: Type: text/plain, Size: 5717 bytes --]
On Thu, Mar 21, 2024 at 04:39:29AM +0000, John Kehayias wrote:
> Hi aurtzy and Efraim,
>
> On Wed, Mar 20, 2024 at 09:52 PM, aurtzy wrote:
>
> > On 3/12/24 04:11, Efraim Flashner wrote:
> >
> > Are there other architectures which have rust based drivers? x86_64
> > isn't the only architecture which has rust building on it.
> >
> > There doesn't appear to be any official documentation stating architecture requirements for Mesa with
> > NVK/Rust, however I have added few new inputs other than rust to get NVK working. I've only done extensive
> > testing with x86_64 so I was unsure of potential issues with including this on other architectures (other than
> > i686 not building rust).
> >
>
> I guess this is the main question, if we will try to enable the NVK
> driver for other architectures, if that is supported. We could also
> leave it for the known working x86_64 to start. I would say we could
> provide a mesa variant package for testing, but that might be
> difficult as far as I know (e.g. trying to get Xorg to use a different
> mesa package looked difficult from what I saw others try).
>
> We could try just checking for where rust is available (is that just
> supported-systems for the rust package, or do we have other logic?)
> and building with NVK to see what fails... Though with how long it can
> take us to build on other architectures, that might take a while to
> find out and then correct.
We have (supported-package? package) to check if a package is supported.
Then we can wrap the phase in #$@(if (assoc-ref inputs "rust") ...) and
it should all just work.
> > The crates are also available in
> > %output/share/cargo/registry/name-version.crate, although I can't think
> > of a good way to address them by name without using find-files.
> >
> > I would personally replace the versions requested by mesa with whatever
> > version we happen to have in guix so that we don't have to add special
> > versions just for mesa.
> >
> > I have/had tried a few approaches to use the crates already available in Guix with no success so far. I've
> > outlined the approaches below; still looking into solutions, but perhaps there's something I'm missing or
> > haven't tried yet?
> >
> > - Simply including crates as (native-)inputs does not make them discoverable by meson.
> >
> > - Mesa uses these *.wrap files which specify the rust dependency versions, source URLs, and tar hashes. I
> > currently get the build working by relying on meson to fall back to "downloading" from a patched source URL
> > (pointing to store), although it still has to match the hash.
> >
> > - I recently discovered a way to disable the hash requirement so I could use a different input version (i.e. one
> > from Guix), but doing it causes "File src/lib.rs does not exist" errors. I'm still looking into this right now, as it
> > seems promising.
> >
> > - Old IRC logs point to projects like newsboat and librsvg which also mix cargo with with another build
> > system, but these start with cargo-build-system with phases added/replaced from the second build system.
> > Cargo.toml doesn't exist in Mesa either (which cargo-build-system seems to depend on), so experimenting
> > with using cargo-build-system didn't yield much.
> >
> > I wanted to look more into the third bullet before responding, but I felt it would be unfortunate to have this
> > information rot while trying to make time for hacking - hopefully it's still useful.
I also tried a couple of different options. The one that I most want
involved using with-output-to-file to rewrite the wrap file and
replacing all the fields. I borrowed the file-sha256 function from
guix/build/cargo-utils.scm to get the source_hash. In the end I wasn't
able to get the gexp and un-gexp bits working to actually get the file
written.
When I kept a failed build I saw that the 'directory' field is the
directory into which meson writes the meson.build file, which is why
using a different version of the rust crate caused problems with
src/lib.rs not existing. I suppose we could start from your patch and
then, after running substitute, extract the tarball into either a
hardcoded path (determined after manually reading the sources) or we can
extract the 'directory' field by reading the sources and then untar the
source there.
> > Cheers,
> >
> > aurtzy
>
> Thanks for this additional info, aurtzy, and your work on this!
>
> Efraim, any thoughts on the rust related stuff based on these other
> attempts? I'm not familiar enough with rust, rust packaging, or what
> mesa is doing in the meson builds to comment right now.
>
> I would like to get the build farm cranking on the updates I have
> queued for mesa-updates (cairo, libdrm, mesa, vulkan). We could also
> do just the version update of mesa to start, or just NVK on x86_64,
> leaving future changes for the next round. I don't have a preference
> myself, other than wanting to get this branch moving with these
> updates.
>
> Thoughts?
Looking at qa.guix.gnu.org I believe that gnome-team is going to merge
soon, and then the emacs-team is up next.
I would prefer to use the already packaged crates but we can go ahead
and use the ones from the patchset for now and work out swapping them
later. As far as which architectures, I think I'd start with x86_64
only first. And sprinkle a couple of TODOs around.
> And thanks both of you again!
> John
>
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3.
2024-03-08 12:32 [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2 aurtzy
` (6 preceding siblings ...)
2024-03-12 8:11 ` [bug#69637] [PATCH mesa-updates 0/6] " Efraim Flashner
@ 2024-03-22 7:24 ` aurtzy
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 1/5] gnu: Add meson-1.3 aurtzy
` (5 more replies)
7 siblings, 6 replies; 22+ messages in thread
From: aurtzy @ 2024-03-22 7:24 UTC (permalink / raw)
To: 69637; +Cc: john.kehayias, aurtzy, efraim
New patchset coming in. Mesa has been updated to 24.0.3, and I've added TODO
comments for future work as suggested.
> I would like to get the build farm cranking on the updates I have
> queued for mesa-updates (cairo, libdrm, mesa, vulkan). We could also
> do just the version update of mesa to start, or just NVK on x86_64,
> leaving future changes for the next round. I don't have a preference
> myself, other than wanting to get this branch moving with these
> updates.
NVK on 24.0.3 is also still considered experimental, so if that's a concern we
could save this work for 24.1 when it's planned to move out of this stage.
> I also tried a couple of different options. The one that I most want
> involved using with-output-to-file to rewrite the wrap file and
> replacing all the fields. I borrowed the file-sha256 function from
> guix/build/cargo-utils.scm to get the source_hash. In the end I wasn't
> able to get the gexp and un-gexp bits working to actually get the file
> written.
>
> When I kept a failed build I saw that the 'directory' field is the
> directory into which meson writes the meson.build file, which is why
> using a different version of the rust crate caused problems with
> src/lib.rs not existing. I suppose we could start from your patch and
> then, after running substitute, extract the tarball into either a
> hardcoded path (determined after manually reading the sources) or we can
> extract the 'directory' field by reading the sources and then untar the
> source there.
Noted, thanks Efraim! I'll keep looking into this.
Best,
aurtzy
aurtzy (5):
gnu: Add meson-1.3.
gnu: Add rust-syn-2.0.39.
gnu: Add rust-proc-macro2-1.0.70.
gnu: Add rust-quote-1.0.33.
gnu: mesa: Update to 24.0.3.
gnu/packages/build-tools.scm | 14 +++++++
gnu/packages/crates-io.scm | 42 +++++++++++++++++++
gnu/packages/gl.scm | 80 ++++++++++++++++++++++++++++--------
3 files changed, 118 insertions(+), 18 deletions(-)
base-commit: 3d2966e0b7dbf15a5cb497037ace73d1be92febf
--
2.41.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates v2 1/5] gnu: Add meson-1.3.
2024-03-22 7:24 ` [bug#69637] [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3 aurtzy
@ 2024-03-22 7:33 ` aurtzy
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 2/5] gnu: Add rust-syn-2.0.39 aurtzy
` (4 subsequent siblings)
5 siblings, 0 replies; 22+ messages in thread
From: aurtzy @ 2024-03-22 7:33 UTC (permalink / raw)
To: 69637; +Cc: john.kehayias, aurtzy, efraim
* gnu/packages/build-tools.scm (meson-1.3): New variable.
Change-Id: I3c280851d0ecd116572e982db7a0e90045bcd682
---
gnu/packages/build-tools.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 15d88ded80..e25266820f 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2021 qblade <qblade@protonmail.com>
;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022, 2023 Juliana Sims <juli@incana.org>
+;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -343,6 +344,19 @@ (define-public meson/newer
(base32
"073vf8059nzs6p5aaqr5wva4pgl81540szdb5yw9yhyajwgm8jyh"))))))
+(define-public meson-1.3
+ (package
+ (inherit meson/newer)
+ (version "1.3.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/mesonbuild/meson/"
+ "releases/download/" version "/meson-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1ajvkcyly1nsxwjc2vly1vlvfjrwpfnza5prfr104wxhr18b8bj9"))))))
+
(define-public meson-python
(package
(name "meson-python")
--
2.41.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates v2 2/5] gnu: Add rust-syn-2.0.39.
2024-03-22 7:24 ` [bug#69637] [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3 aurtzy
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 1/5] gnu: Add meson-1.3 aurtzy
@ 2024-03-22 7:33 ` aurtzy
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 3/5] gnu: Add rust-proc-macro2-1.0.70 aurtzy
` (3 subsequent siblings)
5 siblings, 0 replies; 22+ messages in thread
From: aurtzy @ 2024-03-22 7:33 UTC (permalink / raw)
To: 69637; +Cc: john.kehayias, aurtzy, efraim, Efraim Flashner
* gnu/packages/crates-io.scm (rust-syn-2.0.39): New variable.
Change-Id: I148a87e6927adb897da410c29edec28cc0d5687d
---
gnu/packages/crates-io.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index a67d3d74bb..be33ea973f 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -42,6 +42,7 @@
;;; Copyright © 2024 Herman Rimm <herman@rimm.ee>
;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
;;; Copyright © 2024 Suhail Singh <suhail@bayesians.ca>
+;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -66818,6 +66819,20 @@ (define-public rust-syn-2
a syntax tree of Rust source code.")
(license (list license:expat license:asl2.0))))
+(define-public rust-syn-2.0.39
+ (package
+ (inherit rust-syn-2)
+ (name "rust-syn")
+ (version "2.0.39")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "syn" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0ymyhxnk1yi4pzf72qk3lrdm9lgjwcrcwci0hhz5vx7wya88prr3"))))))
+
(define-public rust-syn-1
(package
(name "rust-syn")
--
2.41.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates v2 3/5] gnu: Add rust-proc-macro2-1.0.70.
2024-03-22 7:24 ` [bug#69637] [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3 aurtzy
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 1/5] gnu: Add meson-1.3 aurtzy
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 2/5] gnu: Add rust-syn-2.0.39 aurtzy
@ 2024-03-22 7:33 ` aurtzy
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 4/5] gnu: Add rust-quote-1.0.33 aurtzy
` (2 subsequent siblings)
5 siblings, 0 replies; 22+ messages in thread
From: aurtzy @ 2024-03-22 7:33 UTC (permalink / raw)
To: 69637; +Cc: john.kehayias, aurtzy, efraim, Efraim Flashner
* gnu/packages/crates-io.scm (rust-proc-macro2-1.0.70): New variable.
Change-Id: I4b567bee92c789cb189df2a6e022c2cdcd11bcdb
---
gnu/packages/crates-io.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index be33ea973f..c5aff774b3 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -49652,6 +49652,20 @@ (define-public rust-proc-macro2-1
in terms of the upstream unstable API.")
(license (list license:asl2.0 license:expat))))
+(define-public rust-proc-macro2-1.0.70
+ (package
+ (inherit rust-proc-macro2-1)
+ (name "rust-proc-macro2")
+ (version "1.0.70")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "proc-macro2" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0fzxg3dkrjy101vv5b6llc8mh74xz1vhhsaiwrn68kzvynxqy9rr"))))))
+
(define-public rust-proc-macro2-0.4
(package
(inherit rust-proc-macro2-1)
--
2.41.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates v2 4/5] gnu: Add rust-quote-1.0.33.
2024-03-22 7:24 ` [bug#69637] [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3 aurtzy
` (2 preceding siblings ...)
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 3/5] gnu: Add rust-proc-macro2-1.0.70 aurtzy
@ 2024-03-22 7:33 ` aurtzy
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 5/5] gnu: mesa: Update to 24.0.3 aurtzy
2024-03-25 1:29 ` [bug#69637] [PATCH mesa-updates v2 0/5] " John Kehayias via Guix-patches via
5 siblings, 0 replies; 22+ messages in thread
From: aurtzy @ 2024-03-22 7:33 UTC (permalink / raw)
To: 69637; +Cc: john.kehayias, aurtzy, efraim, Efraim Flashner
* gnu/packages/crates-io.scm (rust-quote-1.0.33): New variable.
Change-Id: I45591530fe0644ded11bd0048519ac59de82eec9
---
gnu/packages/crates-io.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index c5aff774b3..0a788fc5ef 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -52525,6 +52525,19 @@ (define-public rust-quote-1
(description "Quasi-quoting macro quote!(...)")
(license (list license:asl2.0 license:expat))))
+(define-public rust-quote-1.0.33
+ (package
+ (inherit rust-quote-1)
+ (name "rust-quote")
+ (version "1.0.33")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "quote" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1biw54hbbr12wdwjac55z1m2x2rylciw83qnjn564a3096jgqrsj"))))))
+
(define-public rust-quote-0.6
(package
(inherit rust-quote-1)
--
2.41.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates v2 5/5] gnu: mesa: Update to 24.0.3.
2024-03-22 7:24 ` [bug#69637] [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3 aurtzy
` (3 preceding siblings ...)
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 4/5] gnu: Add rust-quote-1.0.33 aurtzy
@ 2024-03-22 7:33 ` aurtzy
2024-03-25 1:29 ` [bug#69637] [PATCH mesa-updates v2 0/5] " John Kehayias via Guix-patches via
5 siblings, 0 replies; 22+ messages in thread
From: aurtzy @ 2024-03-22 7:33 UTC (permalink / raw)
To: 69637; +Cc: john.kehayias, aurtzy, efraim
* gnu/packages/gl.scm (mesa): Update to 24.0.3.
Change-Id: Ic4176f8a747bcb4c5210af6ccb4569589192e4a7
---
gnu/packages/gl.scm | 80 +++++++++++++++++++++++++++++++++++----------
1 file changed, 62 insertions(+), 18 deletions(-)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index f8dc8c1d9d..0265716ac0 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -20,6 +20,7 @@
;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com>
;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2024 Liliana Marie Prikler <liliana.prikler@gmail.com>
+;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,8 +41,10 @@ (define-module (gnu packages gl)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages bison)
+ #:use-module (gnu packages build-tools)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages crates-io)
#:use-module (gnu packages documentation)
#:use-module (gnu packages elf)
#:use-module (gnu packages flex)
@@ -55,6 +58,8 @@ (define-module (gnu packages gl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#: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)
@@ -297,17 +302,17 @@ (define libva-without-mesa
(define-public mesa
(package
(name "mesa")
- (version "23.3.2")
+ (version "24.0.3")
(source
- (origin
- (method url-fetch)
- (uri (list (string-append "https://archive.mesa3d.org/"
- "mesa-" version ".tar.xz")
- (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
- "mesa-" version ".tar.xz")))
- (sha256
- (base32
- "1p4swrbmz3kb1805kdj973hf8virgmix4m9qprmcb2bgl4gviz1w"))))
+ (origin
+ (method url-fetch)
+ (uri (list (string-append "https://archive.mesa3d.org/"
+ "mesa-" version ".tar.xz")
+ (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
+ "mesa-" version ".tar.xz")))
+ (sha256
+ (base32
+ "1gpx3glifdvyw2fxigiannrxkdfhag6b6h0nxab3azbvlfickbkp"))))
(build-system meson-build-system)
(propagated-inputs
;; The following are in the Requires.private field of gl.pc.
@@ -340,15 +345,23 @@ (define-public mesa
python-mako
python-wrapper
(@ (gnu packages base) which)
- (if (%current-target-system)
- (list cmake-minimal-cross
- pkg-config-for-build
- wayland
- wayland-protocols)
- '())))
+ (append
+ (if (%current-target-system)
+ (list cmake-minimal-cross
+ pkg-config-for-build
+ wayland
+ wayland-protocols)
+ '())
+ ;; NVK-specific inputs
+ (if (target-x86-64?)
+ (list clang-15
+ rust-bindgen-cli
+ rust)
+ '()))))
(outputs '("out" "bin"))
(arguments
(list
+ #:meson meson-1.3
#:configure-flags
#~(list
#$@(cond
@@ -379,9 +392,12 @@ (define-public mesa
"-Dgbm=enabled"
"-Dshared-glapi=enabled"
- ;; Explicitly enable Vulkan on some architectures.
+ ;; Explicitly enable Vulkan on some architectures. TODO: Identify other
+ ;; architectures where nouveau (NVK) works and enable it for them
#$@(cond
- ((or (target-x86-32?) (target-x86-64?))
+ ((target-x86-64?)
+ '("-Dvulkan-drivers=intel,intel_hasvk,amd,swrast,nouveau-experimental"))
+ ((target-x86-32?)
'("-Dvulkan-drivers=intel,intel_hasvk,amd,swrast"))
((or (target-ppc64le?) (target-ppc32?))
'("-Dvulkan-drivers=amd,swrast"))
@@ -478,6 +494,34 @@ (define-public mesa
(("'lp_test_arit', ") ""))))
(_
'((display "No tests to disable on this architecture.\n"))))))
+ #$@(if (target-x86-64?)
+ #~((add-after 'unpack 'change-subproject-sources
+ ;; Patch subproject source URLs to point to the store, which lets
+ ;; meson correctly identify rust inputs and avoid an attempt to
+ ;; download them mid-build.
+ (lambda _
+ (for-each
+ (match-lambda
+ ((file input)
+ (substitute* file
+ (("source_url = .*$")
+ "")
+ (("source_hash = .*$")
+ "")
+ (("(source_filename = ).*$" all assign)
+ (string-append assign input "\n")))))
+ ;; TODO: Patch mesa to allow for using sources with different
+ ;; versions so we don't have to package these crates
+ ;; specifically for mesa.
+ '(("subprojects/syn.wrap"
+ #$(package-source rust-syn-2.0.39))
+ ("subprojects/unicode-ident.wrap"
+ #$(package-source rust-unicode-ident-1))
+ ("subprojects/quote.wrap"
+ #$(package-source rust-quote-1.0.33))
+ ("subprojects/proc-macro2.wrap"
+ #$(package-source rust-proc-macro2-1.0.70)))))))
+ #~())
(add-before 'configure 'fix-dlopen-libnames
(lambda _
(let ((out #$output))
--
2.41.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3.
2024-03-22 7:24 ` [bug#69637] [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3 aurtzy
` (4 preceding siblings ...)
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 5/5] gnu: mesa: Update to 24.0.3 aurtzy
@ 2024-03-25 1:29 ` John Kehayias via Guix-patches via
2024-03-27 2:14 ` aurtzy
5 siblings, 1 reply; 22+ messages in thread
From: John Kehayias via Guix-patches via @ 2024-03-25 1:29 UTC (permalink / raw)
To: aurtzy; +Cc: 69637, efraim
Hi aurtzy and Efraim,
On Fri, Mar 22, 2024 at 03:24 AM, aurtzy wrote:
> New patchset coming in. Mesa has been updated to 24.0.3, and I've added TODO
> comments for future work as suggested.
>
Thanks!
>> I would like to get the build farm cranking on the updates I have
>> queued for mesa-updates (cairo, libdrm, mesa, vulkan). We could also
>> do just the version update of mesa to start, or just NVK on x86_64,
>> leaving future changes for the next round. I don't have a preference
>> myself, other than wanting to get this branch moving with these
>> updates.
>
> NVK on 24.0.3 is also still considered experimental, so if that's a concern we
> could save this work for 24.1 when it's planned to move out of this stage.
>
Right, I forgot about that. I also remember that it depends (or is
helped by) some changes in recent kernels, 6.7 and/or 6.8 if I remember.
So, maybe we can take this approach:
1. Make the update just to 24.0.3 for mesa (does that require newer
meson?)
2. Add any rust packages as needed to master
3. Either add a mesa-next (to master?) or followup on mesa-updates after
it gets merged to master with a mesa based on 24.1 (as soon as it is
tagged) with NVK enabled. This will let us at least get mesa built and
make for a headstart come 24.0.1.
With 24.1 soon ("this quarter"?) and how long it can take us to build on
non-x86 architectures, it would be nice to have that go quickly. Since
I'll be including cairo, libdrm, and vulkan updates (at least) this
round, I anticipate it taking a bit.
Does that sound okay? It'll give some time to test things and clean
up/find alternatives as Efraim suggested.
I'm also not opposed to just enabling NVK now. In that case, we should
have one commit to just update mesa and another to enable NVK.
>> I also tried a couple of different options. The one that I most want
>> involved using with-output-to-file to rewrite the wrap file and
>> replacing all the fields. I borrowed the file-sha256 function from
>> guix/build/cargo-utils.scm to get the source_hash. In the end I wasn't
>> able to get the gexp and un-gexp bits working to actually get the file
>> written.
>>
>> When I kept a failed build I saw that the 'directory' field is the
>> directory into which meson writes the meson.build file, which is why
>> using a different version of the rust crate caused problems with
>> src/lib.rs not existing. I suppose we could start from your patch and
>> then, after running substitute, extract the tarball into either a
>> hardcoded path (determined after manually reading the sources) or we can
>> extract the 'directory' field by reading the sources and then untar the
>> source there.
>
> Noted, thanks Efraim! I'll keep looking into this.
>
Thanks both of you! I would like to start pushing patches and building
everything in the next few days, especially as some have sat for a while
and it will take time to build.
John
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3.
2024-03-25 1:29 ` [bug#69637] [PATCH mesa-updates v2 0/5] " John Kehayias via Guix-patches via
@ 2024-03-27 2:14 ` aurtzy
2024-03-27 5:22 ` John Kehayias via Guix-patches via
0 siblings, 1 reply; 22+ messages in thread
From: aurtzy @ 2024-03-27 2:14 UTC (permalink / raw)
To: John Kehayias; +Cc: 69637, efraim
[-- Attachment #1: Type: text/plain, Size: 3536 bytes --]
On 3/24/24 21:29, John Kehayias wrote:
> Hi aurtzy and Efraim,
>
> On Fri, Mar 22, 2024 at 03:24 AM, aurtzy wrote:
>
>> New patchset coming in. Mesa has been updated to 24.0.3, and I've added TODO
>> comments for future work as suggested.
>>
> Thanks!
Happy to help!
>>> I would like to get the build farm cranking on the updates I have
>>> queued for mesa-updates (cairo, libdrm, mesa, vulkan). We could also
>>> do just the version update of mesa to start, or just NVK on x86_64,
>>> leaving future changes for the next round. I don't have a preference
>>> myself, other than wanting to get this branch moving with these
>>> updates.
>> NVK on 24.0.3 is also still considered experimental, so if that's a concern we
>> could save this work for 24.1 when it's planned to move out of this stage.
>>
> Right, I forgot about that. I also remember that it depends (or is
> helped by) some changes in recent kernels, 6.7 and/or 6.8 if I remember.
6.6 appears to be the minimum required according to mesa docs, if that
changes anything:
https://docs.mesa3d.org/drivers/nvk.html#kernel-requirements
> So, maybe we can take this approach:
>
> 1. Make the update just to 24.0.3 for mesa (does that require newer
> meson?)
The meson 1.3 requirement is only for NVK; mesa 24.0.3 without NVK can
build with the current meson.
> 2. Add any rust packages as needed to master
>
> 3. Either add a mesa-next (to master?) or followup on mesa-updates after
> it gets merged to master with a mesa based on 24.1 (as soon as it is
> tagged) with NVK enabled. This will let us at least get mesa built and
> make for a headstart come 24.0.1.
>
> With 24.1 soon ("this quarter"?) and how long it can take us to build on
> non-x86 architectures, it would be nice to have that go quickly. Since
> I'll be including cairo, libdrm, and vulkan updates (at least) this
> round, I anticipate it taking a bit.
>
> Does that sound okay? It'll give some time to test things and clean
> up/find alternatives as Efraim suggested.
>
> I'm also not opposed to just enabling NVK now. In that case, we should
> have one commit to just update mesa and another to enable NVK.
Looks like 24.1 stable should be releasing May-June:
https://docs.mesa3d.org/release-calendar.html
This approach sounds fine to me. I don't mind holding back the
NVK-related changes for more testing and improvement.
>>> I also tried a couple of different options. The one that I most want
>>> involved using with-output-to-file to rewrite the wrap file and
>>> replacing all the fields. I borrowed the file-sha256 function from
>>> guix/build/cargo-utils.scm to get the source_hash. In the end I wasn't
>>> able to get the gexp and un-gexp bits working to actually get the file
>>> written.
>>>
>>> When I kept a failed build I saw that the 'directory' field is the
>>> directory into which meson writes the meson.build file, which is why
>>> using a different version of the rust crate caused problems with
>>> src/lib.rs not existing. I suppose we could start from your patch and
>>> then, after running substitute, extract the tarball into either a
>>> hardcoded path (determined after manually reading the sources) or we can
>>> extract the 'directory' field by reading the sources and then untar the
>>> source there.
>> Noted, thanks Efraim! I'll keep looking into this.
>>
> Thanks both of you! I would like to start pushing patches and building
> everything in the next few days, especially as some have sat for a while
> and it will take time to build.
>
> John
Cheers,
aurtzy
[-- Attachment #2: Type: text/html, Size: 5252 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* [bug#69637] [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3.
2024-03-27 2:14 ` aurtzy
@ 2024-03-27 5:22 ` John Kehayias via Guix-patches via
2024-04-18 4:39 ` bug#69637: " John Kehayias via Guix-patches via
0 siblings, 1 reply; 22+ messages in thread
From: John Kehayias via Guix-patches via @ 2024-03-27 5:22 UTC (permalink / raw)
To: aurtzy; +Cc: 69637, efraim
Hello,
On Tue, Mar 26, 2024 at 10:14 PM, aurtzy wrote:
> Looks like 24.1 stable should be releasing May-June: <https://docs.mesa3d.org/release-calendar.html>
>
All the more reason to pre-empt it a bit, as I will be away for most
of May and the beginning of June :-)
> This approach sounds fine to me. I don't mind holding back the NVK-related changes for more testing and
> improvement.
>
Great, thanks!
I applied a version only bump locally (haven't pushed it out live yet)
and so far so good. I put you as co-author, even though it was just
the hash basically, you did save me having to do that.
Once this is on mesa-updates, you can base your patches on that (bunch
of other updates too) and it can live on that branch in prep for 24.1.
Thanks again!
John
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#69637: [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3.
2024-03-27 5:22 ` John Kehayias via Guix-patches via
@ 2024-04-18 4:39 ` John Kehayias via Guix-patches via
0 siblings, 0 replies; 22+ messages in thread
From: John Kehayias via Guix-patches via @ 2024-04-18 4:39 UTC (permalink / raw)
To: aurtzy; +Cc: 69637-done, efraim
On Wed, Mar 27, 2024 at 01:17 AM, John Kehayias wrote:
> Hello,
>
> On Tue, Mar 26, 2024 at 10:14 PM, aurtzy wrote:
>
>> Looks like 24.1 stable should be releasing May-June:
>> <https://docs.mesa3d.org/release-calendar.html>
>>
>
> All the more reason to pre-empt it a bit, as I will be away for most
> of May and the beginning of June :-)
>
>> This approach sounds fine to me. I don't mind holding back the
>> NVK-related changes for more testing and
>> improvement.
>>
>
> Great, thanks!
>
> I applied a version only bump locally (haven't pushed it out live yet)
> and so far so good. I put you as co-author, even though it was just
> the hash basically, you did save me having to do that.
>
> Once this is on mesa-updates, you can base your patches on that (bunch
> of other updates too) and it can live on that branch in prep for 24.1.
>
> Thanks again!
> John
mesa updated to 24.0.3 in b43d36a556c1c1d75fdffbec08d8c39121a528cd and
then 24.0.4 in 23928e2d426fb63945682c2c8c60145fe4d333dd.
Closing this issue number, but thank you for the efforts so far for NVK.
Happy to have patches for 24.1 on mesa-updates when you have them.
John
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2024-04-18 4:41 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-08 12:32 [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2 aurtzy
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 1/6] gnu: Add meson-1.3 aurtzy
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 2/6] gnu: Add rust-syn-2.0.39 aurtzy
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 3/6] gnu: Add rust-proc-macro2-1.0.70 aurtzy
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 4/6] gnu: Add rust-quote-1.0.33 aurtzy
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 5/6] gnu: Add rust-bindgen-cli-0.69 aurtzy
2024-03-12 11:54 ` Efraim Flashner
2024-03-08 20:27 ` [bug#69637] [PATCH mesa-updates 6/6] gnu: mesa: Update to 24.0.2 aurtzy
2024-03-12 8:11 ` [bug#69637] [PATCH mesa-updates 0/6] " Efraim Flashner
2024-03-21 1:52 ` aurtzy
2024-03-21 4:39 ` John Kehayias via Guix-patches via
2024-03-21 10:58 ` Efraim Flashner
2024-03-22 7:24 ` [bug#69637] [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3 aurtzy
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 1/5] gnu: Add meson-1.3 aurtzy
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 2/5] gnu: Add rust-syn-2.0.39 aurtzy
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 3/5] gnu: Add rust-proc-macro2-1.0.70 aurtzy
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 4/5] gnu: Add rust-quote-1.0.33 aurtzy
2024-03-22 7:33 ` [bug#69637] [PATCH mesa-updates v2 5/5] gnu: mesa: Update to 24.0.3 aurtzy
2024-03-25 1:29 ` [bug#69637] [PATCH mesa-updates v2 0/5] " John Kehayias via Guix-patches via
2024-03-27 2:14 ` aurtzy
2024-03-27 5:22 ` John Kehayias via Guix-patches via
2024-04-18 4:39 ` bug#69637: " John Kehayias via Guix-patches via
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.