[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#45284] [PATCH] gnu: protonvpn-cli: Stop propagating inputs.
From: |
Ryan Prior |
Subject: |
[bug#45284] [PATCH] gnu: protonvpn-cli: Stop propagating inputs. |
Date: |
Wed, 23 Dec 2020 03:38:08 +0000 |
* gnu/packages/vpn.scm (protonvpn-cli): Stop propagating inputs.
- Adds all necessary inputs.
- Wraps entrypoint to avoid propagation.
---
gnu/packages/vpn.scm | 37 +++++++++++++++++++++++++++++++------
1 file changed, 31 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index c1f0b65e84..72ca9ee31b 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -364,16 +364,41 @@ traversing network address translators (@dfn{NAT}s) and
firewalls.")
(sha256
(base32 "0y7v9ikrmy5dbjlpbpacp08gy838i8z54m8m4ps7ldk1j6kyia3n"))))
(build-system python-build-system)
- (arguments '(#:tests? #f)) ; no tests in repo
+ (arguments
+ '(#:tests? #f ; no tests in repo
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'wrap 'wrap-wrapper
+ ;; Wrap entrypoint with paths to its hard dependencies.
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((entrypoint (string-append (assoc-ref outputs "out")
"/bin/.protonvpn-real")))
+ (wrap-program entrypoint
+ `("PATH" ":" prefix
+ ,(map (lambda (name)
+ (let ((input (assoc-ref inputs name)))
+ (string-append input "/bin:"
+ input "/sbin")))
+ (list "dialog"
+ "iproute2"
+ "iptables"
+ "ncurses"
+ "openvpn"
+ "procps"
+ "which")))))
+ #t)))))
(native-inputs
`(("python-docopt" ,python-docopt)))
(inputs
- `(("python-jinja2" ,python-jinja2)
+ `(("dialog" ,dialog)
+ ("iproute2" ,iproute)
+ ("iptables" ,iptables)
+ ("ncurses" ,ncurses)
+ ("openvpn" ,openvpn)
+ ("procps" ,procps)
+ ("python-jinja2" ,python-jinja2)
("python-pythondialog" ,python-pythondialog)
- ("python-requests" ,python-requests)))
- (propagated-inputs
- `(("openvpn" ,openvpn)
- ("dialog" ,dialog)))
+ ("python-requests" ,python-requests)
+ ("which" ,which)))
(synopsis "Command-line client for ProtonVPN")
(description
"This is the official command-line interface for ProtonVPN, a secure
--
2.29.2