Merge branch 'master' into core-updates
[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 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
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 adns)
22 #:use-module (guix licenses)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system cmake)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages pkg-config))
28
29 (define-public adns
30 (package
31 (name "adns")
32 (version "1.5.1")
33 (source (origin
34 (method url-fetch)
35 (uri (list (string-append "mirror://gnu/adns/adns-"
36 version ".tar.gz")
37 (string-append
38 "http://www.chiark.greenend.org.uk/~ian/adns/ftp/adns-"
39 version ".tar.gz")))
40 (sha256
41 (base32
42 "1ssfh94ck6kn98nf2yy6743srpgqgd167va5ja3bwx42igqjc42v"))))
43 (build-system gnu-build-system)
44 (arguments
45 ;; Make sure the programs under bin/ fine libadns.so.
46 '(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath -Wl,"
47 (assoc-ref %outputs "out")
48 "/lib"))
49
50 ;; XXX: Tests expect real name resolution to work.
51 #:tests? #f))
52 (home-page "https://www.gnu.org/software/adns/")
53 (synopsis "Asynchronous DNS client library and utilities")
54 (description
55 "GNU adns is a C library that provides easy-to-use DNS resolution
56 functionality. The library is asynchronous, allowing several concurrent
57 calls. The package also includes several command-line utilities for use in
58 scripts.")
59 (license gpl3+)))
60
61 (define-public c-ares
62 (package
63 (name "c-ares")
64 (version "1.15.0")
65 (source (origin
66 (method url-fetch)
67 (uri (string-append
68 "https://c-ares.haxx.se/download/" name "-" version
69 ".tar.gz"))
70 (sha256
71 (base32
72 "0lk8knip4xk6qzksdkn7085mmgm4ixfczdyyjw656c193y3rgnvc"))))
73 (build-system gnu-build-system)
74 (native-inputs
75 `(("pkg-config" ,pkg-config)))
76 (home-page "https://c-ares.haxx.se/")
77 (synopsis "C library for asynchronous DNS requests")
78 (description
79 "C-ares is a C library that performs DNS requests and name resolution
80 asynchronously. It is intended for applications which need to perform DNS
81 queries without blocking, or need to perform multiple DNS queries in parallel.
82 The primary examples of such applications are servers which communicate with
83 multiple clients and programs with graphical user interfaces.")
84 (license (x11-style "https://c-ares.haxx.se/license.html"))))