From 7e90eb98a9d0e739d467d4096ab6662e4c58fe9b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 23 Nov 2019 12:39:20 +0100 Subject: 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. --- gnu/packages/ssh.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'gnu/packages/ssh.scm') 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") -- cgit v1.2.3