Commit | Line | Data |
---|---|---|
af09dabf SB |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org> | |
36de28ff | 3 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
45151bcb | 4 | ;;; Copyright © 2019 Andrew Miloradovsky <andrew@interpretmath.pw> |
af09dabf SB |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
9 | ;;; under the terms of the GNU General Public License as published by | |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
13 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
20 | ||
21 | (define-module (gnu packages cluster) | |
22 | #:use-module ((guix licenses) #:prefix license:) | |
23 | #:use-module (guix build-system gnu) | |
24 | #:use-module (guix download) | |
befac358 | 25 | #:use-module (guix git-download) |
af09dabf | 26 | #:use-module (guix packages) |
45151bcb AM |
27 | #:use-module (gnu packages autotools) |
28 | #:use-module (gnu packages gettext) | |
27f8d98f | 29 | #:use-module (gnu packages libevent) |
af09dabf SB |
30 | #:use-module (gnu packages linux) |
31 | #:use-module (gnu packages pkg-config) | |
9d0c291e | 32 | #:use-module (gnu packages sphinx) |
670a5e54 | 33 | #:use-module (gnu packages texinfo) |
af09dabf SB |
34 | #:use-module (gnu packages tls)) |
35 | ||
36 | (define-public keepalived | |
37 | (package | |
38 | (name "keepalived") | |
5e5b884e | 39 | (version "2.0.19") |
af09dabf SB |
40 | (source (origin |
41 | (method url-fetch) | |
42 | (uri (string-append | |
43 | "http://www.keepalived.org/software/keepalived-" | |
44 | version ".tar.gz")) | |
45 | (sha256 | |
46 | (base32 | |
5e5b884e | 47 | "19scrrjsxw5g914d5ka352445blaq77dk2vm4vxabijvfra88bqf")))) |
af09dabf SB |
48 | (build-system gnu-build-system) |
49 | (arguments | |
50 | '(#:phases | |
51 | (modify-phases %standard-phases | |
670a5e54 SB |
52 | (add-after 'build 'build-info |
53 | (lambda _ | |
54 | (invoke "make" "-C" "doc" "texinfo") | |
55 | ;; Put images in a subdirectory as recommended by 'texinfo'. | |
2ac02060 | 56 | (install-file "doc/source/images/software_design.png" |
670a5e54 SB |
57 | "doc/build/texinfo/keepalived-figures") |
58 | (substitute* "doc/build/texinfo/keepalived.texi" | |
59 | (("@image\\{software_design,") | |
60 | "@image{keepalived-figures/software_design,")) | |
61 | (invoke "make" "-C" "doc/build/texinfo"))) | |
62 | (add-after 'install 'install-info | |
63 | (lambda* (#:key outputs #:allow-other-keys) | |
64 | (let* ((out (assoc-ref outputs "out")) | |
65 | (infodir (string-append out "/share/info"))) | |
66 | (install-file "doc/build/texinfo/keepalived.info" infodir) | |
2ac02060 | 67 | (install-file "doc/source/images/software_design.png" |
670a5e54 SB |
68 | (string-append infodir "/keepalived-figures")) |
69 | #t)))))) | |
af09dabf SB |
70 | (native-inputs |
71 | `(("pkg-config" ,pkg-config) | |
670a5e54 SB |
72 | ("python-sphinx" ,python-sphinx) |
73 | ("texinfo" ,texinfo))) | |
af09dabf SB |
74 | (inputs |
75 | `(("openssl" ,openssl) | |
76 | ("libnfnetlink" ,libnfnetlink) | |
77 | ("libnl" ,libnl))) | |
d1bfad2f | 78 | (home-page "https://www.keepalived.org/") |
34a05e8f | 79 | (synopsis "Load balancing and high-availability frameworks") |
af09dabf SB |
80 | (description |
81 | "Keepalived provides frameworks for both load balancing and high | |
82 | availability. The load balancing framework relies on the Linux Virtual | |
34a05e8f TGR |
83 | Server (@dfn{IPVS}) kernel module. High availability is achieved by the Virtual |
84 | Redundancy Routing Protocol (@dfn{VRRP}). Each Keepalived framework can be used | |
af09dabf SB |
85 | independently or together to provide resilient infrastructures.") |
86 | (license license:gpl2+))) | |
45151bcb AM |
87 | |
88 | (define-public libraft | |
89 | (package | |
90 | (name "libraft") | |
27f8d98f | 91 | (version "0.9.11") |
befac358 | 92 | (home-page "https://github.com/canonical/raft") |
45151bcb | 93 | (source (origin |
befac358 LC |
94 | (method git-fetch) |
95 | (uri (git-reference (url home-page) | |
96 | (commit (string-append "v" version)))) | |
97 | (file-name (git-file-name name version)) | |
45151bcb AM |
98 | (sha256 |
99 | (base32 | |
27f8d98f AM |
100 | "00rsq4z9nykmf7r5rlpv1y6bvckcmg3zv57vh1h681y5pij6cch1")))) |
101 | (arguments '(#:configure-flags '("--enable-uv") | |
102 | #:phases | |
103 | (modify-phases %standard-phases | |
104 | (add-after 'unpack 'disable-failing-tests | |
105 | (lambda _ | |
106 | (substitute* "Makefile.am" | |
107 | ((".*test_uv_append.c.*") "")) | |
108 | #t))))) | |
109 | (inputs | |
110 | `(("libuv" ,libuv))) | |
45151bcb AM |
111 | (native-inputs |
112 | `(("autoconf" ,autoconf) | |
113 | ("automake" ,automake) | |
114 | ("gettext" ,gettext-minimal) | |
115 | ("libtool" ,libtool) | |
116 | ("pkg-config" ,pkg-config))) | |
117 | (build-system gnu-build-system) | |
45151bcb AM |
118 | (synopsis "C implementation of the Raft consensus protocol") |
119 | (description "The library has modular design: its core part implements only | |
120 | the core Raft algorithm logic, in a fully platform independent way. On top of | |
121 | that, a pluggable interface defines the I/O implementation for networking | |
122 | (send/receive RPC messages) and disk persistence (store log entries and | |
123 | snapshots).") | |
124 | (license license:asl2.0))) |