gnu: emacs-svg-icon: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / adns.scm
CommitLineData
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>
c1cb85bf 5;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
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
EF
54 (native-inputs
55 `(("m4" ,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
60functionality. The library is asynchronous, allowing several concurrent
61calls. The package also includes several command-line utilities for use in
62scripts.")
63 (license gpl3+)))
cd44f1c1
EF
64
65(define-public c-ares
e2931e99
RW
66 (package
67 (name "c-ares")
96630159 68 (version "1.16.0")
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
96630159 76 "129sm0wzij0mp8vdv68v18hnykcjb6ivi66wnqnnw598q7bql1fy"))))
674474f6 77 (replacement c-ares/fixed)
e8393ebe 78 (build-system gnu-build-system)
e2931e99
RW
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
85asynchronously. It is intended for applications which need to perform DNS
86queries without blocking, or need to perform multiple DNS queries in parallel.
87The primary examples of such applications are servers which communicate with
88multiple clients and programs with graphical user interfaces.")
89 (license (x11-style "https://c-ares.haxx.se/license.html"))))
c1cb85bf 90
674474f6
LLB
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
c1cb85bf
MB
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)))))