summaryrefslogtreecommitdiff
path: root/gnu/packages/web.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/web.scm')
-rw-r--r--gnu/packages/web.scm77
1 files changed, 76 insertions, 1 deletions
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 @@
58;;; Copyright © 2022 cage <cage-dev@twistfold.it> 58;;; Copyright © 2022 cage <cage-dev@twistfold.it>
59;;; Copyright © 2022 Pradana Aumars <paumars@courrier.dev> 59;;; Copyright © 2022 Pradana Aumars <paumars@courrier.dev>
60;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com> 60;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
61;;; Copyright © 2022 jgart <jgart@dismail.de> 61;;; Copyright © 2022, 2026 jgart <jgart@dismail.de>
62;;; Copyright © 2023 Paul A. Patience <paul@apatience.com> 62;;; Copyright © 2023 Paul A. Patience <paul@apatience.com>
63;;; Copyright © 2022 Bruno Victal <mirai@makinata.eu> 63;;; Copyright © 2022 Bruno Victal <mirai@makinata.eu>
64;;; Copyright © 2023 David Thompson <dthompson2@worcester.edu> 64;;; Copyright © 2023 David Thompson <dthompson2@worcester.edu>
@@ -198,6 +198,7 @@
198 #:use-module (gnu packages qt) 198 #:use-module (gnu packages qt)
199 #:use-module (gnu packages compiler-tools) 199 #:use-module (gnu packages compiler-tools)
200 #:use-module (gnu packages readline) 200 #:use-module (gnu packages readline)
201 #:use-module (gnu packages rust)
201 #:use-module (gnu packages sdl) 202 #:use-module (gnu packages sdl)
202 #:use-module (gnu packages search) 203 #:use-module (gnu packages search)
203 #:use-module (gnu packages serialization) 204 #:use-module (gnu packages serialization)
@@ -9995,6 +9996,80 @@ concurrency, and return status.")
9995 ;; GPLv3+ with OpenSSL linking exception. 9996 ;; GPLv3+ with OpenSSL linking exception.
9996 (license license:gpl3+))) 9997 (license license:gpl3+)))
9997 9998
9999(define-public hurl
10000 (package
10001 (name "hurl")
10002 (version "8.0.1")
10003 (source
10004 (origin
10005 ;; The crates.io tarball does not include the hurlfmt crate.
10006 (method git-fetch)
10007 (uri (git-reference
10008 (url "https://github.com/Orange-OpenSource/hurl")
10009 (commit version)))
10010 (file-name (git-file-name name version))
10011 (sha256
10012 (base32 "0wsw9khfznc638qzp8zx2zwgnrg5d160ky5gnslwm9frz3p5hp0d"))))
10013 (build-system cargo-build-system)
10014 (arguments
10015 (list
10016 #:install-source? #f
10017 #:rust rust-1.94
10018 #:cargo-install-paths ''("packages/hurl" "packages/hurlfmt")
10019 #:cargo-test-flags
10020 '(list
10021 ;; Excluding doctests since rust-1.94 does not support them.
10022 "--lib" "--bins" "--tests")
10023 #:phases
10024 #~(modify-phases %standard-phases
10025 (add-after 'unpack 'relax-rust-version
10026 (lambda _
10027 ;; Upstream requires the latest stable Rust.
10028 (substitute* '("packages/hurl/Cargo.toml"
10029 "packages/hurlfmt/Cargo.toml")
10030 (("rust-version = \"1.95.0\"")
10031 "rust-version = \"1.94.0\""))))
10032 (add-before 'check 'start-test-server
10033 (lambda _
10034 ;; The integration tests expect a Flask test server
10035 ;; listening on port 8000.
10036 (with-directory-excursion "integration/hurl"
10037 (mkdir-p "build")
10038 (spawn "python3"
10039 '("python3" "server.py"
10040 "--host" "127.0.0.1" "--port" "8000")))
10041 ;; Wait for the server to come up.
10042 (let loop ((attempts 30))
10043 (unless (false-if-exception
10044 (let ((s (socket PF_INET SOCK_STREAM 0)))
10045 (connect s AF_INET
10046 (inet-pton AF_INET "127.0.0.1") 8000)
10047 (close-port s)))
10048 (when (zero? attempts)
10049 (error "test server did not start"))
10050 (sleep 1)
10051 (loop (1- attempts)))))))))
10052 (native-inputs
10053 (list clang
10054 pkg-config
10055 python
10056 python-flask
10057 python-waitress))
10058 (inputs
10059 (cons* curl
10060 libxml2
10061 openssl
10062 zlib
10063 (cargo-inputs 'hurl)))
10064 (home-page "https://hurl.dev")
10065 (synopsis "Run and test HTTP requests")
10066 (description
10067 "Hurl is a command line tool that runs HTTP requests defined in a plain
10068text format. It can chain requests, capture values and evaluate queries on
10069headers and body response. This package also provides @command{hurlfmt},
10070a formatter and linter for Hurl files.")
10071 (license license:asl2.0)))
10072
9998(define-public gmnisrv 10073(define-public gmnisrv
9999 (package 10074 (package
10000 (name "gmnisrv") 10075 (name "gmnisrv")