;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2021 Ludovic Courtès ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2016-2018, 2020-2023 Efraim Flashner ;;; Copyright © 2016, 2017 Nikita ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice ;;; Copyright © 2017, 2018, 2019, 2021, 2023 Eric Bavier ;;; Copyright © 2017 Rutger Helling ;;; Copyright © 2018, 2022 Ricardo Wurmus ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Brice Waegeneire ;;; Copyright © 2020 André Batista ;;; Copyright © 2021-2023 Danial Behzadi ;;; Copyright © 2022 Maxim Cournoyer ;;; Copyright © 2022 Jim Newsome ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages tor) #:use-module (guix gexp) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix build-system pyproject) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages pcre) #:use-module (gnu packages freedesktop) #:use-module (gnu packages glib) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-check) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages autotools) #:use-module (gnu packages tls) #:use-module (gnu packages w3m) #:use-module (gnu packages xorg)) (define-public tor (package (name "tor") (version "0.4.8.12") (source (origin (method url-fetch) (uri (string-append "https://dist.torproject.org/tor-" version ".tar.gz")) (sha256 (base32 "0x68p3dhmmvbrd6shcxk1zx8kmsdh17w2g1giyslfdwfv4swfz6a")))) (build-system gnu-build-system) (arguments (list #:configure-flags #~(list "--enable-gpl" "--enable-lzma" "--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 _ (setenv "TOR_DISABLE_PRACTRACKER" "set"))) #$@(if (or (target-x86-64?) (target-x86-32?)) '() ;; Work around upstream issues relating to libseccomp, ;; sandboxing and glibc-2.33. This is similar to the issue ;; the tor-sandbox-i686 patch fixes but for other architectures. ;; https://gitlab.torproject.org/tpo/core/tor/-/issues/40381 ;; https://gitlab.torproject.org/tpo/core/tor/-/issues/40599 ;; https://2023-04-02services: replace bare serializers with (serializer ...)...Bruno Victal 2023-03-28