diff options
Diffstat (limited to 'gnu/packages/ssh.scm')
-rw-r--r-- | gnu/packages/ssh.scm | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index fa1d32a0e0..b82d280089 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -65,6 +65,7 @@ #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (guix utils) #:use-module (srfi srfi-1)) (define-public libssh @@ -257,6 +258,11 @@ Additionally, various channel-specific options can be negotiated.") (substitute* "tests/server.scm" (("= %libssh-minor-version 7") ">= %libssh-minor-version 7")) + + ;; Allow builds with Guile 3.0. + (substitute* "configure.ac" + (("^GUILE_PKG.*$") + "GUILE_PKG([3.0 2.2 2.0])\n")) #t)))) (build-system gnu-build-system) (outputs '("out" "debug")) @@ -265,9 +271,6 @@ Additionally, various channel-specific options can be negotiated.") #:configure-flags '("--disable-static") #:phases (modify-phases %standard-phases - (add-after 'unpack 'autoreconf - (lambda* (#:key inputs #:allow-other-keys) - (invoke "autoreconf" "-vfi"))) (add-before 'build 'fix-libguile-ssh-file-name (lambda* (#:key outputs #:allow-other-keys) ;; Build and install libguile-ssh.so so that we can use @@ -321,6 +324,39 @@ libssh library.") (inputs `(("guile" ,guile-2.0) ,@(alist-delete "guile" (package-inputs guile-ssh)))))) +(define-public guile3.0-ssh + (package + (inherit guile-ssh) + (name "guile3.0-ssh") + (arguments + (substitute-keyword-arguments (package-arguments guile-ssh) + ((#:phases phases) + `(modify-phases ,phases + (add-before 'bootstrap 'delete-old-guile-m4 + (lambda _ + ;; The old 'guile.m4' that's shipped would fail to recognize + ;; Guile 2.9 as "3.0". + (delete-file "m4/guile.m4") + #t)) + (add-before 'build 'adjust-for-guile3 + (lambda _ + ;; Adjust for things that are deprecated in 2.2 and removed in + ;; 3.0. + (substitute* "tests/common.scm" + (("define-module \\(tests common\\)") + "define-module (tests common) + #:use-module (ice-9 threads)\n")) + (substitute* "modules/ssh/tunnel.scm" + (("define-module \\(ssh tunnel\\)") + "define-module (ssh tunnel) + #:use-module (ice-9 threads)")) + (substitute* "modules/srfi/srfi-64.upstream.scm" + (("_IOLBF") + "'line")) + #t)))))) + (inputs `(("guile" ,guile-next) + ,@(alist-delete "guile" (package-inputs guile-ssh)))))) + (define-public corkscrew (package (name "corkscrew") |