From 58be8a5807e33cce51a8c27970c88c1f7d0b5dc9 Mon Sep 17 00:00:00 2001 From: jgart Date: Fri, 7 Aug 2026 17:21:12 +0100 Subject: gnu: Add hurl. * gnu/packages/rust-apps.scm (hurl): New variable. Change-Id: I9e5121a902567671487a9dd78eccd05798f65363 --- gnu/packages/rust-apps.scm | 5 +- gnu/packages/rust-crates.scm | 181 +++++++++++++++++++++++++++++++++++++++++++ gnu/packages/web.scm | 77 +++++++++++++++++- 3 files changed, 260 insertions(+), 3 deletions(-) diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index 274a2c8aa7f..155da867ea0 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm @@ -14,7 +14,7 @@ ;;; Copyright © 2021 Alexandru-Sergiu Marton ;;; Copyright © 2021, 2023-2025 Maxim Cournoyer ;;; Copyright © 2021, 2022 Petr Hodina -;;; Copyright © 2021 jgart +;;; Copyright © 2021, 2026 jgart ;;; Copyright © 2021 Nicolas Graves ;;; Copyright © 2022 Aleksandr Vityazev ;;; Copyright © 2022 Gabriel Arazas @@ -140,7 +140,8 @@ #:use-module (gnu packages video) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg) - #:use-module (gnu packages wxwidgets)) + #:use-module (gnu packages wxwidgets) + #:use-module (gnu packages xml)) (define-public aardvark-dns (package diff --git a/gnu/packages/rust-crates.scm b/gnu/packages/rust-crates.scm index 6c45ab6e984..3f04dd7483d 100644 --- a/gnu/packages/rust-crates.scm +++ b/gnu/packages/rust-crates.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2025 Hilton Chain ;;; Copyright © 2026 Daniel Khodabakhsh ;;; Copyright © 2026 Tomás Ortín Fernández (quanrong) +;;; Copyright © 2026 jgart ;;; ;;; This file is part of GNU Guix. ;;; @@ -327,6 +328,10 @@ (crate-source "alloc-stdlib" "0.2.2" "1kkfbld20ab4165p29v172h8g0wvq8i06z8vnng14whw0isq5ywl")) +(define rust-alloc-stdlib-0.2.4 + (crate-source "alloc-stdlib" "0.2.4" + "159iyap790nflvdhl1gbkxp9l5w4x7qp5ybg01wx490jx4cs0xhf")) + (define rust-alloca-0.4.0 (crate-source "alloca" "0.4.0" "1x6p4387rz6j7h342kp3b7bgvqzyl9mibf959pkfk9xflrgd19z5")) @@ -2942,6 +2947,10 @@ fn main() { (crate-source "brotli" "8.0.2" "0q25r00z3gm5wzvv4vfxvlx5zjb8i4jwyznrvdcp7abs7ihbkn2b")) +(define rust-brotli-8.0.4 + (crate-source "brotli" "8.0.4" + "1cv6f4hdivllg34slvbwy645p1zidbxwpp1vh8jiwyha0sn1mjaw")) + (define rust-brotli-decompressor-4.0.2 (crate-source "brotli-decompressor" "4.0.2" "0dqb0vbhrc77c09qf6qmbylgkfnbjaq8629qp0z42gc0gnnhbykl")) @@ -2958,6 +2967,10 @@ fn main() { (crate-source "brotli-decompressor" "5.0.1" "0929p5smsq5v0jy509gn746y3v1yjjwnk49xg5g1pklj3cz54qjr")) +(define rust-brotli-decompressor-5.0.3 + (crate-source "brotli-decompressor" "5.0.3" + "10rm4pyqnznh192nzsjl4dh6bjgzglsadcl676y6f6gy2nnaqcis")) + (define rust-browserslist-rs-0.6.0 (crate-source "browserslist-rs" "0.6.0" "19l0prgnbx0cyqvjsf30ni7d87nkn8j0fj56fg259yvfh50if1ri")) @@ -6805,6 +6818,10 @@ fn main() { (crate-source "curl" "0.4.49" "1g7dcrh4mwkn2q0iiga7vc8i68pd5jdby5aparpa6yxqs1nkpz3r")) +(define rust-curl-0.4.50 + (crate-source "curl" "0.4.50" + "02avq75lp8b8yz4kbhfxf6vzyqvjpwh1rz0cqss7qc75jj4ywi9s")) + (define rust-curl-sys-0.4.85+curl-8.18.0 (crate-source "curl-sys" "0.4.85+curl-8.18.0" "1nrzryl8hw1br69bagr774wrv2w8yim9x8zasgv0bk2y5caadvy0" @@ -6820,6 +6837,11 @@ fn main() { "1l06557wwna8wvk62amn01zj7dqr3kd1s6j99vzmw9a7cpg1cj34" #:snippet '(delete-file-recursively "curl"))) +(define rust-curl-sys-0.4.89+curl-8.20.0 + (crate-source "curl-sys" "0.4.89+curl-8.20.0" + "08msv70y78amibg81nxxj2ljw8avnhx9g1bljb8g4f2l51whfs3d" + #:snippet '(delete-file-recursively "curl"))) + (define rust-current-platform-0.2.0 (crate-source "current_platform" "0.2.0" "1g504i1l733bn1hyzzfvwmc8qq84dxxpscs9rcb21cj4zsy5hj57")) @@ -17832,6 +17854,10 @@ fn main() { (define rust-libwebrtc-0.3.10.5f04705 package:rust-livekit-0.7.8.5f04705) +(define rust-libxml-0.3.13 + (crate-source "libxml" "0.3.13" + "0qy14rlp4v210x815aaqd7fl2905aaj23slk9dwsjbwhbd47s2l6")) + (define rust-libyml-0.0.5 (crate-source "libyml" "0.0.5" "106963pwg1gc3165bdlk8bbspmk919gk10vshhqglks3z8m700ik")) @@ -60151,6 +60177,161 @@ fn main() { rust-zerofrom-derive-0.1.6 rust-zerovec-0.10.4 rust-zerovec-derive-0.10.3)) + (hurl => + (list rust-adler32-1.2.0 + rust-aho-corasick-1.1.4 + rust-alloc-no-stdlib-2.0.4 + rust-alloc-stdlib-0.2.4 + rust-allocator-api2-0.2.21 + rust-android-system-properties-0.1.5 + rust-anstream-1.0.0 + rust-anstyle-1.0.14 + rust-anstyle-parse-1.0.0 + rust-anstyle-query-1.1.5 + rust-anstyle-wincon-3.0.11 + rust-autocfg-1.5.1 + rust-base64-0.22.1 + rust-bindgen-0.72.1 + rust-bitflags-2.13.0 + rust-block-buffer-0.12.1 + rust-brotli-8.0.4 + rust-brotli-decompressor-5.0.3 + rust-bstr-1.12.1 + rust-bumpalo-3.20.3 + rust-cc-1.2.65 + rust-cexpr-0.6.0 + rust-cfg-if-1.0.4 + rust-chacha20-0.10.0 + rust-chrono-0.4.45 + rust-clang-sys-1.8.1 + rust-clap-4.6.1 + rust-clap-builder-4.6.0 + rust-clap-lex-1.1.0 + rust-colorchoice-1.0.5 + rust-colored-3.1.1 + rust-const-oid-0.10.2 + rust-core-foundation-sys-0.8.7 + rust-cpufeatures-0.3.0 + rust-crc32fast-1.5.0 + rust-crypto-common-0.2.2 + rust-curl-0.4.50 + rust-curl-sys-0.4.89+curl-8.20.0 + rust-dary-heap-0.3.9 + rust-digest-0.11.3 + rust-displaydoc-0.2.6 + rust-either-1.16.0 + rust-encoding-rs-0.8.35 + rust-equivalent-1.0.2 + rust-errno-0.3.14 + rust-find-msvc-tools-0.1.9 + rust-foldhash-0.2.0 + rust-form-urlencoded-1.2.2 + rust-futures-core-0.3.32 + rust-futures-task-0.3.32 + rust-futures-util-0.3.32 + rust-getrandom-0.4.3 + rust-glob-0.3.3 + rust-hashbrown-0.16.1 + rust-hybrid-array-0.4.12 + rust-iana-time-zone-0.1.65 + rust-iana-time-zone-haiku-0.1.2 + rust-icu-collections-2.2.0 + rust-icu-locale-core-2.2.0 + rust-icu-normalizer-2.2.0 + rust-icu-normalizer-data-2.2.0 + rust-icu-properties-2.2.0 + rust-icu-properties-data-2.2.0 + rust-icu-provider-2.2.0 + rust-idna-1.1.0 + rust-idna-adapter-1.2.2 + rust-is-terminal-polyfill-1.70.2 + rust-itertools-0.13.0 + rust-itoa-1.0.18 + rust-js-sys-0.3.102 + rust-libc-0.2.186 + rust-libflate-2.3.0 + rust-libflate-lz77-2.3.0 + rust-libloading-0.8.9 + rust-libxml-0.3.13 + rust-libz-sys-1.1.29 + rust-linux-raw-sys-0.12.1 + rust-litemap-0.8.2 + rust-log-0.4.33 + rust-md5-0.8.0 + rust-memchr-2.8.2 + rust-minimal-lexical-0.2.1 + rust-no-std-io2-0.9.4 + rust-nom-7.1.3 + rust-num-traits-0.2.19 + rust-once-cell-1.21.4 + rust-once-cell-polyfill-1.70.2 + rust-openssl-probe-0.1.6 + rust-openssl-src-300.6.1+3.6.3 + rust-openssl-sys-0.9.117 + rust-percent-encoding-2.3.2 + rust-pin-project-lite-0.2.17 + rust-pkg-config-0.3.33 + rust-potential-utf-0.1.5 + rust-proc-macro2-1.0.106 + rust-quote-1.0.45 + rust-r-efi-6.0.0 + rust-rand-0.10.1 + rust-rand-core-0.10.1 + rust-regex-1.12.4 + rust-regex-automata-0.4.14 + rust-regex-syntax-0.8.11 + rust-rle-decode-fast-1.0.3 + rust-rustc-hash-2.1.2 + rust-rustix-1.1.4 + rust-rustversion-1.0.22 + rust-schannel-0.1.29 + rust-serde-1.0.228 + rust-serde-core-1.0.228 + rust-serde-derive-1.0.228 + rust-serde-json-1.0.150 + rust-sha2-0.11.0 + rust-shlex-1.3.0 + rust-shlex-2.0.1 + rust-similar-3.1.1 + rust-slab-0.4.12 + rust-smallvec-1.15.2 + rust-socket2-0.6.4 + rust-stable-deref-trait-1.2.1 + rust-strsim-0.11.1 + rust-syn-2.0.118 + rust-synstructure-0.13.2 + rust-terminal-size-0.4.4 + rust-tinystr-0.8.3 + rust-toml-0.5.11 + rust-typenum-1.20.1 + rust-unicode-ident-1.0.24 + rust-url-2.5.8 + rust-utf8-iter-1.0.4 + rust-utf8parse-0.2.2 + rust-uuid-1.23.3 + rust-vcpkg-0.2.15 + rust-wasm-bindgen-0.2.125 + rust-wasm-bindgen-macro-0.2.125 + rust-wasm-bindgen-macro-support-0.2.125 + rust-wasm-bindgen-shared-0.2.125 + rust-windows-core-0.62.2 + rust-windows-implement-0.60.2 + rust-windows-interface-0.59.3 + rust-windows-link-0.2.1 + rust-windows-result-0.4.1 + rust-windows-strings-0.5.1 + rust-windows-sys-0.61.2 + rust-winres-0.1.12 + rust-writeable-0.6.3 + rust-xml-1.3.0 + rust-yoke-0.8.3 + rust-yoke-derive-0.8.2 + rust-zerofrom-0.1.8 + rust-zerofrom-derive-0.1.7 + rust-zerotrie-0.2.4 + rust-zerovec-0.11.6 + rust-zerovec-derive-0.11.3 + rust-zmij-1.0.21)) (hurrycurry => (list rust-adler2-2.0.1 rust-aho-corasick-1.1.4 diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index c74fc9e86b0..c7d7f142045 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -58,7 +58,7 @@ ;;; Copyright © 2022 cage ;;; Copyright © 2022 Pradana Aumars ;;; Copyright © 2022 Petr Hodina -;;; Copyright © 2022 jgart +;;; Copyright © 2022, 2026 jgart ;;; Copyright © 2023 Paul A. Patience ;;; Copyright © 2022 Bruno Victal ;;; Copyright © 2023 David Thompson @@ -198,6 +198,7 @@ #:use-module (gnu packages qt) #:use-module (gnu packages compiler-tools) #:use-module (gnu packages readline) + #:use-module (gnu packages rust) #:use-module (gnu packages sdl) #:use-module (gnu packages search) #:use-module (gnu packages serialization) @@ -9995,6 +9996,80 @@ concurrency, and return status.") ;; GPLv3+ with OpenSSL linking exception. (license license:gpl3+))) +(define-public hurl + (package + (name "hurl") + (version "8.0.1") + (source + (origin + ;; The crates.io tarball does not include the hurlfmt crate. + (method git-fetch) + (uri (git-reference + (url "https://github.com/Orange-OpenSource/hurl") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0wsw9khfznc638qzp8zx2zwgnrg5d160ky5gnslwm9frz3p5hp0d")))) + (build-system cargo-build-system) + (arguments + (list + #:install-source? #f + #:rust rust-1.94 + #:cargo-install-paths ''("packages/hurl" "packages/hurlfmt") + #:cargo-test-flags + '(list + ;; Excluding doctests since rust-1.94 does not support them. + "--lib" "--bins" "--tests") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'relax-rust-version + (lambda _ + ;; Upstream requires the latest stable Rust. + (substitute* '("packages/hurl/Cargo.toml" + "packages/hurlfmt/Cargo.toml") + (("rust-version = \"1.95.0\"") + "rust-version = \"1.94.0\"")))) + (add-before 'check 'start-test-server + (lambda _ + ;; The integration tests expect a Flask test server + ;; listening on port 8000. + (with-directory-excursion "integration/hurl" + (mkdir-p "build") + (spawn "python3" + '("python3" "server.py" + "--host" "127.0.0.1" "--port" "8000"))) + ;; Wait for the server to come up. + (let loop ((attempts 30)) + (unless (false-if-exception + (let ((s (socket PF_INET SOCK_STREAM 0))) + (connect s AF_INET + (inet-pton AF_INET "127.0.0.1") 8000) + (close-port s))) + (when (zero? attempts) + (error "test server did not start")) + (sleep 1) + (loop (1- attempts))))))))) + (native-inputs + (list clang + pkg-config + python + python-flask + python-waitress)) + (inputs + (cons* curl + libxml2 + openssl + zlib + (cargo-inputs 'hurl))) + (home-page "https://hurl.dev") + (synopsis "Run and test HTTP requests") + (description + "Hurl is a command line tool that runs HTTP requests defined in a plain +text format. It can chain requests, capture values and evaluate queries on +headers and body response. This package also provides @command{hurlfmt}, +a formatter and linter for Hurl files.") + (license license:asl2.0))) + (define-public gmnisrv (package (name "gmnisrv") -- cgit v1.2.3