guix_mirror_bot pushed a commit to branch master
in repository guix.

commit f117a94d0c6d243b21b2ab8e9865860faa88ac70
Author: Danny Milosavljevic <[email protected]>
AuthorDate: Fri Jan 2 23:48:58 2026 +0100

    gnu: Add node-https-proxy-agent.
    
    * gnu/packages/node-xyz.scm (node-https-proxy-agent): New variable.
    
    Change-Id: Ib8566287facdf5585b1b0f240030b40fe845e588
---
 gnu/packages/node-xyz.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 36c4288149..a62df3b39c 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1569,6 +1569,55 @@ Node's @code{inherits} constructor that can be used in 
browsers, while
 defaulting to Node's implementation otherwise.")
     (license license:isc)))
 
+(define-public node-https-proxy-agent
+  (package
+    (name "node-https-proxy-agent")
+    (version "7.0.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/TooTallNate/proxy-agents";)
+             (commit (string-append "https-proxy-agent@" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0c02kcbfp63r1y36hrkhzkmn3gz6ad2s577js94776vza3r7r631"))))
+    (build-system node-build-system)
+    (arguments
+     (list
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'change-directory
+            (lambda _
+              (chdir "packages/https-proxy-agent")))
+          (add-after 'patch-dependencies 'delete-dev-dependencies
+            (lambda _
+              (modify-json (delete-dev-dependencies))))
+          (replace 'build
+            (lambda* (#:key inputs native-inputs #:allow-other-keys)
+              (let ((esbuild (search-input-file (or native-inputs inputs) 
"/bin/esbuild")))
+                (mkdir-p "dist")
+                (for-each
+                 (lambda (ts-file)
+                   (let* ((base (basename ts-file ".ts"))
+                          (js-file (string-append "dist/" base ".js")))
+                     (invoke esbuild ts-file
+                             (string-append "--outfile=" js-file)
+                             "--format=cjs"
+                             "--platform=node"
+                             "--target=es2020")))
+                 (find-files "src" "\\.ts$"))))))))
+    (native-inputs (list esbuild))
+    (inputs
+     (list node-agent-base node-debug))
+    (home-page "https://github.com/TooTallNate/proxy-agents";)
+    (synopsis "HTTPS proxy HTTP.Agent implementation")
+    (description "This package provides an @code{HTTP.Agent} implementation
+that connects to a specified HTTP or HTTPS proxy server, and can be used with
+the built-in https module.")
+    (license license:expat)))
+
 (define-public node-irc
   (package
     (name "node-irc")

Reply via email to