diff mbox series

[bug#48729,v3,22/47] gnu: Add go-github-com-operatorfoundation-shapeshifter-transports.

Message ID 20210608232204.18111-22-rg@raghavgururajan.name
State New
Headers show
Series None | expand

Commit Message

Raghav Gururajan June 8, 2021, 11:21 p.m. UTC
* gnu/packages/golang.scm (go-github-com-operatorfoundation-shapeshifter-transports): New variable.
---
 gnu/packages/golang.scm | 155 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 155 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ef0c35d50b..cde1627477 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -69,6 +69,161 @@ 
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1))
 
+(define-public go-github-com-operatorfoundation-shapeshifter-transports
+  (package
+    (name "go-github-com-operatorfoundation-shapeshifter-transports")
+    (version "3.0.12")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/OperatorFoundation/shapeshifter-transports")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0f1hzhk3q2fgqdg14zlg3z0s0ib1y9xwj89qnjk95b37zbgqjgsb"))))
+    (build-system go-build-system)
+    (arguments
+     `(#:unpack-path "github.com/OperatorFoundation/shapeshifter-transports"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda _
+             (substitute* (find-files "." "\\.go$")
+               ;; Drop '.git' suffix in import path of goptlib.
+               (("goptlib\\.git") "goptlib"))
+             #t))
+         (replace 'build
+           (lambda* (#:key source system outputs search-paths build-flags unpack-path inputs #:allow-other-keys)
+             (for-each
+              (lambda (directory)
+                ((assoc-ref %standard-phases 'build)
+                 #:source source
+                 #:system system
+                 #:outputs outputs
+                 #:search-paths search-paths
+                 #:build-flags build-flags
+                 #:unpack-path unpack-path
+                 #:inputs inputs
+                 #:import-path directory))
+              (list
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/Dust/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/Dust/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/Optimizer/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/Optimizer/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/Replicant/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/Replicant/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/meeklite/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/meeklite/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/meekserver/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/meekserver/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/obfs2/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/obfs2/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/obfs4/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/obfs4/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/shadow/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/shadow/v3"))
+             #t))
+         (replace 'check
+           (lambda* (#:key source system outputs search-paths tests? unpack-path inputs #:allow-other-keys)
+             (for-each
+              (lambda (directory)
+                ((assoc-ref %standard-phases 'check)
+                 #:source source
+                 #:system system
+                 #:outputs outputs
+                 #:search-paths search-paths
+                 #:tests? tests?
+                 #:unpack-path unpack-path
+                 #:inputs inputs
+                 #:import-path directory))
+              (list
+               ;;; ERROR: invalid memory address or nil pointer dereference.
+               ;;"github.com/OperatorFoundation/shapeshifter-transports/transports/Dust/v2"
+               ;;"github.com/OperatorFoundation/shapeshifter-transports/transports/Dust/v3"
+               ;;; ERROR: failed with status 1.
+               ;;"github.com/OperatorFoundation/shapeshifter-transports/transports/Optimizer/v2"
+               ;;"github.com/OperatorFoundation/shapeshifter-transports/transports/Optimizer/v3"
+               ;;"github.com/OperatorFoundation/shapeshifter-transports/transports/Replicant/v2"
+               ;;"github.com/OperatorFoundation/shapeshifter-transports/transports/Replicant/v3"
+               ;;"github.com/OperatorFoundation/shapeshifter-transports/transports/meeklite/v2"
+               ;;"github.com/OperatorFoundation/shapeshifter-transports/transports/meeklite/v3"
+               ;;; ERROR: bind: permission denied.
+               ;;"github.com/OperatorFoundation/shapeshifter-transports/transports/meekserver/v2"
+               ;;"github.com/OperatorFoundation/shapeshifter-transports/transports/meekserver/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/obfs2/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/obfs2/v3"))
+               ;;; ERROR: failed with status 1.
+               ;;"github.com/OperatorFoundation/shapeshifter-transports/transports/obfs4/v2"
+               ;;"github.com/OperatorFoundation/shapeshifter-transports/transports/obfs4/v3"
+               ;;"github.com/OperatorFoundation/shapeshifter-transports/transports/shadow/v2"
+               ;;"github.com/OperatorFoundation/shapeshifter-transports/transports/shadow/v3"
+             #t))
+         (replace 'install
+           (lambda* (#:key source system outputs search-paths install-source? unpack-path inputs #:allow-other-keys)
+             (for-each
+              (lambda (directory)
+                ((assoc-ref %standard-phases 'install)
+                 #:source source
+                 #:system system
+                 #:outputs outputs
+                 #:search-paths search-paths
+                 #:install-source? install-source?
+                 #:unpack-path unpack-path
+                 #:inputs inputs
+                 #:import-path directory))
+              (list
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/Dust/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/Dust/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/Optimizer/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/Optimizer/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/Replicant/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/Replicant/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/meeklite/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/meeklite/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/meekserver/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/meekserver/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/obfs2/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/obfs2/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/obfs4/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/obfs4/v3"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/shadow/v2"
+               "github.com/OperatorFoundation/shapeshifter-transports/transports/shadow/v3"))
+             #t)))))
+    (native-inputs
+     `(("go-github-com-stretchr-testify" ,go-github-com-stretchr-testify)))
+    (propagated-inputs
+     `(("go-github-com-aead-chacha20"
+        ,go-github-com-aead-chacha20)
+       ("go-github-com-blanu-dust"
+        ,go-github-com-blanu-dust)
+       ("go-github-com-deckarep-golang-set"
+        ,go-github-com-deckarep-golang-set)
+       ("go-github-com-kataras-golog"
+        ,go-github-com-kataras-golog)
+       ("go-github-com-mufti1-interconv"
+        ,go-github-com-mufti1-interconv)
+       ("go-github-com-opentracing-opentracing-go"
+        ,go-github-com-opentracing-opentracing-go)
+       ("go-github-com-operatorfoundation-monolith-go"
+        ,go-github-com-operatorfoundation-monolith-go)
+       ("go-github-com-operatorfoundation-obfs4"	
+        ,go-github-com-operatorfoundation-obfs4)
+       ("go-github-com-operatorfoundation-shapeshifter-ipc"
+        ,go-github-com-operatorfoundation-shapeshifter-ipc)
+       ("go-github-com-shadowsocks-go-shadowsocks2"
+        ,go-github-com-shadowsocks-go-shadowsocks2)
+       ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
+       ("go-golang-org-x-net" ,go-golang-org-x-net)
+       ("go-torproject-org-pluggable-transports-goptlib"
+        ,go-torproject-org-pluggable-transports-goptlib)))
+    (home-page "https://github.com/OperatorFoundation/shapeshifter-transports")
+    (synopsis "Go implementation of Pluggable Transports")
+    (description "Shapeshifter Transports is a set of Pluggable Transports
+implementing the Go API from the Pluggable Transports 2.0 specification.")
+    (license license:expat)))
+
 (define-public go-github-com-kataras-golog
   (package
     (name "go-github-com-kataras-golog")