summaryrefslogtreecommitdiff
path: root/gnu/packages/tor.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-05-30 12:23:00 +0200
committerLudovic Courtès <ludo@gnu.org>2022-05-30 16:34:39 +0200
commit7750f220bedb5f7a24e7429a4ccd794f9d07e4aa (patch)
tree3f8892070e4d7de2d8fb83cebc5843de7f506058 /gnu/packages/tor.scm
parent61d4f9e89da8471ecf4df93ab25c0d707797122a (diff)
gnu: tor: Record the file name of 'torsocks' in 'torify'.
* gnu/packages/tor.scm (tor)[arguments]: Add 'adjust-torify' phase. [inputs]: Add TORSOCKS.
Diffstat (limited to 'gnu/packages/tor.scm')
-rw-r--r--gnu/packages/tor.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm
index 277acf4754..4c4ccbb003 100644
--- a/gnu/packages/tor.scm
+++ b/gnu/packages/tor.scm
@@ -73,6 +73,16 @@
"--enable-zstd")
#:phases
#~(modify-phases %standard-phases
+ (add-before 'build 'adjust-torify
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Record in 'torify' the absolute file name of 'torsocks'.
+ (let ((torsocks (search-input-file
+ inputs "/bin/torsocks")))
+ (substitute* "contrib/client-tools/torify"
+ (("pathfind torsocks")
+ "true")
+ (("exec torsocks")
+ (string-append "exec " torsocks))))))
(add-before 'check 'skip-practracker
;; This is a style linter. It doesn't get to throw fatal errors.
(lambda _
@@ -98,6 +108,7 @@
(list libevent
libseccomp
openssl
+ torsocks
xz
zlib
`(,zstd "lib")))