mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
gnu: Add node-https-proxy-agent.
* gnu/packages/node-xyz.scm (node-https-proxy-agent): New variable. Change-Id: Ib8566287facdf5585b1b0f240030b40fe845e588
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user