;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Valentin Ignatev <valentignatev@gmail.com> ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2020, 2021, 2023, 2024 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2020 John Soo <jsoo1@asu.edu> ;;; Copyright © 2020 Gabriel Arazas <foo.dogsquared@gmail.com> ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org> ;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org> ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2020 Leo Famulari <leo@famulari.name> ;;; Copyright © 2020-2022 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; Copyright © 2020 Antoine Côté <antoine.cote@posteo.net> ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2023, 2024 Jaeme Sifat <jaeme@runbox.com> ;;; Copyright © 2024 Troy Figiel <troy@troyfigiel.com> ;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com> ;;; Copyright © 2024 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 crates-graphics) #:use-module (guix build-system cargo) #:use-module (guix download) #:use-module (guix gexp) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (gnu packages) #:use-module (gnu packages assembly) #:use-module (gnu packages compression) #:use-module (gnu packages crates-apple) #:use-module (gnu packages crates-io) #:use-module (gnu packages crates-web) #:use-module (gnu packages crates-windows) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gl) #:use-module (gnu packages image) #:use-module (gnu packages llvm) #: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 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. (define-public rust-andrew-0.3 (package (name "rust-andrew") (version "0.3.1") (source (origin (method url-fetch) (uri (crate-uri "andrew" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1kx79z6mh7wwp4pz683bdya54h7w7wpzjcwf834fwbv4vl4znjlc")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-bitflags" ,rust-bitflags-1) ("rust-rusttype" ,rust-rusttype-0.9) ("rust-walkdir" ,rust-walkdir-2) ("rust-xdg" ,rust-xdg-2) ("rust-xml-rs" ,rust-xml-rs-0.8)))) (home-page "https://github.com/trimental/andrew") (synopsis "Provides convenient drawing of objects to buffers") (description "The @code{andrew} crate provides convenient drawing of objects such as shapes, lines and text to buffers.") (license license:expat))) (define-public rust-andrew-0.2 (package (inherit rust-andrew-0.3) (name "rust-andrew") (version "0.2.1") (source (origin (method url-fetch) (uri (crate-uri "andrew" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0pmklwcwy8g1jras46fz8xcny779zfqpg4riksrbdhkjk3w0jzwv")))) (arguments `(#:cargo-inputs (("rust-bitflags" ,rust-bitflags-1) ("rust-line-drawing" ,rust-line-drawing-0.7) ("rust-rusttype" ,rust-rusttype-0.7) ("rust-walkdir" ,rust-walkdir-2) ("rust-xdg" ,rust-xdg-2) ("rust-xml-rs" ,rust-xml-rs-0.8)) #:cargo-development-inputs (("rust-smithay-client-toolkit" ,rust-smithay-client-toolkit-0.4)))) (inputs (list wayland)))) (define-public rust-ansi-colours-1 (package (name "rust-ansi-colours") (version "1.2.2") (source (origin (method url-fetch) (uri (crate-uri "ansi_colours" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "104aj4fi8nxdb9c5ahpwn53afmfcdzmwi3k9rawl3lvm42ymh5ba")) (modules '((guix build utils))) (snippet '(begin (substitute* "Cargo.toml" (((string-append ">= ([[:digit:]]+\\.[[:digit:]]+)," " <= ([[:digit:]]+\\.[[:digit:]]+)") _ version _) (string-append ">=" version))))))) (build-system cargo-build-system) (arguments `(#:cargo-inputs (("rust-ansi-term" ,rust-ansi-term-0.12) ("rust-rgb" ,rust-rgb-0.8) ("rust-termcolor" ,rust-termcolor-1)) #:cargo-development-inputs (("rust-crc64" ,rust-crc64-2) ("rust-criterion" ,rust-criterion-0.5) ("rust-empfindung" ,rust-empfindung-0.2) ("rust-lab" ,rust-lab-0.11) ("rust-rgb" ,rust-rgb-0.8)))) (home-page "https://github.com/mina86/ansi_colours") (synopsis "Palette converter between true-colour and ANSI terminal") (description "@code{ansi_colours} is a library which converts between 24-bit sRGB colours and 8-bit colour palette used by ANSI terminals such as @code{xterm} on @code{rxvt-unicode} in 256-colour mode. The most common use case is when using 24-bit colours in a terminal emulator which only support 8-bit colour palette. This package allows true-colours to be approximated by values supported by the terminal.") (license license:lgpl3+))) (define-public rust-ansi-term-0.12 (package (name "rust-ansi-term") (version "0.12.1") (source (origin (method url-fetch) (uri (crate-uri "ansi_term" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1ljmkbilxgmhavxvxqa7qvm6f3fjggi7q2l3a72q9x0cxjvrnanm")))) (build-system cargo-build-system) (arguments `(#:cargo-inputs (("rust-serde" ,rust-serde-1) ("rust-winapi" ,rust-winapi-0.3)) #:cargo-development-inputs (("rust-doc-comment" ,rust-doc-comment-0.3) ("rust-regex" ,rust-regex-1) ("rust-serde-json" ,rust-serde-json-1)))) (home-page "https://github.com/ogham/rust-ansi-term") (synopsis "Library for ANSI terminal colours and styles") (description "This is a library for controlling colours and formatting, such as red bold text or blue underlined text, on ANSI terminals.") (license license:expat))) (define-public rust-ansi-term-0.11 (package (inherit rust-ansi-term-0.12) (name "rust-ansi-term") (version "0.11.0") (source (origin (method url-fetch) (uri (crate-uri "ansi_term" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "16wpvrghvd0353584i1idnsgm0r3vchg8fyrm0x8ayv1rgvbljgf")))) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-winapi" ,rust-winapi-0.3)))))) (define-public rust-ansi-term-0.9 (package (inherit rust-ansi-term-0.11) (name "rust-ansi-term") (version "0.9.0") (source (origin (method url-fetch) (uri (crate-uri "ansi_term" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1xif1bh938qpfc3d0f9xgidibpm65xix11w9gszwqnia00q7rb13")))) (arguments `()))) (define-public rust-ansi-to-tui-2 (package (name "rust-ansi-to-tui") (version "2.0.2") (source (origin (method url-fetch) (uri (crate-uri "ansi-to-tui" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0l43nyj2difngwjbiy6vd5p8bw96w06swgw5hx6vi9zvqzs8wyqm")))) (build-system cargo-build-system) (arguments `(#:cargo-inputs (("rust-nom" ,rust-nom-7) ("rust-simdutf8" ,rust-simdutf8-0.1) ("rust-thiserror" ,rust-thiserror-1) ("rust-tui" ,rust-tui-0.16)) #:cargo-development-inputs (("rust-anyhow" ,rust-anyhow-1)))) (home-page "https://github.com/uttarayan21/ansi-to-tui") (synopsis "Library to convert ansi color coded text into @code{ratatui::text::Text}") (description "This package provides a library to convert ansi color coded text into @code{ratatui::text::Text} type from the ratatui library.") (license license:expat))) (define-public rust-ansiterm-0.12 (package (name "rust-ansiterm") (version "0.12.2") (source (origin (method url-fetch) (uri (crate-uri "ansiterm" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1k14pywvgd829swxzji0nchk4n6yvr9xz6lkwv96v8ax77sqgdaa")))) (build-system cargo-build-system) (arguments `(#:cargo-inputs (("rust-ansi-colours" ,rust-ansi-colours-1) ("rust-serde" ,rust-serde-1) ("rust-winapi" ,rust-winapi-0.3)) #:cargo-development-inputs (("rust-doc-comment" ,rust-doc-comment-0.3) ("rust-regex" ,rust-regex-1) ("rust-serde-json" ,rust-serde-json-1)))) (home-page "https://github.com/rustadopt/ansiterm-rs") (synopsis "Library for ANSI terminal colours and styles (bold, underline)") (description "This package provides a library for ANSI terminal colours and styles (bold, underline).") (license license:e