gnu: packages: Use 'search-patches' everywhere.
[jackhill/guix/guix.git] / gnu / packages / tor.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
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 tor)
22 #:use-module ((guix licenses) #:select (bsd-3 gpl2+ gpl2))
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix git-download)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages libevent)
29 #:use-module (gnu packages compression)
30 #:use-module (gnu packages pcre)
31 #:use-module (gnu packages perl)
32 #:use-module (gnu packages python)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages tls)
35 #:use-module (gnu packages w3m))
36
37 (define-public tor
38 (package
39 (name "tor")
40 (version "0.2.7.6")
41 (source (origin
42 (method url-fetch)
43 (uri (string-append "https://www.torproject.org/dist/tor-"
44 version ".tar.gz"))
45 (sha256
46 (base32
47 "0p8hjlfi8dwghlyjif5s0q98cmpgz9kn9jja25430l04z5wqcfj9"))))
48 (build-system gnu-build-system)
49 (native-inputs
50 `(("python" ,python-2))) ; for tests
51 (inputs
52 `(("zlib" ,zlib)
53 ("openssl" ,openssl)
54 ("libevent" ,libevent)))
55
56 ;; TODO: Recommend `torsocks' since `torify' needs it.
57
58 (home-page "http://www.torproject.org/")
59 (synopsis "Anonymous network router to improve privacy on the Internet")
60 (description
61 "Tor protects you by bouncing your communications around a distributed
62 network of relays run by volunteers all around the world: it prevents
63 somebody watching your Internet connection from learning what sites you
64 visit, and it prevents the sites you visit from learning your physical
65 location. Tor works with many of your existing applications, including
66 web browsers, instant messaging clients, remote login, and other
67 applications based on the TCP protocol.")
68 (license bsd-3)))
69
70 (define-public torsocks
71 (package
72 (name "torsocks")
73 (version "2.0.0")
74 (source (origin
75 (method git-fetch)
76 (uri (git-reference
77 (url "https://git.torproject.org/torsocks.git")
78 (commit (string-append "v" version))))
79 (sha256
80 (base32
81 "0an2q5ail9z414riyjbkjkm29504hy778j914baz2gn5hlv2cfak"))
82 (file-name (string-append name "-" version "-checkout"))
83 (patches (search-patches "torsocks-dns-test.patch"))))
84 (build-system gnu-build-system)
85 (arguments
86 '(#:phases (modify-phases %standard-phases
87 (add-before 'configure 'bootstrap
88 (lambda _
89 (system* "autoreconf" "-vfi"))))))
90 (native-inputs `(("autoconf" ,(autoconf-wrapper))
91 ("automake" ,automake)
92 ("libtool" ,libtool)
93 ("perl-test-harness" ,perl-test-harness)))
94 (home-page "http://www.torproject.org/")
95 (synopsis "Use socks-friendly applications with Tor")
96 (description
97 "Torsocks allows you to use most socks-friendly applications in a safe
98 way with Tor. It ensures that DNS requests are handled safely and explicitly
99 rejects UDP traffic from the application you're using.")
100
101 ;; All the files explicitly say "version 2 only".
102 (license gpl2)))
103
104 (define-public privoxy
105 (package
106 (name "privoxy")
107 (version "3.0.24")
108 (source (origin
109 (method url-fetch)
110 (uri (string-append "mirror://sourceforge/ijbswa/Sources/"
111 version "%20%28stable%29/privoxy-"
112 version "-stable-src.tar.gz"))
113 (sha256
114 (base32
115 "04mhkz5g713i2crvjd6s783hhrlsjjjlfb9llbaf13ghg3fgd0d3"))))
116 (build-system gnu-build-system)
117 (arguments
118 '(;; The default 'sysconfdir' is $out/etc; change that to
119 ;; $out/etc/privoxy.
120 #:configure-flags (list (string-append "--sysconfdir="
121 (assoc-ref %outputs "out")
122 "/etc/privoxy"))
123 #:phases (alist-cons-after
124 'unpack 'autoconf
125 (lambda _
126 ;; Unfortunately, this is not a tarball produced by
127 ;; "make dist".
128 (zero? (system* "autoreconf" "-vfi")))
129 %standard-phases)
130 #:tests? #f))
131 (inputs
132 `(("w3m" ,w3m)
133 ("pcre" ,pcre)
134 ("zlib" ,zlib)
135 ("autoconf" ,autoconf)
136 ("automake" ,automake)))
137 (home-page "http://www.privoxy.org")
138 (synopsis "Web proxy with advanced filtering capabilities for enhancing privacy")
139 (description
140 "Privoxy is a non-caching web proxy with advanced filtering capabilities
141 for enhancing privacy, modifying web page data and HTTP headers, controlling
142 access, and removing ads and other obnoxious Internet junk. Privoxy has a
143 flexible configuration and can be customized to suit individual needs and
144 tastes. It has application for both stand-alone systems and multi-user
145 networks.")
146 (license gpl2+)))