gnu: Add rust-softbuffer-0.3.

* gnu/packages/crates-graphics.scm (rust-softbuffer-0.3): New variable.

Change-Id: Ib40844b520d990335baa4f38aebe91151c787127
This commit is contained in:
Efraim Flashner 2024-01-04 11:17:34 +02:00
parent 59aa37d88f
commit 980190846b
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -46,7 +46,11 @@ (define-module (gnu packages crates-graphics)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages version-control)
#:use-module (gnu packages video))
#:use-module (gnu packages video)
#:use-module (gnu packages vulkan)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg))
;;;
;;; Please: Try to add new module packages in alphabetic order.
@ -3197,6 +3201,90 @@ (define-public rust-smithay-clipboard-0.6
#:cargo-development-inputs
(("rust-smithay-client-toolkit" ,rust-smithay-client-toolkit-0.16))))))
(define-public rust-softbuffer-0.3
(package
(name "rust-softbuffer")
(version "0.3.3")
(source
(origin
(method url-fetch)
(uri (crate-uri "softbuffer" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0j199d8zg964324sppk1gnkq2361ivay7ykrlm71npg8v3ma4vc2"))))
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs (("rust-as-raw-xcb-connection" ,rust-as-raw-xcb-connection-1)
("rust-bytemuck" ,rust-bytemuck-1)
("rust-cfg-aliases" ,rust-cfg-aliases-0.1)
("rust-cocoa" ,rust-cocoa-0.25)
("rust-core-graphics" ,rust-core-graphics-0.23)
("rust-drm" ,rust-drm-0.10)
("rust-fastrand" ,rust-fastrand-2)
("rust-foreign-types" ,rust-foreign-types-0.5)
("rust-js-sys" ,rust-js-sys-0.3)
("rust-log" ,rust-log-0.4)
("rust-memmap2" ,rust-memmap2-0.9)
("rust-objc" ,rust-objc-0.2)
("rust-raw-window-handle" ,rust-raw-window-handle-0.5)
("rust-redox-syscall" ,rust-redox-syscall-0.4)
("rust-rustix" ,rust-rustix-0.38)
("rust-tiny-xlib" ,rust-tiny-xlib-0.2)
("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
("rust-wayland-backend" ,rust-wayland-backend-0.3)
("rust-wayland-client" ,rust-wayland-client-0.31)
("rust-wayland-sys" ,rust-wayland-sys-0.31)
("rust-web-sys" ,rust-web-sys-0.3)
("rust-windows-sys" ,rust-windows-sys-0.48)
("rust-x11rb" ,rust-x11rb-0.12))
#:cargo-development-inputs
(("rust-colorous" ,rust-colorous-1)
("rust-criterion" ,rust-criterion-0.4)
("rust-image" ,rust-image-0.24)
("rust-instant" ,rust-instant-0.1)
("rust-rayon" ,rust-rayon-1)
("rust-rustix" ,rust-rustix-0.38)
("rust-wasm-bindgen-test" ,rust-wasm-bindgen-test-0.3)
("rust-winit" ,rust-winit-0.28)
("rust-winit-test" ,rust-winit-test-0.1))
#:phases
(modify-phases %standard-phases
(add-after 'configure 'add-absolute-library-references
(lambda* (#:key inputs vendor-dir #:allow-other-keys)
(substitute* (find-files vendor-dir "\\.rs$")
(("libX11\\.so")
(search-input-file inputs "lib/libX11.so"))
(("libX11-xcb\\.so")
(search-input-file inputs "lib/libX11-xcb.so"))
;; Lots of libraries from rust-x11-dl and others.
(("libX[[:alpha:]]*\\.so" all)
(search-input-file inputs (string-append "lib/" all))))))
(add-before 'check 'pre-check
(lambda* (#:key native-inputs inputs #:allow-other-keys)
;; Most tests require an X server.
(let ((xvfb (search-input-file (or native-inputs inputs)
"bin/Xvfb"))
(display ":1"))
(setenv "DISPLAY" display)
(system (string-append xvfb " " display " &"))))))))
(inputs (list libx11
libxcursor
libxext
libxft
libxi
libxinerama
libxmu
libxpresent
libxrandr
libxscrnsaver
libxt
libxtst))
(native-inputs (list xorg-server-for-tests))
(home-page "https://github.com/rust-windowing/softbuffer")
(synopsis "Cross-platform software buffer")
(description "Cross-platform software buffer.")
(license (list license:expat license:asl2.0))))
(define-public rust-tiff-0.9
(package
(name "rust-tiff")