gnu: cvs-fast-export: Update to 1.56.
[jackhill/guix/guix.git] / gnu / packages / adns.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015, 2016, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
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)
26 #:use-module (guix build-system cmake)
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages m4)
29 #:use-module (gnu packages pkg-config))
30
31 (define-public adns
32 (package
33 (name "adns")
34 (version "1.6.0")
35 (source (origin
36 (method url-fetch)
37 (uri (list (string-append "mirror://gnu/adns/adns-"
38 version ".tar.gz")
39 (string-append
40 "https://www.chiark.greenend.org.uk/~ian/adns/ftp/adns-"
41 version ".tar.gz")))
42 (sha256
43 (base32
44 "1pi0xl07pav4zm2jrbrfpv43s1r1q1y12awgak8k7q41m5jp4hpv"))))
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))
54 (native-inputs
55 `(("m4" ,m4)))
56 (home-page "https://www.gnu.org/software/adns/")
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+)))
64
65 (define-public c-ares
66 (package
67 (name "c-ares")
68 (version "1.16.0")
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
76 "129sm0wzij0mp8vdv68v18hnykcjb6ivi66wnqnnw598q7bql1fy"))))
77 (replacement c-ares/fixed)
78 (build-system gnu-build-system)
79 (native-inputs
80 `(("pkg-config" ,pkg-config)))
81 (home-page "https://c-ares.haxx.se/")
82 (synopsis "C library for asynchronous DNS requests")
83 (description
84 "C-ares is a C library that performs DNS requests and name resolution
85 asynchronously. It is intended for applications which need to perform DNS
86 queries without blocking, or need to perform multiple DNS queries in parallel.
87 The primary examples of such applications are servers which communicate with
88 multiple clients and programs with graphical user interfaces.")
89 (license (x11-style "https://c-ares.haxx.se/license.html"))))
90
91 (define-public c-ares/fixed
92 (package
93 (inherit c-ares)
94 (name "c-ares")
95 (version "1.17.1")
96 (source (origin
97 (method url-fetch)
98 (uri (string-append
99 "https://c-ares.haxx.se/download/" name "-" version
100 ".tar.gz"))
101 (sha256
102 (base32
103 "0h7wjfnk2092glqcp9mqaax7xx0s13m501z1gi0gsjl2vvvd0gfp"))))
104 (arguments
105 `(;; FIXME: Some tests require network access
106 #:tests? #f))))
107
108 ;; gRPC requires a c-ares built with CMake in order to get the .cmake modules.
109 ;; We can not build c-ares itself with CMake because that would introduce a
110 ;; circular dependency through nghttp2.
111 ;; XXX: It would be nice if we could extract the modules somehow and make them
112 ;; work with the "normal" c-ares package instead of building a whole new library.
113 (define-public c-ares/cmake
114 (hidden-package
115 (package
116 (inherit c-ares)
117 (build-system cmake-build-system)
118 (arguments
119 `(;; XXX: Tests require name resolution (the normal variant runs no tests).
120 #:tests? #f)))))