diff mbox series

[bug#48729,v2,10/47] gnu: Add go-github-com-operatorfoundation-shapeshifter-ipc.

Message ID 20210603095814.21158-10-rg@raghavgururajan.name
State Accepted
Headers show
Series : Bitmask VPN | expand

Commit Message

Raghav Gururajan June 3, 2021, 9:57 a.m. UTC
* gnu/packages/golang.scm (go-github-com-operatorfoundation-shapeshifter-ipc): New variable.
---
 gnu/packages/golang.scm | 77 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index e2d5dfc4e4..19741b4be4 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -69,6 +69,83 @@ 
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1))
 
+(define-public go-github-com-operatorfoundation-shapeshifter-ipc
+  (package
+    (name "go-github-com-operatorfoundation-shapeshifter-ipc")
+    (version "2.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/OperatorFoundation/shapeshifter-ipc")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1q1fcnllg462nfca16s5mr0n2jh92x3hj946qnaqc682phjz04lg"))))
+    (build-system go-build-system)
+    (arguments
+     `(#:tests? #f                      ; ERROR: undefined: Args.
+       #:unpack-path "github.com/OperatorFoundation/shapeshifter-ipc"
+       #:phases
+       (modify-phases %standard-phases
+         (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-ipc/v2"
+               "github.com/OperatorFoundation/shapeshifter-ipc/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
+               "github.com/OperatorFoundation/shapeshifter-ipc/v2"
+               "github.com/OperatorFoundation/shapeshifter-ipc/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-ipc/v2"
+               "github.com/OperatorFoundation/shapeshifter-ipc/v3"))
+             #t)))))
+    (home-page "https://github.com/OperatorFoundation/shapeshifter-ipc")
+    (synopsis "Go implementation of IPC protocol")
+    (description "Shapeshifter IPC is a library for Go implementing the IPC
+protocol from the Pluggable Transports 2.0 specification.")
+    (license license:expat)))
+
 (define-public go-github-com-operatorfoundation-obfs4
   (package
     (name "go-github-com-operatorfoundation-obfs4")