|
| 1 | +;;; guix.scm -- GNU Guix package definition. |
| 2 | + |
| 3 | +;; Copyright (C) 2022-2024 Artyom V. Poptsov <poptsov.artyom@gmail.com> |
| 4 | +;; |
| 5 | +;; This file is a part of Guile-SSH. |
| 6 | +;; |
| 7 | +;; Guile-SSH is free software: you can redistribute it and/or |
| 8 | +;; modify it under the terms of the GNU General Public License as |
| 9 | +;; published by the Free Software Foundation, either version 3 of the |
| 10 | +;; License, or (at your option) any later version. |
| 11 | +;; |
| 12 | +;; Guile-SSH is distributed in the hope that it will be useful, but |
| 13 | +;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | +;; General Public License for more details. |
| 16 | +;; |
| 17 | +;; You should have received a copy of the GNU General Public License |
| 18 | +;; along with Guile-SSH. If not, see |
| 19 | +;; <http://www.gnu.org/licenses/>. |
| 20 | + |
| 21 | + |
| 22 | +;;; Commentary: |
| 23 | + |
| 24 | +;; Use this file to build Guile-SSH with GNU Guix: |
| 25 | +;; |
| 26 | +;; guix build -f guix.scm |
| 27 | +;; |
| 28 | +;; By default Guile-SSH builds with libssh 0.10, but it is possible to switch |
| 29 | +;; it to libssh 0.9 by exporting an environment variable: |
| 30 | +;; |
| 31 | +;; export GUILE_SSH_BUILD_WITH_LIBSSH_0_9=1 |
| 32 | +;; guix build -f guix.scm |
| 33 | + |
| 34 | + |
| 35 | +;;; Code: |
| 36 | + |
1 | 37 | (use-modules (guix gexp) |
2 | 38 | ((guix licenses) #:prefix license:) |
3 | 39 | (guix packages) |
@@ -50,6 +86,20 @@ applications.") |
50 | 86 | (home-page "https://www.libssh.org") |
51 | 87 | (license license:lgpl2.1+))) |
52 | 88 |
|
| 89 | +(define-public libssh9 |
| 90 | + (package |
| 91 | + (inherit libssh) |
| 92 | + (name "libssh") |
| 93 | + (version "0.9.0") |
| 94 | + (source (origin |
| 95 | + (method url-fetch) |
| 96 | + (uri (string-append "https://www.libssh.org/files/" |
| 97 | + (version-major+minor version) |
| 98 | + "/libssh-" version ".tar.xz")) |
| 99 | + (sha256 |
| 100 | + (base32 |
| 101 | + "19f7h8s044pqfhfk35ky5lj4hvqhi2p2p46xkwbcsqz6jllkqc15")))))) |
| 102 | + |
53 | 103 | (define-public guile-ssh |
54 | 104 | (package |
55 | 105 | (name "guile-ssh") |
@@ -117,8 +167,17 @@ programs written in GNU Guile interpreter. It is a wrapper to the underlying |
117 | 167 | libssh library.") |
118 | 168 | (license license:gpl3+))) |
119 | 169 |
|
| 170 | +(define-public guile-ssh/libssh9 |
| 171 | + (package |
| 172 | + (inherit guile-ssh) |
| 173 | + (name "guile-ssh") |
| 174 | + (inputs (modify-inputs (package-inputs guile-ssh) |
| 175 | + (replace "libssh" libssh9))))) |
| 176 | + |
120 | 177 |
|
121 | 178 |
|
122 | | -guile-ssh |
| 179 | +(if (getenv "GUILE_SSH_BUILD_WITH_LIBSSH_0_9") |
| 180 | + guile-ssh/libssh9 |
| 181 | + guile-ssh) |
123 | 182 |
|
124 | 183 | ;;; guix.scm ends here. |
0 commit comments