Browse Source

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.
gn-latest-20200428
Ludovic Courtès 2 years ago
parent
commit
7e90eb98a9
No known key found for this signature in database GPG Key ID: 90B11993D9AEBB5
  1. 39
      gnu/packages/ssh.scm

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

Loading…
Cancel
Save