diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-11-23 12:39:20 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-11-23 12:39:20 +0100 |
commit | 7e90eb98a9d0e739d467d4096ab6662e4c58fe9b (patch) | |
tree | 9a47cad00ad71d584d597ad78bb83b10eb7c3946 | |
parent | 1d48f1da5a580bb757e5d31d2350f84929ca125a (diff) | |
download | guix-7e90eb98a9d0e739d467d4096ab6662e4c58fe9b.tar.gz guix-7e90eb98a9d0e739d467d4096ab6662e4c58fe9b.zip |
gnu: guile-ssh: Add "guile3.0-ssh" variant.
* gnu/packages/ssh.scm (guile-ssh)[source]: Substitute 'GUILE_PKG'
stanza in "configure.ac".
* gnu/packages/ssh.scm (guile3.0-ssh): New variable.
-rw-r--r-- | gnu/packages/ssh.scm | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index 807cbafb7c..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")) @@ -318,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") |