Commit | Line | Data |
---|---|---|
342005e7 LC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> | |
e73a016d | 3 | ;;; Copyright © 2015, 2016, 2018, 2020 Efraim Flashner <efraim@flashner.co.il> |
e2931e99 | 4 | ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> |
e2093c0f | 5 | ;;; Copyright © 2019, 2021 Marius Bakke <marius@gnu.org> |
342005e7 LC |
6 | ;;; |
7 | ;;; This file is part of GNU Guix. | |
8 | ;;; | |
9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
10 | ;;; under the terms of the GNU General Public License as published by | |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
14 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
21 | ||
22 | (define-module (gnu packages adns) | |
23 | #:use-module (guix licenses) | |
24 | #:use-module (guix packages) | |
25 | #:use-module (guix download) | |
e2931e99 | 26 | #:use-module (guix build-system cmake) |
cd44f1c1 | 27 | #:use-module (guix build-system gnu) |
e73a016d | 28 | #:use-module (gnu packages m4) |
cd44f1c1 | 29 | #:use-module (gnu packages pkg-config)) |
342005e7 LC |
30 | |
31 | (define-public adns | |
32 | (package | |
33 | (name "adns") | |
e73a016d | 34 | (version "1.6.0") |
342005e7 LC |
35 | (source (origin |
36 | (method url-fetch) | |
37 | (uri (list (string-append "mirror://gnu/adns/adns-" | |
38 | version ".tar.gz") | |
39 | (string-append | |
e73a016d EF |
40 | "https://www.chiark.greenend.org.uk/~ian/adns/ftp/adns-" |
41 | version ".tar.gz"))) | |
342005e7 LC |
42 | (sha256 |
43 | (base32 | |
e73a016d | 44 | "1pi0xl07pav4zm2jrbrfpv43s1r1q1y12awgak8k7q41m5jp4hpv")))) |
342005e7 LC |
45 | (build-system gnu-build-system) |
46 | (arguments | |
47 | ;; Make sure the programs under bin/ fine libadns.so. | |
48 | '(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath -Wl," | |
49 | (assoc-ref %outputs "out") | |
50 | "/lib")) | |
51 | ||
52 | ;; XXX: Tests expect real name resolution to work. | |
53 | #:tests? #f)) | |
e73a016d | 54 | (native-inputs |
8394619b | 55 | (list m4)) |
6fd52309 | 56 | (home-page "https://www.gnu.org/software/adns/") |
342005e7 LC |
57 | (synopsis "Asynchronous DNS client library and utilities") |
58 | (description | |
59 | "GNU adns is a C library that provides easy-to-use DNS resolution | |
60 | functionality. The library is asynchronous, allowing several concurrent | |
61 | calls. The package also includes several command-line utilities for use in | |
62 | scripts.") | |
63 | (license gpl3+))) | |
cd44f1c1 EF |
64 | |
65 | (define-public c-ares | |
e2931e99 RW |
66 | (package |
67 | (name "c-ares") | |
e486b2b6 | 68 | (version "1.17.2") |
e2931e99 RW |
69 | (source (origin |
70 | (method url-fetch) | |
71 | (uri (string-append | |
72 | "https://c-ares.haxx.se/download/" name "-" version | |
73 | ".tar.gz")) | |
74 | (sha256 | |
75 | (base32 | |
e486b2b6 | 76 | "0gcincjvpll2qmlc906jx6mfq97s87mgi0zby0753ki0rr2ch0s8")))) |
e8393ebe | 77 | (build-system gnu-build-system) |
e2093c0f | 78 | (arguments |
e486b2b6 MO |
79 | '(;; FIXME: Some tests require network access |
80 | #:tests? #f | |
81 | #:phases | |
e2093c0f MB |
82 | (modify-phases %standard-phases |
83 | (add-before 'check 'filter-live-tests | |
84 | (lambda _ | |
85 | ;; Filter tests that require internet access. | |
86 | (setenv "GTEST_FILTER" "-*.Live*:*.FamilyV4*")))))) | |
e2931e99 | 87 | (native-inputs |
8394619b | 88 | (list pkg-config)) |
e2931e99 RW |
89 | (home-page "https://c-ares.haxx.se/") |
90 | (synopsis "C library for asynchronous DNS requests") | |
91 | (description | |
92 | "C-ares is a C library that performs DNS requests and name resolution | |
93 | asynchronously. It is intended for applications which need to perform DNS | |
94 | queries without blocking, or need to perform multiple DNS queries in parallel. | |
95 | The primary examples of such applications are servers which communicate with | |
96 | multiple clients and programs with graphical user interfaces.") | |
97 | (license (x11-style "https://c-ares.haxx.se/license.html")))) | |
c1cb85bf MB |
98 | |
99 | ;; gRPC requires a c-ares built with CMake in order to get the .cmake modules. | |
100 | ;; We can not build c-ares itself with CMake because that would introduce a | |
101 | ;; circular dependency through nghttp2. | |
102 | ;; XXX: It would be nice if we could extract the modules somehow and make them | |
103 | ;; work with the "normal" c-ares package instead of building a whole new library. | |
104 | (define-public c-ares/cmake | |
105 | (hidden-package | |
106 | (package | |
107 | (inherit c-ares) | |
108 | (build-system cmake-build-system) | |
109 | (arguments | |
110 | `(;; XXX: Tests require name resolution (the normal variant runs no tests). | |
111 | #:tests? #f))))) | |
ecbf59ab JL |
112 | |
113 | (define-public c-ares-for-node | |
114 | (hidden-package | |
115 | (package | |
116 | (inherit c-ares) | |
117 | (name "c-ares") | |
118 | (version "1.18.1") | |
119 | (source (origin | |
120 | (method url-fetch) | |
121 | (uri (string-append | |
122 | "https://c-ares.haxx.se/download/" name "-" version | |
123 | ".tar.gz")) | |
124 | (sha256 | |
125 | (base32 | |
126 | "1kxviskwsaa7dcgscvssxa8ps88pdq7kq4z93gxvz7sam2l54z8s")))) | |
127 | (arguments | |
128 | '(#:phases | |
129 | (modify-phases %standard-phases | |
130 | (add-before 'check 'filter-live-tests | |
131 | (lambda _ | |
132 | ;; Filter tests that require internet access. | |
133 | (setenv "GTEST_FILTER" "-*.Live*:*.FamilyV4*"))))))))) |