From 7c849173505d8edbc6f9f56d136ddf5431672a67 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Sun, 28 Dec 2025 22:20:44 +0100 Subject: [PATCH] gnu: httpstat: Update to 1.3.2. * gnu/packages/networking.scm (httpstat): Update to 1.3.2. [build-system]: Switch to pyproject-build-system. [arguments]: Improve style. <#:tests?>: Disable them. <#:phases>: Replace 'check phase. [native-inputs]: Add python-setuptools. Change-Id: Ic5797b3d5ed6319a70364a724662ebfb8b1ef9c2 Signed-off-by: Sharlatan Hellseher --- gnu/packages/networking.scm | 40 +++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index f884896350a48ba825872ad9184e314d03a3b34d..447e89f59aaf068c97f762abd765e05aa42f420f 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -2196,7 +2196,7 @@ application stack itself.") (define-public httpstat (package (name "httpstat") - (version "1.3.1") + (version "1.3.2") (source (origin (method git-fetch) @@ -2205,23 +2205,29 @@ application stack itself.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0cw8299a080m42slsimz31xs0gjnh833gpbj2dsr4hkcinrn4iyd")))) - (build-system python-build-system) - (inputs (list curl)) + (base32 "1z0m00wzbd1y9knypvw425h4qjqyp4x162j7crpgmfic1wpwbqbl")))) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (add-before 'build 'fix-curl-path - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "httpstat.py" - (("ENV_CURL_BIN.get\\('curl'\\)") - (string-append "ENV_CURL_BIN.get('" - (assoc-ref inputs "curl") - "/bin/curl')")) - ;; "curl -w time_*" units seems to have - ;; changed from seconds to nanoseconds. - (("d\\[k\\] \\* 1000") "d[k] / 1000")) - #t))))) + (list + #:tests? #f ; Tests require network access. + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'fix-curl-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "httpstat.py" + (("ENV_CURL_BIN.get\\('curl'\\)") + (format #f "ENV_CURL_BIN.get(~s)" + (search-input-file inputs "/bin/curl"))) + ;; "curl -w time_*" units seems to have + ;; changed from seconds to nanoseconds. + (("d\\[k\\] \\* 1000") + "d[k] / 1000")) #t)) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "bash" "httpstat_test.sh"))))))) + (native-inputs (list python-setuptools)) + (inputs (list curl)) (home-page "https://github.com/reorx/httpstat") (synopsis "Visualize curl statistics") (description