aboutsummaryrefslogtreecommitdiff
path: root/whispers/packages/whispers.scm
diff options
context:
space:
mode:
authorRunciter2024-10-28 02:19:54 +0800
committerRunciter2024-10-28 02:19:54 +0800
commitaf5bbe630cb990daf9f29b307572f965ee9fa099 (patch)
tree86baaba3b27b4eec62cb8ec40692812854901a3f /whispers/packages/whispers.scm
downloadwhispers-af5bbe630cb990daf9f29b307572f965ee9fa099.tar.gz
Initial.
A .guix-authorizations A .guix-channel A COPYING A README A whispers/packages/dict.scm A whispers/packages/doc.scm A whispers/packages/pdf.scm A whispers/packages/sh.scm A whispers/packages/whispers.scm A whispers/services/console.scm A whispers/services/dict.scm A whispers/services/finance.scm A whispers/services/gps.scm A whispers/services/proton.scm A whispers/services/ssh-agent.scm A whispers/services/ssh-tunneler.scm A whispers/services/whispers.scm A whispers/services/whispers/finance.scm A whispers/services/whispers/gps.scm A whispers/services/whispers/mail.scm A whispers/services/whispers/ssh.scm A whispers/services/whispers/vpn.scm A whispers/services/whispers/xdg.scm A whispers/tests/ssh-tunneler.scm
Diffstat (limited to 'whispers/packages/whispers.scm')
-rw-r--r--whispers/packages/whispers.scm119
1 files changed, 119 insertions, 0 deletions
diff --git a/whispers/packages/whispers.scm b/whispers/packages/whispers.scm
new file mode 100644
index 0000000..2618635
--- /dev/null
+++ b/whispers/packages/whispers.scm
@@ -0,0 +1,119 @@
+;;; Whispers --- Stealth VPN and ssh tunneler
+;;; Copyright © 2023 Runciter <runciter@whispers-vpn.org>
+;;;
+;;; This file is part of Whispers.
+;;;
+;;; Whispers 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.
+;;;
+;;; Whispers 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 Whispers. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (whispers packages whispers)
+ #:use-module (gnu)
+ #:use-module (gnu packages package-management)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages gettext)
+ #:use-module (gnu packages texinfo)
+ #:use-module (gnu packages man)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages admin)
+ #:use-module (gnu packages guile)
+ #:use-module (gnu packages guile-xyz)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (guix packages)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix build-system guile)
+ #:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix git)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:export ())
+
+(define-public whispers
+ (let ((commit "2b583171c9480e129d0349d1cf9a580a9c8b19e6")
+ (chksum "13p02hdfnmkf5wr2d6acpcfix03crsn68wkvm73cmy0ibndjvczk"))
+ (package
+ (name "whispers")
+ (version "0.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.whispers-vpn.org/whispers-command.git")
+ (commit commit)))
+ (sha256 (base32 chksum))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:modules
+ ((ice-9 match)
+ (ice-9 ftw)
+ ,@%gnu-build-system-modules)
+ #:phases
+ (modify-phases
+ %standard-phases
+ (add-after
+ 'install
+ 'hall-wrap-binaries
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((compiled-dir
+ (lambda (out version)
+ (string-append
+ out
+ "/lib/guile/"
+ version
+ "/site-ccache")))
+ (uncompiled-dir
+ (lambda (out version)
+ (string-append
+ out
+ "/share/guile/site"
+ (if (string-null? version) "" "/")
+ version)))
+ (dep-path
+ (lambda (env modules path)
+ (list env
+ ":"
+ 'prefix
+ (cons modules
+ (map (lambda (input)
+ (string-append
+ (assoc-ref inputs input)
+ path))
+ ,''("guile-config"))))))
+ (out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin/"))
+ (site (uncompiled-dir out "")))
+ (match (scandir site)
+ (("." ".." version)
+ (for-each
+ (lambda (file)
+ (wrap-program
+ (string-append bin file)
+ (dep-path
+ "GUILE_LOAD_PATH"
+ (uncompiled-dir out version)
+ (uncompiled-dir "" version))
+ (dep-path
+ "GUILE_LOAD_COMPILED_PATH"
+ (compiled-dir out version)
+ (compiled-dir "" version))))
+ ,''("whispers"))
+ #t))))))))
+ (native-inputs
+ (list autoconf automake pkg-config texinfo))
+ (inputs (list guile-3.0))
+ (propagated-inputs (list guile-config))
+ (synopsis
+ "Perform actions of the services of the shepherd daemons of\na whispers tree.")
+ (description
+ "The whispers command is a simple convenience wrapper\n around the herd program. Instead of specifying a file path\nto the listening socket of a running shepherd in the whispers tree, the\nuser simply provides its absolute whispers tree path as an\nargument to the --lieutenant option of this command.")
+ (home-page "https://git.whispers-vpn.org/whispers-command.git")
+ (license license:gpl3+))))