gnu: corkscrew: Update to 2.0-0.268b71e.

* gnu/packages/ssh.scm (corkscrew)[source]: Fetch from elsewhere.
[arguments]: Add #:configure-flags of ‘--enable-ssl’.
Add a new 'update-metadata phase.  Remove the custom 'configure phase.
[native-inputs]: Add autoconf, automake, and pkg-config.
[inputs]: Add openssl.
[description]: Update accordingly.
This commit is contained in:
Tobias Geerinckx-Rice 2021-04-04 13:11:40 +02:00
parent 719dd9b45f
commit b692a1bb45
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -403,48 +403,57 @@ (define-public guile3.0-ssh
(deprecated-package "guile3.0-ssh" guile-ssh)) (deprecated-package "guile3.0-ssh" guile-ssh))
(define-public corkscrew (define-public corkscrew
(package ;; The last 2.0 release hails from 2009. Use a fork (submitted upstream as
(name "corkscrew") ;; <https://github.com/patpadgett/corkscrew/pull/5>) that adds now-essential
(version "2.0") ;; IPv6 and TLS support.
(source (let ((revision "0")
(origin (commit "268b71e88ee51fddceab96d665b327394f1feb12"))
(method git-fetch) (package
(uri (git-reference (name "corkscrew")
(url "https://github.com/patpadgett/corkscrew") (version (git-version "2.0" revision commit))
(commit (string-append "v" version)))) (source
(sha256 (origin
(base32 "0g4pkczrc1zqpnxyyjwcjmyzdj5qqcpzwf1bm3965zdwp94bpppf")) (method git-fetch)
(file-name (git-file-name name version)))) (uri (git-reference
(build-system gnu-build-system) (url "https://github.com/rtgill82/corkscrew")
(arguments (commit commit)))
`(#:phases (sha256
(modify-phases %standard-phases (base32 "1rylbimlfig3ii4bqr4r058lkc43pqkxnxqpqdpm31blh3xs0dcw"))
(replace 'configure (file-name (git-file-name name version))))
;; Replace configure phase as the ./configure script does not like (build-system gnu-build-system)
;; CONFIG_SHELL and SHELL passed as parameters. (arguments
(lambda* (#:key outputs build target #:allow-other-keys) `(#:configure-flags
(let* ((out (assoc-ref outputs "out")) (list "--enable-ssl")
(bash (which "bash")) #:phases
;; Set --build and --host flags as the provided config.guess (modify-phases %standard-phases
;; is not able to detect them. (add-after 'unpack 'update-metadata
(flags `(,(string-append "--prefix=" out) (lambda _
,(string-append "--build=" build) (substitute* "configure.ac"
,(string-append "--host=" (or target build))))) ;; Our version differs significantly.
(setenv "CONFIG_SHELL" bash) (("2.0") (string-append ,version " (Guix)")))
(apply invoke bash "./configure" flags)))) (substitute* "corkscrew.c"
(add-after 'install 'install-documentation ;; This domain's since been squat.
(lambda* (#:key outputs #:allow-other-keys) (("\\(agroman@agroman\\.net\\)")
(let* ((out (assoc-ref outputs "out")) (format #f "<~a>" ,(package-home-page this-package))))))
(doc (string-append out "/share/doc/" ,name "-" ,version))) (add-after 'install 'install-documentation
(install-file "README.markdown" doc) (lambda* (#:key outputs #:allow-other-keys)
#t)))))) (let* ((out (assoc-ref outputs "out"))
(home-page "https://github.com/patpadgett/corkscrew") (doc (string-append out "/share/doc/" ,name "-" ,version)))
(synopsis "SSH tunneling through HTTP(S) proxies") (install-file "README.md" doc)
(description #t))))))
"Corkscrew tunnels SSH connections through most HTTP and HTTPS proxies. (native-inputs
Proxy authentication is only supported through the plain-text HTTP basic `(("autoconf" ,autoconf)
authentication scheme.") ("automake" ,automake)
(license license:gpl2+))) ("pkg-config" ,pkg-config)))
(inputs
`(("openssl" ,openssl)))
(home-page "https://github.com/patpadgett/corkscrew")
(synopsis "SSH tunneling through HTTP(S) proxies")
(description
"Corkscrew tunnels SSH connections through most HTTP and HTTPS proxies.
It supports proxy authentication through the HTTP basic authentication scheme
with optional @acronym{TLS, Transport-Level Security} to protect credentials.")
(license license:gpl2+))))
(define-public mosh (define-public mosh
(package (package