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")