diff mbox series

[bug#45106] gnu: shadowsocks: Build against openssl.

Message ID 20201207202818.12122-1-leo.prikler@student.tugraz.at
State Accepted
Headers show
Series [bug#45106] gnu: shadowsocks: Build against openssl. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Leo Prikler Dec. 7, 2020, 8:28 p.m. UTC
This patch allows shadowsocks to be used without supplying libopenssl in its
configuration.  See also https://unix.stackexchange.com/questions/623324/.

* gnu/packages/networking.scm (shadowsocks)[inputs]: Add openssl.
[#:phases]: Add patch-crypto-paths.
---
 gnu/packages/networking.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Marius Bakke Dec. 7, 2020, 11:48 p.m. UTC | #1
Leo Prikler <leo.prikler@student.tugraz.at> skriver:

> This patch allows shadowsocks to be used without supplying libopenssl in its
> configuration.  See also https://unix.stackexchange.com/questions/623324/.
>
> * gnu/packages/networking.scm (shadowsocks)[inputs]: Add openssl.
> [#:phases]: Add patch-crypto-paths.

I fixed the syntax error and committed in
403dda2e66dc5c8f23bf66086815133546df1ba0.  Thanks!
diff mbox series

Patch

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 8a84c8476a..1f50c76962 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -3024,6 +3024,19 @@  asynchronous model using a modern C++ approach.")
                  (base32
                   "1idd9b4f2pnhcpk1bh030hqg5zq25gkwxd53xi3c0cj242w7sp2j"))
                 (file-name (git-file-name name version))))
+      (inputs
+       `(("openssl" ,openssl)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-crypto-paths
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "shadowsocks/shell.py"
+                 (("config\\.get\\('libopenssl', None\\)")
+                  (format #f "config.get('libopenssl', ~s)"
+                          (string-append
+                           (assoc-ref inputs "openssl")
+                           "/lib/libssl.so"))))))))))
       (build-system python-build-system)
       (synopsis "Fast tunnel proxy that helps you bypass firewalls")
       (description