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