From cc9094d322e538ee65911217da74c242842354ef Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 8 Sep 2024 02:00:00 +0200 Subject: gnu: sshuttle: Install man{,ual}. * gnu/packages/vpn.scm (sshuttle)[arguments]: Add a new 'install-documentation phase. Import required modules. [native-inputs]: Add python-sphinx and texinfo. Change-Id: Ia4706c5348b38faf9e79caa41281e71f78399626 --- gnu/packages/vpn.scm | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) (limited to 'gnu/packages/vpn.scm') diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm index bc067260fd9..4cb871feb25 100644 --- a/gnu/packages/vpn.scm +++ b/gnu/packages/vpn.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2015 Jeff Mickey ;;; Copyright © 2016, 2017, 2019, 2021, 2022, 2024 Efraim Flashner -;;; Copyright © 2016–2022 Tobias Geerinckx-Rice +;;; Copyright © 2016–2022, 2024 Tobias Geerinckx-Rice ;;; Copyright © 2017 Julien Lepiller ;;; Copyright © 2018, 2020 Pierre Langlois ;;; Copyright © 2018 Meiyo Peng @@ -90,6 +90,8 @@ #:use-module (gnu packages python-web) #:use-module (gnu packages qt) #:use-module (gnu packages samba) + #:use-module (gnu packages sphinx) + #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) #:use-module (gnu packages webkit) #:use-module (gnu packages xml)) @@ -995,14 +997,37 @@ private network between hosts on the internet.") (base32 "01hd7z7gxkc2bjxndnv5dw1x98qcakxli9k8w285iq2b7d786f7f")))) (build-system pyproject-build-system) (arguments - (list #:phases + (list #:modules + `((guix build pyproject-build-system) + (guix build utils) + (ice-9 match) + (srfi srfi-26)) + #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-FHS-file-names (lambda _ (substitute* "sshuttle/client.py" (("/usr/bin/env") (which "env"))) (substitute* "sshuttle/ssh.py" - (("/bin/sh") "sh"))))))) + (("/bin/sh") "sh")))) + (add-after 'install 'install-documentation + (lambda _ + (with-directory-excursion "docs" + (invoke "make" "info" "man") + (with-directory-excursion "_build" + (define (install-man-page file) + (match (string-split file #\.) + ((_ ... section) + (install-file file + (string-append #$output + "/share/man/man" + section))))) + + (for-each install-man-page + (find-files "man" "\\.[0-9]$")) + (for-each (cut install-file <> + (string-append #$output "/share/info")) + (find-files "texinfo" "\\.info$"))))))))) (native-inputs (list python-setuptools-scm ;; For tests only. @@ -1010,7 +1035,10 @@ private network between hosts on the internet.") python-mock python-poetry-core python-pytest-cov - python-pytest-runner)) + python-pytest-runner + ;; For documentation only. + python-sphinx + texinfo)) (home-page "https://github.com/sshuttle/sshuttle") (synopsis "VPN that transparently forwards connections over SSH") (description "sshuttle creates an encrypted virtual private network (VPN) -- cgit v1.2.3