diff mbox series

[bug#54560,24/47] gnu: Add go-github-com-shurcool-httpfs.

Message ID 20220325133211.5128-24-hello@lnikki.la
State New
Headers show
Series [bug#54560,01/47] gnu: Add go-google-golang-org-protobuf. | expand

Commit Message

Leo Nikkilä March 25, 2022, 1:31 p.m. UTC
* gnu/packages/golang.scm (go-github-com-shurcool-httpfs): New variable.
---
 gnu/packages/golang.scm | 57 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 775d1c274b..416f1b1f86 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5386,6 +5386,63 @@  (define-public go-github-com-russross-blackfriday
     (description "Blackfriday is a Markdown processor in Go.")
     (license license:bsd-2)))
 
+(define-public go-github-com-shurcool-httpfs
+  (let ((commit "8d4bc4ba774931155e6cd5ef6098cb038dd45135")
+        (revision "0"))
+    (package
+      (name "go-github-com-shurcool-httpfs")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/shurcooL/httpfs")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0qjkbjnp86kjr7r0xjwp39blnk1ggkzy6zm3xphr5dpin4jkgfa1"))))
+      (build-system go-build-system)
+      (arguments
+       '(#:unpack-path "github.com/shurcooL/httpfs"
+         #:phases
+         (let ((paths '("github.com/shurcooL/httpfs/filter"
+                        "github.com/shurcooL/httpfs/html/vfstemplate"
+                        "github.com/shurcooL/httpfs/httputil"
+                        "github.com/shurcooL/httpfs/path/vfspath"
+                        "github.com/shurcooL/httpfs/text/vfstemplate"
+                        "github.com/shurcooL/httpfs/union"
+                        "github.com/shurcooL/httpfs/vfsutil")))
+           (modify-phases %standard-phases
+             (replace 'build
+               (lambda args
+                 (for-each (lambda (path)
+                             (apply (assoc-ref %standard-phases
+                                               'build)
+                                    `(,@args #:import-path
+                                      ,path))) paths)))
+             (replace 'check
+               (lambda args
+                 (for-each (lambda (path)
+                             (apply (assoc-ref %standard-phases
+                                               'check)
+                                    `(,@args #:import-path
+                                      ,path))) paths)))
+             (replace 'install
+               (lambda args
+                 (for-each (lambda (path)
+                             (apply (assoc-ref %standard-phases
+                                               'install)
+                                    `(,@args #:import-path
+                                      ,path))) paths)))))))
+      (propagated-inputs (list go-github-com-shurcool-httpgzip))
+      (native-inputs (list go-golang-org-x-tools))
+      (synopsis "Collection of Go packages for working with the
+@code{http.FileSystem} interface")
+      (description "Collection of Go packages for working with the
+@code{http.FileSystem} interface.")
+      (home-page "https://github.com/shurcooL/httpfs")
+      (license license:expat))))
+
 (define-public go-github-com-shurcool-httpgzip
   (let ((commit "320755c1c1b0484e6179c9a5b68aabcc0dae5ac2")
         (revision "0"))