Merge branch 'rust-team'

This commit is contained in:
Efraim Flashner 2023-05-09 09:56:33 +03:00
commit 649ce7b433
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351
19 changed files with 7702 additions and 3158 deletions

View file

@ -263,6 +263,7 @@ asdf-build-system."
(team 'rust (team 'rust
#:name "Rust" #:name "Rust"
#:scope (list (make-regexp "^gnu/packages/(crates|rust)(-.+|)\\.scm$") #:scope (list (make-regexp "^gnu/packages/(crates|rust)(-.+|)\\.scm$")
"gnu/packages/sequoia.scm"
"guix/build/cargo-build-system.scm" "guix/build/cargo-build-system.scm"
"guix/build/cargo-utils.scm" "guix/build/cargo-utils.scm"
"guix/build-system/cargo.scm" "guix/build-system/cargo.scm"

View file

@ -1862,7 +1862,6 @@ dist_patch_DATA = \
%D%/packages/patches/ruby-mustache-1.1.1-fix-race-condition-tests.patch \ %D%/packages/patches/ruby-mustache-1.1.1-fix-race-condition-tests.patch \
%D%/packages/patches/rustc-1.54.0-src.patch \ %D%/packages/patches/rustc-1.54.0-src.patch \
%D%/packages/patches/rust-1.64-fix-riscv64-bootstrap.patch \ %D%/packages/patches/rust-1.64-fix-riscv64-bootstrap.patch \
%D%/packages/patches/rust-adblock-ignore-live-tests.patch \
%D%/packages/patches/i3status-rust-enable-unstable-features.patch \ %D%/packages/patches/i3status-rust-enable-unstable-features.patch \
%D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch \ %D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch \
%D%/packages/patches/rust-ndarray-0.13-remove-blas-src.patch \ %D%/packages/patches/rust-ndarray-0.13-remove-blas-src.patch \
@ -1870,6 +1869,7 @@ dist_patch_DATA = \
%D%/packages/patches/rust-nettle-disable-vendor.patch \ %D%/packages/patches/rust-nettle-disable-vendor.patch \
%D%/packages/patches/rust-nettle-sys-disable-vendor.patch \ %D%/packages/patches/rust-nettle-sys-disable-vendor.patch \
%D%/packages/patches/rust-openssl-sys-no-vendor.patch \ %D%/packages/patches/rust-openssl-sys-no-vendor.patch \
%D%/packages/patches/rust-webbrowser-remove-unsupported-os.patch \
%D%/packages/patches/rust-wl-clipboard-rs-newer-wl.patch \ %D%/packages/patches/rust-wl-clipboard-rs-newer-wl.patch \
%D%/packages/patches/rw-igraph-0.10.patch \ %D%/packages/patches/rw-igraph-0.10.patch \
%D%/packages/patches/sbc-fix-build-non-x86.patch \ %D%/packages/patches/sbc-fix-build-non-x86.patch \

File diff suppressed because it is too large Load diff

View file

@ -1901,37 +1901,6 @@ library.")
"Rust bindings for the PangoCairo library.") "Rust bindings for the PangoCairo library.")
(license license:expat))) (license license:expat)))
(define-public rust-pangocairo-0.9
(package
(inherit rust-pangocairo-0.15)
(name "rust-pangocairo")
(version "0.9.0")
(source
(origin
(method url-fetch)
(uri (crate-uri "pangocairo" version))
(file-name
(string-append name "-" version ".tar.gz"))
(sha256
(base32
"0bap3h78hdqdyln58349qjjbcv45m8a0a16c4n9fprdj1my0gldx"))))
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs
(("rust-bitflags" ,rust-bitflags-1)
("rust-cairo-rs" ,rust-cairo-rs-0.8)
("rust-cairo-sys-rs" ,rust-cairo-sys-rs-0.9)
("rust-glib" ,rust-glib-0.9)
("rust-glib-sys" ,rust-glib-sys-0.9)
("rust-gobject-sys" ,rust-gobject-sys-0.9)
("rust-libc" ,rust-libc-0.2)
("rust-pango" ,rust-pango-0.8)
("rust-pango-sys" ,rust-pango-sys-0.9)
("rust-pangocairo-sys" ,rust-pangocairo-sys-0.10)
("rust-gtk-rs-lgpl-docs" ,rust-gtk-rs-lgpl-docs-0.1))
#:cargo-development-inputs
(("rust-gir-format-check" ,rust-gir-format-check-0.1))))))
(define-public rust-pangocairo-sys-0.15 (define-public rust-pangocairo-sys-0.15
(package (package
(name "rust-pangocairo-sys") (name "rust-pangocairo-sys")
@ -1966,32 +1935,6 @@ library.")
(description "This package provides FFI bindings to libgtk-3.") (description "This package provides FFI bindings to libgtk-3.")
(license license:expat))) (license license:expat)))
(define-public rust-pangocairo-sys-0.10
(package
(inherit rust-pangocairo-sys-0.15)
(name "rust-pangocairo-sys")
(version "0.10.1")
(source
(origin
(method url-fetch)
(uri (crate-uri "pangocairo-sys" version))
(file-name
(string-append name "-" version ".tar.gz"))
(sha256
(base32
"1zlyf5vajarnxg5034b8qa5w5zajv96lfvlgiki26svpmcqip4m3"))))
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs
(("rust-cairo-sys-rs" ,rust-cairo-sys-rs-0.9)
("rust-glib-sys" ,rust-glib-sys-0.9)
("rust-libc" ,rust-libc-0.2)
("rust-pango-sys" ,rust-pango-sys-0.9)
("rust-pkg-config" ,rust-pkg-config-0.3))
#:cargo-development-inputs
(("rust-shell-words" ,rust-shell-words-0.1)
("rust-tempfile" ,rust-tempfile-3))))))
(define-public rust-soup-sys-0.10 (define-public rust-soup-sys-0.10
(package (package
(name "rust-soup-sys") (name "rust-soup-sys")

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2019, 2020, 2023 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2014, 2015, 2019, 2020, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015, 2016, 2019, 2021 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2015, 2016, 2019, 2021, 2023 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2020, 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2020, 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
@ -45,17 +45,19 @@
#:use-module ((guix build utils) #:select (alist-replace)) #:use-module ((guix build utils) #:select (alist-replace))
#:use-module (srfi srfi-1)) #:use-module (srfi srfi-1))
(define-public gdb-11 (define-public gdb/pinned
;; This is the fixed version that packages depend on. Update it rarely
;; enough to avoid massive rebuilds.
(package (package
(name "gdb") (name "gdb")
(version "11.1") (version "12.1")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://gnu/gdb/gdb-" (uri (string-append "mirror://gnu/gdb/gdb-"
version ".tar.xz")) version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"151z6d0265hv9cgx9zqqa4bd6vbp20hrljhd6bxl7lr0gd0crkyc")))) "1vczsqcbh5y0gx7qrclpna0qzx26sk7lra6y8qzxam1biyzr65qf"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(outputs '("out" "debug")) (outputs '("out" "debug"))
(arguments (arguments
@ -140,15 +142,12 @@ doing while it runs or what it was doing just before a crash. It allows you
to specify the runtime conditions, to define breakpoints, and to change how to specify the runtime conditions, to define breakpoints, and to change how
the program is running to try to fix bugs. It can be used to debug programs the program is running to try to fix bugs. It can be used to debug programs
written in C, C++, Ada, Objective-C, Pascal and more.") written in C, C++, Ada, Objective-C, Pascal and more.")
(license gpl3+) (properties `((hidden? . #t)))
(license gpl3+)))
;; GDB 11 now fails to build on GNU/Hurd (undefined references to process
;; RPC stubs).
(supported-systems (fold delete %supported-systems %hurd-systems))))
(define-public gdb-12 (define-public gdb-12
(package (package
(inherit gdb-11) (inherit gdb/pinned)
(version "12.1") (version "12.1")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
@ -157,14 +156,7 @@ written in C, C++, Ada, Objective-C, Pascal and more.")
(sha256 (sha256
(base32 (base32
"1vczsqcbh5y0gx7qrclpna0qzx26sk7lra6y8qzxam1biyzr65qf")))) "1vczsqcbh5y0gx7qrclpna0qzx26sk7lra6y8qzxam1biyzr65qf"))))
(properties '())))
;; GDB 12 builds fine on GNU/Hurd.
(supported-systems %supported-systems)))
(define-public gdb/pinned
;; This is the fixed version that packages depend on. Update it rarely
;; enough to avoid massive rebuilds.
gdb-11)
(define-public gdb (define-public gdb
;; The "default" version. ;; The "default" version.

View file

@ -3477,7 +3477,7 @@ for dealing with different structured file formats.")
(define-public librsvg (define-public librsvg
(package (package
(name "librsvg") (name "librsvg")
(version "2.54.4") (version "2.54.5")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://gnome/sources/librsvg/" (uri (string-append "mirror://gnome/sources/librsvg/"
@ -3485,7 +3485,7 @@ for dealing with different structured file formats.")
"librsvg-" version ".tar.xz")) "librsvg-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"0cs8qbn2khibb5w1r0f6cibfmkfb7zg713526vhc0hva7wj2l5ga")) "0vmfgihhf35bxn7giqiskgsflr0zxp6xyy9aynhiyk9j8l7ij0sg"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
'(begin (delete-file-recursively "vendor"))))) '(begin (delete-file-recursively "vendor")))))
@ -3566,6 +3566,17 @@ for dealing with different structured file formats.")
;; successfully with the '--locked' flag. ;; successfully with the '--locked' flag.
(substitute* '("Makefile.am" "Makefile.in") (substitute* '("Makefile.am" "Makefile.in")
(("--locked") "")))) (("--locked") ""))))
(add-after 'unpack 'loosen-test-boundaries
(lambda _
;; Increase reftest tolerance a bit to account for different
;; harfbuzz, pango, etc.
(setenv "RSVG_TEST_TOLERANCE" "20")
;; These two tests even fail after loosening the tolerance.
(for-each delete-file
'("tests/fixtures/reftests/bugs/730-font-scaling.svg"
"tests/fixtures/reftests/bugs/730-font-scaling-ref.png"
"tests/fixtures/reftests/svg1.1/text-text-03-b.svg"
"tests/fixtures/reftests/svg1.1/text-text-03-b-ref.png"))))
(add-before 'configure 'pre-configure (add-before 'configure 'pre-configure
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(substitute* "gdk-pixbuf-loader/Makefile.in" (substitute* "gdk-pixbuf-loader/Makefile.in"
@ -3685,7 +3696,7 @@ diagrams.")
;; Since librsvg 2.50 depends on Rust, and Rust is only correctly supported ;; Since librsvg 2.50 depends on Rust, and Rust is only correctly supported
;; on x86_64, aarch64 and riscv64 so far, use the ancient C version on other ;; on x86_64, aarch64 and riscv64 so far, use the ancient C version on other
;; platforms (FIXME). ;; platforms (FIXME).
(if (string-prefix? "x86_64-" system) (if (supported-package? librsvg)
librsvg librsvg
librsvg-2.40)) librsvg-2.40))

View file

@ -705,8 +705,10 @@ highlighting and other features typical of a source code editor.")
(modify-phases %standard-phases (modify-phases %standard-phases
(add-before 'configure 'disable-failing-tests (add-before 'configure 'disable-failing-tests
(lambda _ (lambda _
(substitute* "tests/meson.build" ;; The test for the fix for issue 205 causes failures.
(("\\[ 'pixbuf-fail', \\['conform', 'slow'\\], \\],") ;; https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/215
(substitute* "tests/pixbuf-jpeg.c"
((".*/pixbuf/jpeg/issue205.*")
"")))) ""))))
;; The slow tests take longer than the specified timeout. ;; The slow tests take longer than the specified timeout.
,@(if (target-arm? (%current-system)) ,@(if (target-arm? (%current-system))

View file

@ -1,69 +0,0 @@
From b83b5b453d3f7883ef4c12f84a7045486957c709 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 9 Nov 2021 17:02:54 +0100
Subject: [PATCH] Ignore live tests.
diff --git a/tests/live.rs b/tests/live.rs
index b1a19fc..6bd4685 100644
--- a/tests/live.rs
+++ b/tests/live.rs
@@ -140,6 +140,7 @@ fn get_blocker_engine_deserialized_ios() -> Engine {
}
#[test]
+#[ignore]
fn check_live_specific_urls() {
let mut engine = get_blocker_engine();
{
@@ -176,6 +177,7 @@ fn check_live_specific_urls() {
}
#[test]
+#[ignore]
fn check_live_deserialized_specific_urls() {
let mut engine = get_blocker_engine_deserialized();
{
@@ -201,6 +203,7 @@ fn check_live_deserialized_specific_urls() {
}
#[test]
+#[ignore]
fn check_live_from_filterlists() {
let engine = get_blocker_engine();
let requests = load_requests();
@@ -214,6 +217,7 @@ fn check_live_from_filterlists() {
}
#[test]
+#[ignore]
fn check_live_deserialized_file() {
let engine = get_blocker_engine_deserialized();
let requests = load_requests();
@@ -243,6 +247,7 @@ fn check_live_deserialized_ios() {
#[cfg(feature = "resource_assembler")]
#[test]
+#[ignore]
fn check_live_redirects() {
use adblock::resources::resource_assembler::assemble_web_accessible_resources;
@@ -278,6 +283,7 @@ fn check_live_redirects() {
}
#[test]
+#[ignore]
/// Ensure that two different engines loaded from the same textual filter set serialize to
/// identical buffers.
fn stable_serialization() {
@@ -291,6 +297,7 @@ fn stable_serialization() {
}
#[test]
+#[ignore]
/// Ensure that one engine's serialization result can be exactly reproduced by another engine after
/// deserializing from it.
fn stable_serialization_through_load() {
--
2.33.1

View file

@ -0,0 +1,24 @@
--- Cargo.toml 2023-05-07 13:39:13.029066693 +0100
+++ Cargo.toml 2023-05-07 13:39:22.545138206 +0100
@@ -67,21 +67,3 @@
[target."cfg(target_arch = \"wasm32\")".dependencies.web-sys]
version = "0.3"
features = ["Window"]
-
-[target."cfg(target_os = \"android\")".dependencies.jni]
-version = "0.21"
-
-[target."cfg(target_os = \"android\")".dependencies.ndk-context]
-version = "0.1"
-
-[target."cfg(target_os = \"android\")".dev-dependencies.ndk-glue]
-version = ">= 0.3, <= 0.7"
-
-[target."cfg(target_os = \"ios\")".dependencies.objc]
-version = "0.2.7"
-
-[target."cfg(target_os = \"ios\")".dependencies.raw-window-handle]
-version = "0.5.0"
-
-[target."cfg(target_os = \"macos\")".dependencies.core-foundation]
-version = "0.9"

View file

@ -7,7 +7,7 @@
;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch> ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com> ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu> ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015-2023 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016, 2020 Christine Lemmer-Webber <cwebber@dustycloud.org> ;;; Copyright © 2015, 2016, 2020 Christine Lemmer-Webber <cwebber@dustycloud.org>
;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org> ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
@ -166,6 +166,7 @@
#:use-module (gnu packages cmake) #:use-module (gnu packages cmake)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
#:use-module (gnu packages cpp) #:use-module (gnu packages cpp)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages crypto) #:use-module (gnu packages crypto)
#:use-module (gnu packages databases) #:use-module (gnu packages databases)
#:use-module (gnu packages dbm) #:use-module (gnu packages dbm)
@ -267,6 +268,7 @@
#:use-module (guix gexp) #:use-module (guix gexp)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix build-system cargo)
#:use-module (guix build-system cmake) #:use-module (guix build-system cmake)
#:use-module (guix build-system pyproject) #:use-module (guix build-system pyproject)
#:use-module (guix build-system python) #:use-module (guix build-system python)
@ -2688,6 +2690,99 @@ a library.")
(description "DiskCache is a disk and file backed persistent cache.") (description "DiskCache is a disk and file backed persistent cache.")
(license license:asl2.0))) (license license:asl2.0)))
(define-public python-orjson
(package
(name "python-orjson")
(version "3.8.8")
(source (origin
(method url-fetch)
(uri (pypi-uri "orjson" version))
(sha256
(base32
"1nn617pzn8smjkf7j593ybq16qfnj53bla52qjwzzrms4fjxg5n0"))))
(build-system cargo-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'install 'build-python-module
(lambda _
;; We don't use maturin.
(delete-file "pyproject.toml")
(call-with-output-file "pyproject.toml"
(lambda (port)
(format port "\
[build-system]
build-backend = 'setuptools.build_meta'
requires = ['setuptools']
")))
(call-with-output-file "setup.cfg"
(lambda (port)
(format port "\
[metadata]
name = orjson
version = '~a'
[options]
packages = find:
[options.packages.find]
exclude =
src
integration
test
Cargo.toml
" #$version)))
;; ZIP does not support timestamps before 1980.
(setenv "SOURCE_DATE_EPOCH" "315532800")
(invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
(add-after 'build-python-module 'install-python-module
(lambda* (#:key outputs #:allow-other-keys)
(let ((whl (car (find-files "dist" "\\.whl$"))))
(invoke "pip" "--no-cache-dir" "--no-input"
"install" "--no-deps" "--prefix" #$output whl))))
(add-after 'install-python-module 'install-python-library
(lambda _
(let ((site (string-append #$output "/lib/python"
#$(version-major+minor
(package-version python))
"/site-packages")))
(mkdir-p site)
(copy-file "target/release/liborjson.so"
(string-append site "/orjson.so"))))))
#:cargo-inputs
`(("rust-ahash" ,rust-ahash-0.8)
("rust-arrayvec" ,rust-arrayvec-0.7)
("rust-associative-cache" ,rust-associative-cache-1)
("rust-beef" ,rust-beef-0.5)
("rust-bytecount" ,rust-bytecount-0.6)
("rust-chrono" ,rust-chrono-0.4)
("rust-compact-str" ,rust-compact-str-0.7)
("rust-encoding-rs" ,rust-encoding-rs-0.8)
("rust-itoa" ,rust-itoa-1)
("rust-itoap" ,rust-itoap-1)
("rust-once-cell" ,rust-once-cell-1)
("rust-pyo3-ffi" ,rust-pyo3-ffi-0.18)
("rust-ryu" ,rust-ryu-1)
("rust-serde" ,rust-serde-1)
("rust-serde-json" ,rust-serde-json-1)
("rust-simdutf8" ,rust-simdutf8-0.1)
("rust-smallvec" ,rust-smallvec-1))
#:install-source? #false))
(native-inputs
(list python-wrapper
python-pypa-build
python-wheel))
(home-page "https://github.com/ijl/orjson")
(synopsis "Python JSON library supporting dataclasses, datetimes, and numpy")
(description "Orjson is a fast, correct JSON library for Python. It
benchmarks as the fastest Python library for JSON and is more correct than the
standard @code{json} library or other third-party libraries. It serializes
dataclass, datetime, numpy, and UUID instances natively.")
;; Either of these licenses
(license (list license:asl2.0 license:expat))))
(define-public python-argparse-addons (define-public python-argparse-addons
(package (package
(name "python-argparse-addons") (name "python-argparse-addons")

View file

@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019, 2020 John Soo <jsoo1@asu.edu> ;;; Copyright © 2019, 2020 John Soo <jsoo1@asu.edu>
;;; Copyright © 2019-2022 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2019-2023 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020 Leo Famulari <leo@famulari.name> ;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
@ -71,6 +71,7 @@
#:use-module (gnu packages networking) #:use-module (gnu packages networking)
#:use-module (gnu packages ssh) #:use-module (gnu packages ssh)
#:use-module (gnu packages pcre) #:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config) #:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio) #:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python-xyz) #:use-module (gnu packages python-xyz)
@ -106,6 +107,8 @@
("rust-tokio" ,rust-tokio-1) ("rust-tokio" ,rust-tokio-1)
("rust-tokio-rustls" ,rust-tokio-rustls-0.22) ("rust-tokio-rustls" ,rust-tokio-rustls-0.22)
("rust-url" ,rust-url-2)))) ("rust-url" ,rust-url-2))))
(native-inputs
(list perl))
(home-page "https://github.com/mbrubeck/agate") (home-page "https://github.com/mbrubeck/agate")
(synopsis "Very simple server for the Gemini hypertext protocol") (synopsis "Very simple server for the Gemini hypertext protocol")
(description (description
@ -175,7 +178,7 @@ low-end hardware and serving many concurrent requests.")
(("rust-serde-bytes" ,rust-serde-bytes-0.11) (("rust-serde-bytes" ,rust-serde-bytes-0.11)
("rust-serde-derive" ,rust-serde-derive-1)))) ("rust-serde-derive" ,rust-serde-derive-1))))
(native-inputs (native-inputs
(list pkg-config)) (list perl pkg-config))
(inputs (inputs
(list at-spi2-core (list at-spi2-core
gtk gtk
@ -458,7 +461,7 @@ also knows about symlinks, extended attributes, and Git.")
(define-public fd (define-public fd
(package (package
(name "fd") (name "fd")
(version "8.1.1") (version "8.7.0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
@ -467,58 +470,71 @@ also knows about symlinks, extended attributes, and Git.")
(string-append name "-" version ".tar.gz")) (string-append name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"124a5r8hpk2phs1288jybh34d48yxy44wr7gv5ggchs272gs2jam")))) "186217yyb0znfn4jcc9l3i51fhfyb23lhbm3gg084sdrbj6bdnbg"))))
(build-system cargo-build-system) (build-system cargo-build-system)
(arguments (arguments
`(#:cargo-inputs `(#:cargo-test-flags
(("rust-ansi-term" ,rust-ansi-term-0.12) '("--release"
("rust-anyhow" ,rust-anyhow-1) "--"
;; No user 'root' in the build environment.
"--skip=test_owner_root")
#:install-source? #f
#:cargo-inputs
(("rust-anyhow" ,rust-anyhow-1)
("rust-argmax" ,rust-argmax-0.3)
("rust-atty" ,rust-atty-0.2) ("rust-atty" ,rust-atty-0.2)
("rust-clap" ,rust-clap-2) ("rust-chrono" ,rust-chrono-0.4)
("rust-clap" ,rust-clap-4)
("rust-clap-complete" ,rust-clap-complete-4)
("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5)
("rust-ctrlc" ,rust-ctrlc-3) ("rust-ctrlc" ,rust-ctrlc-3)
("rust-dirs" ,rust-dirs-2) ("rust-dirs-next" ,rust-dirs-next-2)
("rust-faccess" ,rust-faccess-0.2)
("rust-globset" ,rust-globset-0.4) ("rust-globset" ,rust-globset-0.4)
("rust-humantime" ,rust-humantime-2) ("rust-humantime" ,rust-humantime-2)
("rust-ignore" ,rust-ignore-0.4) ("rust-ignore" ,rust-ignore-0.4)
("rust-jemallocator" ,rust-jemallocator-0.3) ("rust-jemallocator" ,rust-jemallocator-0.5)
("rust-lazy-static" ,rust-lazy-static-1)
("rust-libc" ,rust-libc-0.2) ("rust-libc" ,rust-libc-0.2)
("rust-lscolors" ,rust-lscolors-0.7) ("rust-lscolors" ,rust-lscolors-0.13)
("rust-nix" ,rust-nix-0.26)
("rust-normpath" ,rust-normpath-0.3)
("rust-nu-ansi-term" ,rust-nu-ansi-term-0.46)
("rust-num-cpus" ,rust-num-cpus-1) ("rust-num-cpus" ,rust-num-cpus-1)
("rust-once-cell" ,rust-once-cell-1)
("rust-regex" ,rust-regex-1) ("rust-regex" ,rust-regex-1)
("rust-regex-syntax" ,rust-regex-syntax-0.6) ("rust-regex-syntax" ,rust-regex-syntax-0.6)
("rust-users" ,rust-users-0.10) ("rust-users" ,rust-users-0.11)
("rust-version-check" ,rust-version-check-0.9)) ("rust-version-check" ,rust-version-check-0.9))
#:cargo-development-inputs #:cargo-development-inputs
(("rust-diff" ,rust-diff-0.1) (("rust-diff" ,rust-diff-0.1)
("rust-filetime" ,rust-filetime-0.2) ("rust-filetime" ,rust-filetime-0.2)
("rust-tempdir" ,rust-tempdir-0.3)) ("rust-tempfile" ,rust-tempfile-3)
("rust-test-case" ,rust-test-case-2))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'override-jemalloc (add-after 'unpack 'override-jemalloc
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((jemalloc (assoc-ref inputs "jemalloc"))) (let ((jemalloc (assoc-ref inputs "jemalloc")))
;; This flag is needed when not using the bundled jemalloc.
;; https://github.com/tikv/jemallocator/issues/19
(setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1")
(setenv "JEMALLOC_OVERRIDE" (setenv "JEMALLOC_OVERRIDE"
(string-append jemalloc "/lib/libjemalloc.so"))) (string-append jemalloc "/lib/libjemalloc.so")))))
#t))
(add-after 'install 'install-extra (add-after 'install 'install-extra
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let ((out (assoc-ref outputs "out")))
(install-completion (invoke "make" "completions")
(lambda (completion out-dir)
(for-each
(lambda (f)
(install-file f (string-append out out-dir)))
(find-files "target/release/build/" completion)))))
;; Manpages ;; Manpages
(install-file "doc/fd.1" (string-append out "/share/man/man1")) (install-file "doc/fd.1" (string-append out "/share/man/man1"))
;; Completions ;; Completions
(install-completion "^fd.bash$" "/etc/bash_completion.d") (install-file "autocomplete/fd.bash"
(install-completion "^fd.fish$" "/share/fish/vendor_completions.d") (string-append out "/etc/bash_completion.d"))
(install-completion "^_fd$" "/share/zsh/site-functions") (install-file "autocomplete/fd.fish"
(string-append out "/share/fish/vendor_completions.d"))
(install-file "autocomplete/_fd"
(string-append out "/share/zsh/site-functions"))
(rename-file (string-append out "/etc/bash_completion.d/fd.bash") (rename-file (string-append out "/etc/bash_completion.d/fd.bash")
(string-append out "/etc/bash_completion.d/fd")) (string-append out "/etc/bash_completion.d/fd"))))))))
#t))))))
(inputs (list jemalloc)) (inputs (list jemalloc))
(home-page "https://github.com/sharkdp/fd") (home-page "https://github.com/sharkdp/fd")
(synopsis "Simple, fast and user-friendly alternative to find") (synopsis "Simple, fast and user-friendly alternative to find")
@ -908,6 +924,8 @@ browsers.")
(build-system cargo-build-system) (build-system cargo-build-system)
(arguments (arguments
`(#:install-source? #f `(#:install-source? #f
;; error[E0463]: can't find crate for `cargo_test_macro`
#:tests? #f
#:cargo-inputs #:cargo-inputs
(("rust-anyhow" ,rust-anyhow-1) (("rust-anyhow" ,rust-anyhow-1)
("rust-cargo-metadata" ,rust-cargo-metadata-0.15) ("rust-cargo-metadata" ,rust-cargo-metadata-0.15)
@ -938,11 +956,17 @@ browsers.")
("rust-predicates" ,rust-predicates-2) ("rust-predicates" ,rust-predicates-2)
("rust-snapbox" ,rust-snapbox-0.2) ("rust-snapbox" ,rust-snapbox-0.2)
("rust-trycmd" ,rust-trycmd-0.13) ("rust-trycmd" ,rust-trycmd-0.13)
("rust-url" ,rust-url-2)))) ("rust-url" ,rust-url-2))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'dont-default-to-vendored-libgit2
(lambda _
(substitute* "Cargo.toml"
((".*\"vendored-libgit2\".*") "")))))))
(native-inputs (native-inputs
(list pkg-config)) (list perl pkg-config))
(inputs (inputs
(list libgit2 (list libgit2-1.4
libssh2 libssh2
openssl openssl
zlib)) zlib))
@ -1239,7 +1263,7 @@ rebase.")
(define-public sniffglue (define-public sniffglue
(package (package
(name "sniffglue") (name "sniffglue")
(version "0.12.1") (version "0.15.0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
@ -1248,7 +1272,7 @@ rebase.")
(string-append name "-" version ".tar.gz")) (string-append name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1q1kwkw1hq38qgvc6j4b5l9m85a6lpn1jls4bm27c5kha9cg8l24")))) "038wcjiiay825wc8inmn62flklc1adxskg5fmjhmxqnhwmj1k5gn"))))
(build-system cargo-build-system) (build-system cargo-build-system)
(arguments (arguments
`(#:cargo-inputs `(#:cargo-inputs
@ -1256,31 +1280,34 @@ rebase.")
("rust-anyhow" ,rust-anyhow-1) ("rust-anyhow" ,rust-anyhow-1)
("rust-atty" ,rust-atty-0.2) ("rust-atty" ,rust-atty-0.2)
("rust-base64" ,rust-base64-0.13) ("rust-base64" ,rust-base64-0.13)
("rust-bstr" ,rust-bstr-0.2)
("rust-dhcp4r" ,rust-dhcp4r-0.2) ("rust-dhcp4r" ,rust-dhcp4r-0.2)
("rust-dirs-next" ,rust-dirs-next-2) ("rust-dirs-next" ,rust-dirs-next-2)
("rust-dns-parser" ,rust-dns-parser-0.8) ("rust-dns-parser" ,rust-dns-parser-0.8)
("rust-env-logger" ,rust-env-logger-0.8) ("rust-env-logger" ,rust-env-logger-0.9)
("rust-libc" ,rust-libc-0.2) ("rust-libc" ,rust-libc-0.2)
("rust-log" ,rust-log-0.4) ("rust-log" ,rust-log-0.4)
("rust-nix" ,rust-nix-0.20) ("rust-nix" ,rust-nix-0.23)
("rust-nom" ,rust-nom-6) ("rust-nom" ,rust-nom-7)
("rust-num-cpus" ,rust-num-cpus-1) ("rust-num-cpus" ,rust-num-cpus-1)
("rust-pcap-sys" ,rust-pcap-sys-0.1) ("rust-pcap-sys" ,rust-pcap-sys-0.1)
("rust-pktparse" ,rust-pktparse-0.5) ("rust-pktparse" ,rust-pktparse-0.7)
("rust-reduce" ,rust-reduce-0.1) ("rust-reduce" ,rust-reduce-0.1)
("rust-serde" ,rust-serde-1) ("rust-serde" ,rust-serde-1)
("rust-serde-derive" ,rust-serde-derive-1) ("rust-serde-derive" ,rust-serde-derive-1)
("rust-serde-json" ,rust-serde-json-1) ("rust-serde-json" ,rust-serde-json-1)
("rust-sha2" ,rust-sha2-0.9) ("rust-sha2" ,rust-sha2-0.10)
("rust-structopt" ,rust-structopt-0.3) ("rust-structopt" ,rust-structopt-0.3)
("rust-syscallz" ,rust-syscallz-0.15) ("rust-syscallz" ,rust-syscallz-0.16)
("rust-tls-parser" ,rust-tls-parser-0.10) ("rust-tls-parser" ,rust-tls-parser-0.11)
("rust-toml" ,rust-toml-0.5) ("rust-toml" ,rust-toml-0.5)
("rust-users" ,rust-users-0.11)) ("rust-users" ,rust-users-0.11))
#:cargo-development-inputs #:cargo-development-inputs
(("rust-boxxy" ,rust-boxxy-0.11)))) (("rust-boxxy" ,rust-boxxy-0.12))))
(inputs (inputs
(list libpcap libseccomp)) (list libpcap libseccomp))
(native-inputs
(list perl))
(home-page "https://github.com/kpcyrd/sniffglue") (home-page "https://github.com/kpcyrd/sniffglue")
(synopsis "Secure multithreaded packet sniffer") (synopsis "Secure multithreaded packet sniffer")
(description (description
@ -1653,6 +1680,8 @@ runs a command whenever it detects modifications.")
("rust-url" ,rust-url-2) ("rust-url" ,rust-url-2)
("rust-uuid" ,rust-uuid-0.8) ("rust-uuid" ,rust-uuid-0.8)
("rust-zeroize" ,rust-zeroize-1)))) ("rust-zeroize" ,rust-zeroize-1))))
(native-inputs
(list perl))
(home-page "https://git.tozt.net/rbw") (home-page "https://git.tozt.net/rbw")
(synopsis "Unofficial Bitwarden CLI") (synopsis "Unofficial Bitwarden CLI")
(description "This package is an unofficial command line client for (description "This package is an unofficial command line client for
@ -1840,7 +1869,7 @@ support for Rust.")
(define-public rust-cargo-c (define-public rust-cargo-c
(package (package
(name "rust-cargo-c") (name "rust-cargo-c")
(version "0.9.8+cargo-0.60") (version "0.9.16+cargo-0.68")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
@ -1849,27 +1878,29 @@ support for Rust.")
(string-append name "-" version ".tar.gz")) (string-append name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1zdzs3drjr9p6chg32inyi05rfv1c12nkk4bi7qpha12m6rsn26d")))) "0k2sw67dx06b45qpvckbhz00kn2ingd89y53pwlzky72hnzv075v"))))
(build-system cargo-build-system) (build-system cargo-build-system)
(arguments (arguments
`(#:cargo-inputs `(#:cargo-inputs
(("rust-cbindgen" ,rust-cbindgen-0.20) (("rust-anyhow" ,rust-anyhow-1)
("rust-cargo" ,rust-cargo-0.60) ("rust-cargo" ,rust-cargo-0.68)
("rust-anyhow" ,rust-anyhow-1) ("rust-cargo-util" ,rust-cargo-util-0.2)
("rust-pretty-env-logger" ,rust-pretty-env-logger-0.4) ("rust-cbindgen" ,rust-cbindgen-0.24)
("rust-structopt" ,rust-structopt-0.3) ("rust-cc" ,rust-cc-1)
("rust-clap" ,rust-clap-4)
("rust-glob" ,rust-glob-0.3)
("rust-itertools" ,rust-itertools-0.10)
("rust-log" ,rust-log-0.4) ("rust-log" ,rust-log-0.4)
("rust-toml" ,rust-toml-0.5) ("rust-regex" ,rust-regex-1)
("rust-cargo-metadata" ,rust-cargo-metadata-0.9) ("rust-semver" ,rust-semver-1)
("rust-semver" ,rust-semver-0.10)
("rust-serde" ,rust-serde-1) ("rust-serde" ,rust-serde-1)
("rust-serde-derive" ,rust-serde-derive-1) ("rust-serde-derive" ,rust-serde-derive-1)
("rust-serde-json" ,rust-serde-json-1) ("rust-serde-json" ,rust-serde-json-1)
("rust-regex" ,rust-regex-1)))) ("rust-toml" ,rust-toml-0.6))))
(native-inputs (native-inputs
(list pkg-config)) (list pkg-config))
(inputs (inputs
(list curl libgit2-1.3 libssh2 openssl-1.1 zlib)) (list curl libgit2 libssh2 openssl zlib))
(home-page "https://github.com/lu-zero/cargo-c") (home-page "https://github.com/lu-zero/cargo-c")
(synopsis "Build and install C-compatible libraries") (synopsis "Build and install C-compatible libraries")
(description (description
@ -2123,16 +2154,18 @@ daemon which executes them.")
(define-public tealdeer (define-public tealdeer
(package (package
(name "tealdeer") (name "tealdeer")
(version "1.4.1") (version "1.6.1")
(source (source
(origin (origin
(method url-fetch) ;; Completions aren't in the release tarball.
(uri (crate-uri "tealdeer" version)) (method git-fetch)
(file-name (uri (git-reference
(string-append name "-" version ".tar.gz")) (url "https://github.com/dbrgn/tealdeer")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"0cwf46k2rszcpydrqajnm4dvhggr3ms7sjma0jx02ch4fjicxch7")))) "0ipd23b30pqvyh20mxfd13ps0rnvg7zfpysv7wambfbb92xdh36d"))))
(build-system cargo-build-system) (build-system cargo-build-system)
(arguments (arguments
`(#:phases `(#:phases
@ -2141,13 +2174,17 @@ daemon which executes them.")
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(bash (string-append out "/etc/bash_completion.d/")) (bash (string-append out "/etc/bash_completion.d/"))
(fish (string-append out "/share/fish/vendor_completions.d/"))) (fish (string-append out "/share/fish/vendor_completions.d/"))
(zsh (string-append out "/share/zsh/site-functions/")))
(mkdir-p bash) (mkdir-p bash)
(mkdir-p fish) (mkdir-p fish)
(copy-file "bash_tealdeer" (mkdir-p zsh)
(copy-file "completion/bash_tealdeer"
(string-append bash "tealdeer")) (string-append bash "tealdeer"))
(copy-file "fish_tealdeer" (copy-file "completion/fish_tealdeer"
(string-append fish "tealdeer.fish")))))) (string-append fish "tealdeer.fish"))
(copy-file "completion/zsh_tealdeer"
(string-append zsh "_tealdeer"))))))
#:install-source? #f #:install-source? #f
#:cargo-test-flags #:cargo-test-flags
'("--release" "--" '("--release" "--"
@ -2159,34 +2196,31 @@ daemon which executes them.")
"--skip=test_markdown_rendering" "--skip=test_markdown_rendering"
"--skip=test_spaces_find_command" "--skip=test_spaces_find_command"
"--skip=test_autoupdate_cache" "--skip=test_autoupdate_cache"
"--skip=test_update_cache") "--skip=test_update_cache"
"--skip=test_create_cache_directory_path")
#:cargo-inputs #:cargo-inputs
(("rust-ansi-term" ,rust-ansi-term-0.12) (("rust-anyhow" ,rust-anyhow-1)
("rust-app-dirs2" ,rust-app-dirs2-2) ("rust-app-dirs2" ,rust-app-dirs2-2)
("rust-atty" ,rust-atty-0.2) ("rust-atty" ,rust-atty-0.2)
("rust-docopt" ,rust-docopt-1) ("rust-clap" ,rust-clap-3)
("rust-env-logger" ,rust-env-logger-0.7) ("rust-env-logger" ,rust-env-logger-0.9)
("rust-flate2" ,rust-flate2-1)
("rust-log" ,rust-log-0.4) ("rust-log" ,rust-log-0.4)
("rust-pager" ,rust-pager-0.15) ("rust-pager" ,rust-pager-0.16)
("rust-reqwest" ,rust-reqwest-0.10) ("rust-reqwest" ,rust-reqwest-0.11)
("rust-serde" ,rust-serde-1) ("rust-serde" ,rust-serde-1)
("rust-serde-derive" ,rust-serde-derive-1) ("rust-serde-derive" ,rust-serde-derive-1)
("rust-tar" ,rust-tar-0.4)
("rust-toml" ,rust-toml-0.5) ("rust-toml" ,rust-toml-0.5)
("rust-walkdir" ,rust-walkdir-2) ("rust-walkdir" ,rust-walkdir-2)
("rust-xdg" ,rust-xdg-2)) ("rust-yansi" ,rust-yansi-0.5)
("rust-zip" ,rust-zip-0.6))
#:cargo-development-inputs #:cargo-development-inputs
(("rust-assert-cmd" ,rust-assert-cmd-1) (("rust-assert-cmd" ,rust-assert-cmd-2)
("rust-escargot" ,rust-escargot-0.5) ("rust-escargot" ,rust-escargot-0.5)
("rust-filetime" ,rust-filetime-0.2) ("rust-filetime" ,rust-filetime-0.2)
("rust-predicates" ,rust-predicates-1) ("rust-predicates" ,rust-predicates-2)
;; This earlier version is required to fix a bug.
;; Remove rust-remove-dir-all-0.5.2 when tealdeer gets upgraded
("rust-remove-dir-all" ,rust-remove-dir-all-0.5.2)
("rust-tempfile" ,rust-tempfile-3)))) ("rust-tempfile" ,rust-tempfile-3))))
(native-inputs (native-inputs
(list pkg-config)) (list perl pkg-config))
(inputs (inputs
(list openssl)) (list openssl))
(home-page "https://github.com/dbrgn/tealdeer/") (home-page "https://github.com/dbrgn/tealdeer/")

View file

@ -4,7 +4,7 @@
;;; Copyright © 2016 Nikita <nikita@n0.is> ;;; Copyright © 2016 Nikita <nikita@n0.is>
;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com> ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2017, 2018 Nikolai Merinov <nikolai.merinov@member.fsf.org> ;;; Copyright © 2017, 2018 Nikolai Merinov <nikolai.merinov@member.fsf.org>
;;; Copyright © 2017, 2019-2022 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017, 2019-2023 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org> ;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org>
;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com> ;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com>
@ -162,7 +162,15 @@
(snippet (snippet
'(begin '(begin
(for-each delete-file-recursively (for-each delete-file-recursively
'("src/llvm-project")))) '("src/llvm-project"))
;; Remove vendored dynamically linked libraries.
;; find . -not -type d -executable -exec file {} \+ | grep ELF
(delete-file "vendor/vte/vim10m_match")
(delete-file "vendor/vte/vim10m_table")
;; Also remove the bundled (mostly Windows) libraries.
;; find vendor -not -type d -exec file {} \+ | grep PE32
(for-each delete-file
(find-files "vendor" ".*\\.(a|dll|exe|lib)$"))))
(patches (search-patches "rustc-1.54.0-src.patch")) (patches (search-patches "rustc-1.54.0-src.patch"))
(patch-flags '("-p0")))) ;default is -p1 (patch-flags '("-p0")))) ;default is -p1
(outputs '("out" "cargo")) (outputs '("out" "cargo"))
@ -171,7 +179,7 @@
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (inputs
`(("libcurl" ,curl) `(("libcurl" ,curl)
("llvm" ,llvm) ("llvm" ,llvm-13)
("openssl" ,openssl-1.1) ("openssl" ,openssl-1.1)
("zlib" ,zlib))) ("zlib" ,zlib)))
(native-inputs (native-inputs
@ -189,6 +197,9 @@
;; Rust's own .so library files are not found in any RUNPATH, but ;; Rust's own .so library files are not found in any RUNPATH, but
;; that doesn't seem to cause issues. ;; that doesn't seem to cause issues.
#:validate-runpath? #f #:validate-runpath? #f
;; Most of the build is single-threaded. This also improves the
;; build time on machines with "only" 8GB of RAM.
#:parallel-build? ,(target-x86-64?)
#:make-flags #:make-flags
(list ,(string-append "RUSTC_TARGET=" (list ,(string-append "RUSTC_TARGET="
(or (%current-target-system) (or (%current-target-system)
@ -196,6 +207,10 @@
,(string-append "RUSTC_VERSION=" version) ,(string-append "RUSTC_VERSION=" version)
,(string-append "MRUSTC_TARGET_VER=" ,(string-append "MRUSTC_TARGET_VER="
(version-major+minor version)) (version-major+minor version))
;; mrustc expects a C11 compatible compiler. Use the default
;; C language dialect from the GCC-10 compiler.
;; This is necessary for some architectures.
"CFLAGS=-std=gnu11"
"OUTDIR_SUF=") ;do not add version suffix to output dir "OUTDIR_SUF=") ;do not add version suffix to output dir
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
@ -294,7 +309,6 @@
;; Use PARLEVEL since both minicargo and mrustc use it ;; Use PARLEVEL since both minicargo and mrustc use it
;; to set the level of parallelism. ;; to set the level of parallelism.
(setenv "PARLEVEL" (number->string job-count)) (setenv "PARLEVEL" (number->string job-count))
(setenv "CARGO_BUILD_JOBS" (number->string job-count))
(display "Building mrustc...\n") (display "Building mrustc...\n")
(apply invoke "make" make-flags) (apply invoke "make" make-flags)
@ -346,8 +360,8 @@ safety and thread safety guarantees.")
;; therefore the build process needs 8GB of RAM while building. ;; therefore the build process needs 8GB of RAM while building.
;; It may support i686 soon: ;; It may support i686 soon:
;; <https://github.com/thepowersgang/mrustc/issues/78>. ;; <https://github.com/thepowersgang/mrustc/issues/78>.
;; XXX: The rust bootstrap is currently broken on aarch64 and riscv64, ;; XXX: The rust bootstrap is currently broken on riscv64 and fails to
;; remove them until this is fixed. ;; build on CI for aarch64, remove them until this is fixed.
(supported-systems '("x86_64-linux")) (supported-systems '("x86_64-linux"))
;; Dual licensed. ;; Dual licensed.
@ -368,6 +382,14 @@ safety and thread safety guarantees.")
(for-each delete-file-recursively (for-each delete-file-recursively
'("src/llvm-project" '("src/llvm-project"
"vendor/tikv-jemalloc-sys/jemalloc")) "vendor/tikv-jemalloc-sys/jemalloc"))
;; Remove vendored dynamically linked libraries.
;; find . -not -type d -executable -exec file {} \+ | grep ELF
(delete-file "vendor/vte/vim10m_match")
(delete-file "vendor/vte/vim10m_table")
;; Also remove the bundled (mostly Windows) libraries.
;; find vendor -not -type d -exec file {} \+ | grep PE32
(for-each delete-file
(find-files "vendor" ".*\\.(a|dll|exe|lib)$"))
;; Add support for riscv64-linux. ;; Add support for riscv64-linux.
(substitute* "vendor/tikv-jemallocator/src/lib.rs" (substitute* "vendor/tikv-jemallocator/src/lib.rs"
((" target_arch = \"s390x\"," all) ((" target_arch = \"s390x\"," all)
@ -505,7 +527,7 @@ ar = \"" binutils "/bin/ar" "\"
("which" ,which))) ("which" ,which)))
(inputs (inputs
`(("jemalloc" ,jemalloc) `(("jemalloc" ,jemalloc)
("llvm" ,llvm) ("llvm" ,llvm-13)
("openssl" ,openssl) ("openssl" ,openssl)
("libssh2" ,libssh2) ; For "cargo" ("libssh2" ,libssh2) ; For "cargo"
("libcurl" ,curl))) ; For "cargo" ("libcurl" ,curl))) ; For "cargo"
@ -601,8 +623,26 @@ safety and thread safety guarantees.")
rust-1.59 "1.60.0" "1drqr0a26x1rb2w3kj0i6abhgbs3jx5qqkrcwbwdlx7n3inq5ji0")) rust-1.59 "1.60.0" "1drqr0a26x1rb2w3kj0i6abhgbs3jx5qqkrcwbwdlx7n3inq5ji0"))
(define rust-1.61 (define rust-1.61
(let ((base-rust
(rust-bootstrapped-package (rust-bootstrapped-package
rust-1.60 "1.61.0" "1vfs05hkf9ilk19b2vahqn8l6k17pl9nc1ky9kgspaascx8l62xd")) rust-1.60 "1.61.0" "1vfs05hkf9ilk19b2vahqn8l6k17pl9nc1ky9kgspaascx8l62xd")))
(package
(inherit base-rust)
(source
(origin
(inherit (package-source base-rust))
(snippet
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
"vendor/tikv-jemalloc-sys/jemalloc"))
;; Remove vendored dynamically linked libraries.
;; find . -not -type d -executable -exec file {} \+ | grep ELF
(delete-file "vendor/vte/vim10m_match")
(delete-file "vendor/vte/vim10m_table")
;; Also remove the bundled (mostly Windows) libraries.
(for-each delete-file
(find-files "vendor" ".*\\.(a|dll|exe|lib)$")))))))))
(define rust-1.62 (define rust-1.62
(rust-bootstrapped-package (rust-bootstrapped-package
@ -628,9 +668,10 @@ safety and thread safety guarantees.")
((#:phases phases) ((#:phases phases)
`(modify-phases ,phases `(modify-phases ,phases
(replace 'patch-cargo-checksums (replace 'patch-cargo-checksums
(lambda* _ (lambda _
(substitute* '("Cargo.lock" (substitute* '("Cargo.lock"
"src/bootstrap/Cargo.lock") "src/bootstrap/Cargo.lock"
"src/tools/rust-analyzer/Cargo.lock")
(("(checksum = )\".*\"" all name) (("(checksum = )\".*\"" all name)
(string-append name "\"" ,%cargo-reference-hash "\""))) (string-append name "\"" ,%cargo-reference-hash "\"")))
(generate-all-checksums "vendor")))))))))) (generate-all-checksums "vendor"))))))))))
@ -647,6 +688,23 @@ safety and thread safety guarantees.")
(patches '()) (patches '())
(patch-flags '("-p1"))))))) (patch-flags '("-p1")))))))
(define rust-1.66
(rust-bootstrapped-package
rust-1.65 "1.66.1" "1fjr94gsicsxd2ypz4zm8aad1zdbiccr7qjfbmq8f8f7jhx96g2v"))
(define rust-1.67
(let ((base-rust
(rust-bootstrapped-package
rust-1.66 "1.67.1" "0vpzv6rm3w1wbni17ryvcw83k5klhghklylfdza3nnp8blz3sj26")))
(package
(inherit base-rust)
(inputs (modify-inputs (package-inputs base-rust)
(replace "llvm" llvm-15))))))
(define rust-1.68
(rust-bootstrapped-package
rust-1.67 "1.68.2" "15ifyd5jj8rd979dkakp887hgmhndr68pqaqvd2hqkfdywirqcwk"))
;;; Note: Only the latest versions of Rust are supported and tested. The ;;; Note: Only the latest versions of Rust are supported and tested. The
;;; intermediate rusts are built for bootstrapping purposes and should not ;;; intermediate rusts are built for bootstrapping purposes and should not
;;; be relied upon. This is to ease maintenance and reduce the time ;;; be relied upon. This is to ease maintenance and reduce the time
@ -655,7 +713,7 @@ safety and thread safety guarantees.")
;;; Here we take the latest included Rust, make it public, and re-enable tests ;;; Here we take the latest included Rust, make it public, and re-enable tests
;;; and extra components such as rustfmt. ;;; and extra components such as rustfmt.
(define-public rust (define-public rust
(let ((base-rust rust-1.60)) (let ((base-rust rust-1.67))
(package (package
(inherit base-rust) (inherit base-rust)
(outputs (cons "rustfmt" (package-outputs base-rust))) (outputs (cons "rustfmt" (package-outputs base-rust)))
@ -697,6 +755,34 @@ safety and thread safety guarantees.")
"#[ignore]\nfn finds_author_git") "#[ignore]\nfn finds_author_git")
(("fn finds_local_author_git") (("fn finds_local_author_git")
"#[ignore]\nfn finds_local_author_git")))) "#[ignore]\nfn finds_local_author_git"))))
(add-after 'unpack 'disable-tests-requiring-mercurial
(lambda _
(substitute*
"src/tools/cargo/tests/testsuite/init/simple_hg_ignore_exists/mod.rs"
(("fn simple_hg_ignore_exists")
"#[ignore]\nfn simple_hg_ignore_exists"))
(substitute*
"src/tools/cargo/tests/testsuite/init/mercurial_autodetect/mod.rs"
(("fn mercurial_autodetect")
"#[ignore]\nfn mercurial_autodetect"))))
(add-after 'unpack 'disable-tests-broken-on-aarch64
(lambda _
(with-directory-excursion "src/tools/cargo/tests/testsuite/"
(substitute* "build_script_extra_link_arg.rs"
(("^fn build_script_extra_link_arg_bin_single" m)
(string-append "#[ignore]\n" m)))
(substitute* "build_script.rs"
(("^fn env_test" m)
(string-append "#[ignore]\n" m)))
(substitute* "collisions.rs"
(("^fn collision_doc_profile_split" m)
(string-append "#[ignore]\n" m)))
(substitute* "concurrent.rs"
(("^fn no_deadlock_with_git_dependencies" m)
(string-append "#[ignore]\n" m)))
(substitute* "features2.rs"
(("^fn dep_with_optional_host_deps_activated" m)
(string-append "#[ignore]\n" m))))))
(add-after 'unpack 'patch-command-exec-tests (add-after 'unpack 'patch-command-exec-tests
;; This test suite includes some tests that the stdlib's ;; This test suite includes some tests that the stdlib's
;; `Command` execution properly handles in situations where ;; `Command` execution properly handles in situations where
@ -728,11 +814,11 @@ safety and thread safety guarantees.")
(substitute* "library/std/src/process/tests.rs" (substitute* "library/std/src/process/tests.rs"
(("\"/bin/sh\"") (("\"/bin/sh\"")
(string-append "\"" bash "/bin/sh\""))) (string-append "\"" bash "/bin/sh\"")))
;; The three tests which are known to fail upstream on QEMU
;; emulation on aarch64 and riscv64 also fail on x86_64 in Guix's
;; build system. Skip them on all builds.
(substitute* "library/std/src/sys/unix/process/process_common/tests.rs" (substitute* "library/std/src/sys/unix/process/process_common/tests.rs"
(("fn test_process_mask") (("target_arch = \"arm\",") "target_os = \"linux\",")))))
"#[allow(unused_attributes)]
#[ignore]
fn test_process_mask")))))
(add-after 'unpack 'disable-interrupt-tests (add-after 'unpack 'disable-interrupt-tests
(lambda _ (lambda _
;; This test hangs in the build container; disable it. ;; This test hangs in the build container; disable it.

View file

@ -441,7 +441,7 @@ This Guix package is built to use the nettle cryptographic library.")
("rust-sequoia-net" ,rust-sequoia-net-0.23) ("rust-sequoia-net" ,rust-sequoia-net-0.23)
("rust-sequoia-openpgp" ,rust-sequoia-openpgp-1) ("rust-sequoia-openpgp" ,rust-sequoia-openpgp-1)
("rust-sha2" ,rust-sha2-0.8) ;; for ffi-macros ("rust-sha2" ,rust-sha2-0.8) ;; for ffi-macros
("rust-tokio" ,rust-tokio-1.8)) ("rust-tokio" ,rust-tokio-1))
#:cargo-development-inputs #:cargo-development-inputs
`(("rust-filetime" ,rust-filetime-0.2)) `(("rust-filetime" ,rust-filetime-0.2))
#:phases #:phases

View file

@ -224,14 +224,14 @@ cards.")
(define-public newsboat (define-public newsboat
(package (package
(name "newsboat") (name "newsboat")
(version "2.30.1") (version "2.31")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "https://newsboat.org/releases/" version (uri (string-append "https://newsboat.org/releases/" version
"/newsboat-" version ".tar.xz")) "/newsboat-" version ".tar.xz"))
(sha256 (sha256
(base32 "0bv0al3inay6jsggaz2zja4j9jp1ffn8bp4i4jr8wd1c9asgsgs1")))) (base32 "1nn1akjc3l29gcr0n6g7y39qvmbw8vf5sfmnxd794sgmbki7vbsb"))))
(build-system cargo-build-system) (build-system cargo-build-system)
(native-inputs (native-inputs
`(("gettext" ,gettext-minimal) `(("gettext" ,gettext-minimal)
@ -257,14 +257,14 @@ cards.")
#:install-source? #f #:install-source? #f
#:cargo-inputs #:cargo-inputs
(("rust-backtrace" ,rust-backtrace-0.3) (("rust-backtrace" ,rust-backtrace-0.3)
("rust-bitflags" ,rust-bitflags-1) ("rust-bitflags" ,rust-bitflags-2)
("rust-chrono" ,rust-chrono-0.4) ("rust-chrono" ,rust-chrono-0.4)
("rust-curl-sys" ,rust-curl-sys-0.4) ("rust-curl-sys" ,rust-curl-sys-0.4)
("rust-cxx" ,rust-cxx-1) ("rust-cxx" ,rust-cxx-1)
("rust-cxx-build" ,rust-cxx-build-1) ("rust-cxx-build" ,rust-cxx-build-1)
("rust-fastrand" ,rust-fastrand-1) ("rust-fastrand" ,rust-fastrand-1)
("rust-gettext-rs" ,rust-gettext-rs-0.7) ("rust-gettext-rs" ,rust-gettext-rs-0.7)
("rust-lexopt" ,rust-lexopt-0.2) ("rust-lexopt" ,rust-lexopt-0.3)
("rust-libc" ,rust-libc-0.2) ("rust-libc" ,rust-libc-0.2)
("rust-md5" ,rust-md5-0.7) ("rust-md5" ,rust-md5-0.7)
("rust-natord" ,rust-natord-1) ("rust-natord" ,rust-natord-1)

View file

@ -69,7 +69,6 @@
#:use-module (gnu packages base) #:use-module (gnu packages base)
#:use-module (gnu packages bash) #:use-module (gnu packages bash)
#:use-module (gnu packages check) #:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
#:use-module (gnu packages crates-io) #:use-module (gnu packages crates-io)
#:use-module (gnu packages crates-graphics) #:use-module (gnu packages crates-graphics)
@ -1407,7 +1406,7 @@ basic input/output.")
(define-public alacritty (define-public alacritty
(package (package
(name "alacritty") (name "alacritty")
(version "0.9.0") (version "0.12.0")
(source (source
(origin (origin
;; XXX: The crate at "crates.io" has limited contents. In particular, ;; XXX: The crate at "crates.io" has limited contents. In particular,
@ -1418,57 +1417,62 @@ basic input/output.")
(commit (string-append "v" version)))) (commit (string-append "v" version))))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "068y0b1a0m33r7a3j2xf6k602sc8062gm4d5568ynfx6w5n481lj")))) (base32 "00ksvn0k451wmppqxkzzsb5gdjllqxqrnxw81gam00k9wsq8bj6q"))))
(build-system cargo-build-system) (build-system cargo-build-system)
(arguments (arguments
`(#:install-source? #f ; virtual manifest `(#:install-source? #f ; virtual manifest
#:cargo-test-flags '("--release" "--" "--skip=config_read_eof") #:cargo-test-flags '("--release" "--" "--skip=config_read_eof")
#:cargo-inputs #:cargo-inputs
(("rust-alacritty-config-derive" ,rust-alacritty-config-derive-0.1) (("rust-alacritty-config" ,rust-alacritty-config-0.1)
("rust-alacritty-terminal" ,rust-alacritty-terminal-0.15) ("rust-alacritty-config-derive" ,rust-alacritty-config-derive-0.2)
("rust-clap" ,rust-clap-2) ("rust-alacritty-terminal" ,rust-alacritty-terminal-0.18)
("rust-bitflags" ,rust-bitflags-1)
("rust-clap" ,rust-clap-3)
("rust-cocoa" ,rust-cocoa-0.24) ("rust-cocoa" ,rust-cocoa-0.24)
("rust-copypasta" ,rust-copypasta-0.7) ("rust-copypasta" ,rust-copypasta-0.8)
("rust-crossfont" ,rust-crossfont-0.3) ("rust-crossfont" ,rust-crossfont-0.5)
("rust-dirs" ,rust-dirs-4)
("rust-embed-resource" ,rust-embed-resource-1) ("rust-embed-resource" ,rust-embed-resource-1)
("rust-fnv" ,rust-fnv-1) ("rust-fnv" ,rust-fnv-1)
("rust-gl-generator" ,rust-gl-generator-0.14) ("rust-gl-generator" ,rust-gl-generator-0.14)
;; XXX: Adjust `add-absolute-library-references' phase when updating ;; XXX: Adjust `add-absolute-library-references' phase when updating
;; glutin input. ;; glutin input.
("rust-glutin" ,rust-glutin-0.26) ("rust-glutin" ,rust-glutin-0.30)
("rust-libc" ,rust-libc-0.2)
("rust-log" ,rust-log-0.4) ("rust-log" ,rust-log-0.4)
("rust-notify" ,rust-notify-4) ("rust-notify" ,rust-notify-5)
("rust-objc" ,rust-objc-0.2) ("rust-objc" ,rust-objc-0.2)
("rust-parking-lot" ,rust-parking-lot-0.11) ("rust-once-cell" ,rust-once-cell-1)
("rust-png" ,rust-png-0.16) ("rust-parking-lot" ,rust-parking-lot-0.12)
("rust-raw-window-handle" ,rust-raw-window-handle-0.3) ("rust-png" ,rust-png-0.17)
("rust-raw-window-handle" ,rust-raw-window-handle-0.5)
("rust-serde" ,rust-serde-1) ("rust-serde" ,rust-serde-1)
("rust-serde-json" ,rust-serde-json-1) ("rust-serde-json" ,rust-serde-json-1)
("rust-serde-yaml" ,rust-serde-yaml-0.8) ("rust-serde-yaml" ,rust-serde-yaml-0.8)
("rust-time" ,rust-time-0.1) ("rust-unicode-width" ,rust-unicode-width-0.1)
("rust-urlocator" ,rust-urlocator-0.1) ("rust-wayland-client" ,rust-wayland-client-0.29)
("rust-windows-sys" ,rust-windows-sys-0.36)
("rust-winit" ,rust-winit-0.28)
("rust-x11-dl" ,rust-x11-dl-2) ("rust-x11-dl" ,rust-x11-dl-2)
("rust-xdg" ,rust-xdg-2)) ("rust-xdg" ,rust-xdg-2))
#:cargo-development-inputs
(("rust-clap-complete" ,rust-clap-complete-3))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'use-new-nix
(lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "alacritty_terminal/Cargo.toml"
(("0.22.0") "^0.23.0"))))
(add-after 'unpack 'patch-xdg-open (add-after 'unpack 'patch-xdg-open
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* "alacritty/src/config/ui_config.rs" (substitute* "alacritty/src/config/ui_config.rs"
(("xdg-open") (search-input-file inputs "/bin/xdg-open"))))) (("xdg-open") (search-input-file inputs "/bin/xdg-open")))))
(add-after 'configure 'add-absolute-library-references (add-after 'configure 'add-absolute-library-references
(lambda* (#:key inputs cargo-inputs vendor-dir #:allow-other-keys) (lambda* (#:key inputs cargo-inputs vendor-dir #:allow-other-keys)
(let* ((glutin-name ,(package-name rust-glutin-0.26)) (let* ((glutin-name ,(package-name rust-glutin-0.30))
(glutin-version ,(package-version rust-glutin-0.26)) (glutin-version ,(package-version rust-glutin-0.30))
(glutin-api (string-append glutin-name "-" glutin-version (glutin-api (string-append glutin-name "-" glutin-version
".tar.gz/src/api/")) ".tar.gz/src/api/"))
(smithay-client-toolkit-name (smithay-client-toolkit-name
,(package-name rust-smithay-client-toolkit-0.12)) ,(package-name rust-smithay-client-toolkit-0.16))
(smithay-client-toolkit-version (smithay-client-toolkit-version
,(package-version rust-smithay-client-toolkit-0.12)) ,(package-version rust-smithay-client-toolkit-0.16))
(smithay-client-toolkit-src (smithay-client-toolkit-src
(string-append smithay-client-toolkit-name "-" (string-append smithay-client-toolkit-name "-"
smithay-client-toolkit-version ".tar.gz/src")) smithay-client-toolkit-version ".tar.gz/src"))
@ -1492,8 +1496,7 @@ basic input/output.")
(("libGL.so") (string-append mesa "/lib/libGL.so"))) (("libGL.so") (string-append mesa "/lib/libGL.so")))
(substitute* (substitute*
(string-append vendor-dir "/" glutin-api "egl/mod.rs") (string-append vendor-dir "/" glutin-api "egl/mod.rs")
(("libEGL.so") (string-append mesa "/lib/libEGL.so"))) (("libEGL.so") (string-append mesa "/lib/libEGL.so"))))))
#t)))
(replace 'install (replace 'install
;; Upstream install script only takes care of executable. ;; Upstream install script only takes care of executable.
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
@ -1531,11 +1534,9 @@ basic input/output.")
(install-file "extra/completions/_alacritty" (install-file "extra/completions/_alacritty"
(string-append share "/zsh/site-functions")) (string-append share "/zsh/site-functions"))
(install-file "extra/completions/alacritty.fish" (install-file "extra/completions/alacritty.fish"
(string-append share "/fish/vendor_completions.d")) (string-append share "/fish/vendor_completions.d"))))))))
#t))))))
(native-inputs (native-inputs
`(("cmake" ,cmake) `(("ncurses" ,ncurses)
("ncurses" ,ncurses)
("pkg-config" ,pkg-config) ("pkg-config" ,pkg-config)
("python3" ,python))) ("python3" ,python)))
(inputs (inputs
@ -1550,12 +1551,6 @@ basic input/output.")
("libxrandr" ,libxrandr) ("libxrandr" ,libxrandr)
("libxxf86vm" ,libxxf86vm) ("libxxf86vm" ,libxxf86vm)
("mesa" ,mesa) ("mesa" ,mesa)
("rust-bitflags" ,rust-bitflags-1)
("rust-dirs" ,rust-dirs-3)
("rust-libc" ,rust-libc-0.2)
("rust-unicode-width" ,rust-unicode-width-0.1)
("rust-wayland-client" ,rust-wayland-client-0.28)
("rust-winapi" ,rust-winapi-0.3)
("xdg-utils" ,xdg-utils) ("xdg-utils" ,xdg-utils)
("wayland" ,wayland))) ("wayland" ,wayland)))
(native-search-paths (native-search-paths

View file

@ -141,18 +141,19 @@ This package includes the @code{libtree-sitter} runtime library.")
("rust-semver" ,rust-semver-1) ("rust-semver" ,rust-semver-1)
("rust-smallbitvec" ,rust-smallbitvec-2) ("rust-smallbitvec" ,rust-smallbitvec-2)
("rust-thiserror" ,rust-thiserror-1) ("rust-thiserror" ,rust-thiserror-1)
("rust-tiny-http" ,rust-tiny-http-0.8) ("rust-tiny-http" ,rust-tiny-http-0.12)
("rust-toml" ,rust-toml-0.5) ("rust-toml" ,rust-toml-0.5)
("rust-walkdir" ,rust-walkdir-2) ("rust-walkdir" ,rust-walkdir-2)
("rust-webbrowser" ,rust-webbrowser-0.5) ("rust-webbrowser" ,rust-webbrowser-0.8)
("rust-which" ,rust-which-4)) ("rust-which" ,rust-which-4))
#:cargo-development-inputs #:cargo-development-inputs
`(("rust-pretty-assertions" ,rust-pretty-assertions-0.7)) `(("rust-ctor" ,rust-ctor-0.1)
("rust-pretty-assertions" ,rust-pretty-assertions-0.7)
("rust-rand" ,rust-rand-0.8)
("rust-tempfile" ,rust-tempfile-3)
("rust-unindent" ,rust-unindent-0.2))
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'delete-cargo-lock
(lambda _
(delete-file "Cargo.lock")))
(add-after 'unpack 'patch-node (add-after 'unpack 'patch-node
(lambda _ (lambda _
(substitute* "cli/src/generate/mod.rs" (substitute* "cli/src/generate/mod.rs"

View file

@ -197,6 +197,7 @@
#:use-module (gnu packages tls) #:use-module (gnu packages tls)
#:use-module (gnu packages time) #:use-module (gnu packages time)
#:use-module (gnu packages upnp) #:use-module (gnu packages upnp)
#:use-module (gnu packages version-control)
#:use-module (gnu packages vulkan) #:use-module (gnu packages vulkan)
#:use-module (gnu packages web) #:use-module (gnu packages web)
#:use-module (gnu packages webkit) #:use-module (gnu packages webkit)
@ -5281,38 +5282,10 @@ result in several formats:
(home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html") (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
(license license:gpl2+))) (license license:gpl2+)))
;;; XXX: This crate is used only for rav1e and can be removed once the latter
;;; is updated. See <https://issues.guix.gnu.org/52837>.
(define rust-dav1d-sys-0.3.2
(package
(name "rust-dav1d-sys")
(version "0.3.2")
(source
(origin
(method url-fetch)
(uri (crate-uri "dav1d-sys" version))
(file-name
(string-append name "-" version ".tar.gz"))
(sha256
(base32 "1jdxhnlxcml6jd67lx78ifzkn1xm18zfk4li7vjdh3fa61i073kx"))))
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs
(("rust-bindgen" ,rust-bindgen-0.54)
("rust-metadeps" ,rust-metadeps-1))))
(native-inputs
(list pkg-config))
(inputs
(list dav1d clang llvm))
(home-page "https://github.com/rust-av/dav1d-rs")
(synopsis "FFI bindings to dav1d")
(description "This package provides FFI bindings to dav1d.")
(license license:expat)))
(define-public rav1e (define-public rav1e
(package (package
(name "rav1e") (name "rav1e")
(version "0.5.1") (version "0.6.3")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
@ -5321,71 +5294,73 @@ result in several formats:
(string-append name "-" version ".tar.gz")) (string-append name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"006bfcmjwg0phg8gc25b1sl2ngjrb2bh1b3fd0s5gbf9nlkr8qsn")))) "0if94sfviy5cwljlnsy0f470ixfs090k54g416kcc0qd9w4rhy17"))))
(build-system cargo-build-system) (build-system cargo-build-system)
(arguments (arguments
`(;; Strip the '--release' flag to work around the doctest failures with `(#:cargo-inputs
;; Rust 1.57 (see: https://github.com/xiph/rav1e/issues/2851).
#:cargo-test-flags '()
#:cargo-inputs
(("rust-aom-sys" ,rust-aom-sys-0.3) (("rust-aom-sys" ,rust-aom-sys-0.3)
("rust-arbitrary" ,rust-arbitrary-0.4) ("rust-arbitrary" ,rust-arbitrary-0.4)
("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3) ("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3)
("rust-arrayvec" ,rust-arrayvec-0.7) ("rust-arrayvec" ,rust-arrayvec-0.7)
("rust-av-metrics" ,rust-av-metrics-0.7) ("rust-av-metrics" ,rust-av-metrics-0.9)
("rust-av1-grain" ,rust-av1-grain-0.2)
("rust-backtrace" ,rust-backtrace-0.3) ("rust-backtrace" ,rust-backtrace-0.3)
("rust-bitstream-io" ,rust-bitstream-io-1) ("rust-bitstream-io" ,rust-bitstream-io-1)
("rust-built" ,rust-built-0.5)
("rust-byteorder" ,rust-byteorder-1) ("rust-byteorder" ,rust-byteorder-1)
("rust-cc" ,rust-cc-1)
("rust-cfg-if" ,rust-cfg-if-1) ("rust-cfg-if" ,rust-cfg-if-1)
("rust-clap" ,rust-clap-2) ("rust-clap" ,rust-clap-4)
("rust-console" ,rust-console-0.14) ("rust-clap-complete" ,rust-clap-complete-4)
("rust-console" ,rust-console-0.15)
("rust-const-fn-assert" ,rust-const-fn-assert-0.1)
("rust-crossbeam" ,rust-crossbeam-0.8) ("rust-crossbeam" ,rust-crossbeam-0.8)
("rust-dav1d-sys" ,rust-dav1d-sys-0.3) ("rust-dav1d-sys" ,rust-dav1d-sys-0.7)
("rust-fern" ,rust-fern-0.6) ("rust-fern" ,rust-fern-0.6)
("rust-image" ,rust-image-0.23) ("rust-image" ,rust-image-0.24)
("rust-interpolate-name" ,rust-interpolate-name-0.2) ("rust-interpolate-name" ,rust-interpolate-name-0.2)
("rust-itertools" ,rust-itertools-0.10) ("rust-itertools" ,rust-itertools-0.10)
("rust-ivf" ,rust-ivf-0.1) ("rust-ivf" ,rust-ivf-0.1)
("rust-libc" ,rust-libc-0.2) ("rust-libc" ,rust-libc-0.2)
("rust-libfuzzer-sys" ,rust-libfuzzer-sys-0.3) ("rust-libfuzzer-sys" ,rust-libfuzzer-sys-0.3)
("rust-log" ,rust-log-0.4) ("rust-log" ,rust-log-0.4)
("rust-maybe-rayon" ,rust-maybe-rayon-0.1)
("rust-nasm-rs" ,rust-nasm-rs-0.2) ("rust-nasm-rs" ,rust-nasm-rs-0.2)
("rust-new-debug-unreachable" ,rust-new-debug-unreachable-1)
("rust-nom" ,rust-nom-7)
("rust-noop-proc-macro" ,rust-noop-proc-macro-0.3) ("rust-noop-proc-macro" ,rust-noop-proc-macro-0.3)
("rust-num-derive" ,rust-num-derive-0.3) ("rust-num-derive" ,rust-num-derive-0.3)
("rust-num-traits" ,rust-num-traits-0.2) ("rust-num-traits" ,rust-num-traits-0.2)
("rust-once-cell" ,rust-once-cell-1)
("rust-paste" ,rust-paste-1) ("rust-paste" ,rust-paste-1)
("rust-rand" ,rust-rand-0.8) ("rust-rand" ,rust-rand-0.8)
("rust-rand-chacha" ,rust-rand-chacha-0.3) ("rust-rand-chacha" ,rust-rand-chacha-0.3)
("rust-rayon" ,rust-rayon-1)
("rust-regex" ,rust-regex-1)
("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7) ("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7)
("rust-rustc-version" ,rust-rustc-version-0.4) ("rust-rustc-version" ,rust-rustc-version-0.4)
("rust-scan-fmt" ,rust-scan-fmt-0.2) ("rust-scan-fmt" ,rust-scan-fmt-0.2)
("rust-serde" ,rust-serde-1) ("rust-serde" ,rust-serde-1)
("rust-serde-big-array" ,rust-serde-big-array-0.4)
("rust-signal-hook" ,rust-signal-hook-0.3) ("rust-signal-hook" ,rust-signal-hook-0.3)
("rust-simd-helpers" ,rust-simd-helpers-0.1) ("rust-simd-helpers" ,rust-simd-helpers-0.1)
("rust-system-deps" ,rust-system-deps-6)
("rust-thiserror" ,rust-thiserror-1) ("rust-thiserror" ,rust-thiserror-1)
("rust-toml" ,rust-toml-0.5) ("rust-toml" ,rust-toml-0.5)
("rust-v-frame" ,rust-v-frame-0.2) ("rust-v-frame" ,rust-v-frame-0.3)
("rust-vergen" ,rust-vergen-3)
("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2) ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
("rust-y4m" ,rust-y4m-0.7)) ("rust-y4m" ,rust-y4m-0.7))
#:cargo-development-inputs #:cargo-development-inputs
(("rust-assert-cmd" ,rust-assert-cmd-2) (("rust-assert-cmd" ,rust-assert-cmd-2)
("rust-cc" ,rust-cc-1) ("rust-criterion" ,rust-criterion-0.4)
("rust-criterion" ,rust-criterion-0.3)
("rust-interpolate-name" ,rust-interpolate-name-0.2) ("rust-interpolate-name" ,rust-interpolate-name-0.2)
("rust-pretty-assertions" ,rust-pretty-assertions-0.7) ("rust-nom" ,rust-nom-7)
("rust-pretty-assertions" ,rust-pretty-assertions-1)
("rust-quickcheck" ,rust-quickcheck-1)
("rust-quickcheck-macros" ,rust-quickcheck-macros-1)
("rust-rand" ,rust-rand-0.8) ("rust-rand" ,rust-rand-0.8)
("rust-rand-chacha" ,rust-rand-chacha-0.3) ("rust-rand-chacha" ,rust-rand-chacha-0.3)
("rust-semver" ,rust-semver-1)) ("rust-semver" ,rust-semver-1))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'relax-versions
(lambda _
(substitute* "Cargo.toml"
;; Allow using more recent versions of system-deps.
(("~3.1.2") "~3"))))
(replace 'build (replace 'build
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
@ -5397,7 +5372,9 @@ result in several formats:
(delete-file (string-append (assoc-ref outputs "out") (delete-file (string-append (assoc-ref outputs "out")
"/lib/librav1e.a"))))))) "/lib/librav1e.a")))))))
(native-inputs (native-inputs
(list rust-cargo-c nasm)) (list nasm pkg-config rust-cargo-c))
(inputs
(list libgit2 zlib))
(home-page "https://github.com/xiph/rav1e/") (home-page "https://github.com/xiph/rav1e/")
(synopsis "Fast and safe AV1 encoder") (synopsis "Fast and safe AV1 encoder")
(description "@code{rav1e} is an AV1 video encoder. It is designed to (description "@code{rav1e} is an AV1 video encoder. It is designed to

View file

@ -2,7 +2,7 @@
;;; Copyright © 2016 David Craven <david@craven.ch> ;;; Copyright © 2016 David Craven <david@craven.ch>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com> ;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com>
;;; Copyright © 2019-2022 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2019-2023 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 Marius Bakke <marius@gnu.org> ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; ;;;
@ -210,12 +210,32 @@ directory = '" port)
#t)) #t))
(define* (package #:key (define* (package #:key
source
skip-build?
install-source? install-source?
(cargo-package-flags '("--no-metadata" "--no-verify")) (cargo-package-flags '("--no-metadata" "--no-verify"))
#:allow-other-keys) #:allow-other-keys)
"Run 'cargo-package' for a given Cargo package." "Run 'cargo-package' for a given Cargo package."
(if install-source? (if install-source?
(apply invoke `("cargo" "package" ,@cargo-package-flags)) (if skip-build?
(begin
(install-file source "target/package")
(with-directory-excursion "target/package"
(for-each
(lambda (file)
(make-file-writable file)
;; Strip the hash and replace '.tar.gz' with '.crate'.
(rename-file file
(string-append (string-drop-right
(string-drop file 35)
(string-length ".tar.gz"))
".crate")))
(find-files "." "\\.tar\\.gz$"))))
(begin
;;error: invalid inclusion of reserved file name Cargo.toml.orig in package source
(when (file-exists? "Cargo.toml.orig")
(delete-file "Cargo.toml.orig"))
(apply invoke `("cargo" "package" ,@cargo-package-flags))))
(format #t "Not installing cargo sources, skipping `cargo package`.~%")) (format #t "Not installing cargo sources, skipping `cargo package`.~%"))
#t) #t)