gnu: ruby-pandoc-ruby: Use pandoc instead of ghc-pandoc.
[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 (build-system gnu-build-system)
78 (native-inputs
79 `(("pkg-config" ,pkg-config)))
80 (home-page "https://c-ares.haxx.se/")
81 (synopsis "C library for asynchronous DNS requests")
82 (description
83 "C-ares is a C library that performs DNS requests and name resolution
84 asynchronously. It is intended for applications which need to perform DNS
85 queries without blocking, or need to perform multiple DNS queries in parallel.
86 The primary examples of such applications are servers which communicate with
87 multiple clients and programs with graphical user interfaces.")
88 (license (x11-style "https://c-ares.haxx.se/license.html"))))
89
90 ;; gRPC requires a c-ares built with CMake in order to get the .cmake modules.
91 ;; We can not build c-ares itself with CMake because that would introduce a
92 ;; circular dependency through nghttp2.
93 ;; XXX: It would be nice if we could extract the modules somehow and make them
94 ;; work with the "normal" c-ares package instead of building a whole new library.
95 (define-public c-ares/cmake
96 (hidden-package
97 (package
98 (inherit c-ares)
99 (build-system cmake-build-system)
100 (arguments
101 `(;; XXX: Tests require name resolution (the normal variant runs no tests).
102 #:tests? #f)))))