Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
cb58dd34 | 2 | ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> |
18d50d76 | 3 | ;;; |
233e7676 | 4 | ;;; This file is part of GNU Guix. |
18d50d76 | 5 | ;;; |
233e7676 | 6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
18d50d76 LC |
7 | ;;; under the terms of the GNU General Public License as published by |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
9 | ;;; your option) any later version. | |
10 | ;;; | |
233e7676 | 11 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
18d50d76 LC |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | ;;; GNU General Public License for more details. | |
15 | ;;; | |
16 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
18d50d76 | 18 | |
1ffa7090 | 19 | (define-module (gnu packages lsh) |
4a44e743 | 20 | #:use-module (guix licenses) |
18d50d76 LC |
21 | #:use-module (guix packages) |
22 | #:use-module (guix download) | |
23 | #:use-module (guix build-system gnu) | |
59a43334 | 24 | #:use-module (gnu packages) |
1ffa7090 LC |
25 | #:use-module (gnu packages m4) |
26 | #:use-module (gnu packages linux) | |
96a8259a | 27 | #:use-module (gnu packages nettle) |
b5b73a82 | 28 | #:use-module ((gnu packages compression) #:prefix guix:) |
1ffa7090 LC |
29 | #:use-module (gnu packages multiprecision) |
30 | #:use-module (gnu packages readline) | |
31 | #:use-module (gnu packages gperf) | |
cb58dd34 | 32 | #:use-module (gnu packages guile)) |
18d50d76 LC |
33 | |
34 | (define-public liboop | |
35 | (package | |
36 | (name "liboop") | |
37 | (version "1.0") | |
38 | (source | |
39 | (origin | |
40 | (method url-fetch) | |
41 | (uri (string-append "http://download.ofb.net/liboop/liboop-" | |
42 | version ".tar.gz")) | |
43 | (sha256 | |
44 | (base32 | |
c5916538 MW |
45 | "0z6rlalhvfca64jpvksppc9bdhs7jwhiw4y35g5ibvh91xp3rn1l")) |
46 | (patches (list (search-patch "liboop-mips64-deplibs-fix.patch"))))) | |
18d50d76 | 47 | (build-system gnu-build-system) |
82323a80 LC |
48 | (home-page "http://www.lysator.liu.se/liboop/") |
49 | (synopsis "Event loop library") | |
50 | (description "Liboop is a low-level event loop management library for | |
35b9e423 EB |
51 | POSIX-based operating systems. It supports the development of modular, |
52 | multiplexed applications which may respond to events from several sources. It | |
82323a80 LC |
53 | replaces the \"select() loop\" and allows the registration of event handlers |
54 | for file and network I/O, timers and signals. Since processes use these | |
55 | mechanisms for almost all external communication, liboop can be used as the | |
56 | basis for almost any application.") | |
4a44e743 | 57 | (license lgpl2.1+))) |
18d50d76 LC |
58 | |
59 | (define-public lsh | |
60 | (package | |
61 | (name "lsh") | |
96a8259a | 62 | (version "2.1") |
b8461260 LC |
63 | (source (origin |
64 | (method url-fetch) | |
65 | (uri (string-append "mirror://gnu/lsh/lsh-" | |
66 | version ".tar.gz")) | |
67 | (sha256 | |
68 | (base32 | |
69 | "1qqjy9zfzgny0rkb27c8c7dfsylvb6n0ld8h3an2r83pmaqr9gwb")) | |
1faca892 | 70 | (modules '((guix build utils))) |
b8461260 LC |
71 | (snippet |
72 | '(begin | |
b8461260 LC |
73 | (substitute* "src/testsuite/functions.sh" |
74 | (("localhost") | |
75 | ;; Avoid host name lookups since they don't work in | |
76 | ;; chroot builds. | |
77 | "127.0.0.1") | |
78 | (("set -e") | |
79 | ;; Make tests more verbose. | |
80 | "set -e\nset -x")) | |
81 | ||
82 | (substitute* (find-files "src/testsuite" "-test$") | |
83 | (("localhost") "127.0.0.1")) | |
84 | ||
85 | (substitute* "src/testsuite/login-auth-test" | |
86 | (("/bin/cat") "cat")))))) | |
18d50d76 | 87 | (build-system gnu-build-system) |
cb58dd34 LC |
88 | (native-inputs |
89 | `(("m4" ,m4) | |
90 | ("guile" ,guile-2.0) | |
91 | ("gperf" ,gperf) | |
92 | ("psmisc" ,psmisc))) ; for `killall' | |
18d50d76 | 93 | (inputs |
96a8259a LC |
94 | `(("nettle" ,nettle) |
95 | ("linux-pam" ,linux-pam) | |
0da01f40 LC |
96 | |
97 | ;; 'rl.c' uses the 'CPPFunction' type, which is no longer in | |
98 | ;; Readline 6.3. | |
99 | ("readline" ,readline-6.2) | |
100 | ||
18d50d76 | 101 | ("liboop" ,liboop) |
4a44e743 | 102 | ("zlib" ,guix:zlib) |
cb58dd34 | 103 | ("gmp" ,gmp))) |
18d50d76 | 104 | (arguments |
96a8259a | 105 | '(;; Skip the `configure' test that checks whether /dev/ptmx & |
18d50d76 LC |
106 | ;; co. work as expected, because it relies on impurities (for |
107 | ;; instance, /dev/pts may be unavailable in chroots.) | |
108 | #:configure-flags '("lsh_cv_sys_unix98_ptys=yes") | |
109 | ||
110 | ;; FIXME: Tests won't run in a chroot, presumably because | |
111 | ;; /etc/profile is missing, and thus clients get an empty $PATH | |
112 | ;; and nothing works. | |
113 | #:tests? #f | |
114 | ||
115 | #:phases | |
116 | (alist-cons-before | |
aebaeaee LC |
117 | 'configure 'pre-configure |
118 | (lambda* (#:key inputs #:allow-other-keys) | |
119 | ;; Make sure 'lsh' and 'lshd' pick 'sexp-conv' in the right place by | |
120 | ;; default. | |
121 | (substitute* "src/environ.h.in" | |
122 | (("^#define PATH_SEXP_CONV.*") | |
123 | (let* ((nettle (assoc-ref inputs "nettle")) | |
124 | (sexp-conv (string-append nettle "/bin/sexp-conv"))) | |
125 | (string-append "#define PATH_SEXP_CONV \"" | |
126 | sexp-conv "\"\n")))) | |
127 | ||
18d50d76 | 128 | ;; Tests rely on $USER being set. |
b8461260 | 129 | (setenv "USER" "guix")) |
18d50d76 LC |
130 | %standard-phases))) |
131 | (home-page "http://www.lysator.liu.se/~nisse/lsh/") | |
f50d2669 | 132 | (synopsis "GNU implementation of the Secure Shell (ssh) protocols") |
18d50d76 | 133 | (description |
79c311b8 | 134 | "GNU lsh is a free implementation of the SSH version 2 protocol. It is |
a22dc0c4 LC |
135 | used to create a secure line of communication between two computers, |
136 | providing shell access to the server system from the client. It provides | |
137 | both the server daemon and the client application, as well as tools for | |
138 | manipulating key files.") | |
4a44e743 | 139 | (license gpl2+))) |