unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add Tor client only package definition
@ 2020-05-17  3:11 Andre Batista
  2020-05-24 20:51 ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Andre Batista @ 2020-05-17  3:11 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 495 bytes --]

Hello Guix,

Starting on version 0.4.3.5, Tor provides a configuration flag to
disable relay code (--disable-module-relay). Considering most
people are running clients, not relays, I thought it would be
nice for guix to have a client-only package definition (maybe
it could even be the default?). What do you think?

I've tested the code below and it works as expected on my guix
install. However, since I'm neither a schemer nor guixpert, fell
free to teach me how to do it the guix way.

----

[-- Attachment #1.2: diff.txt --]
[-- Type: text/plain, Size: 825 bytes --]

--- a/gnu/packages/tor.scm	2020-05-16 23:35:47.690031277 -0300
+++ b/gnu/packages/tor.scm	2020-05-16 23:47:11.291254106 -0300
@@ -91,6 +91,20 @@
 the application layer) you need to install @code{torsocks}.")
     (license license:bsd-3)))
 
+ (define-public tor-client
+   (package
+     (inherit tor)
+     (name "tor-client")
+     (arguments
+      `(#:configure-flags
+        `(,@(cons "--disable-module-relay"
+             ,(cadr (package-arguments tor))))))
+     (synopsis "Client to the anonymous Tor network")
+     (description
+      (string-append (package-description tor)
+       "\n\nThis package only provides the client funcionality to the Tor
+Network.  If you want to setup a relay you need to install @code{tor}."))))
+
 (define-public torsocks
   (package
     (name "torsocks")

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 841 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-07-03 20:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-17  3:11 [PATCH] Add Tor client only package definition Andre Batista
2020-05-24 20:51 ` Ludovic Courtès
2020-05-26 14:56   ` Andre Batista
2020-05-31 19:40     ` André Batista
2020-05-31 23:42       ` Andre Batista
2020-06-03  4:49         ` Andre Batista
2020-06-16 22:59           ` André Batista
2020-07-02  9:36             ` Ludovic Courtès
2020-07-03 20:24               ` André Batista

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).