unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jørgen Kvalsvik" <j@lambda.is>
To: 74373@debbugs.gnu.org
Cc: "Jørgen Kvalsvik" <j@lambda.is>
Subject: [bug#74373] [PATCH 4/4] gnu: Add go-buf.
Date: Fri, 15 Nov 2024 22:11:06 +0100	[thread overview]
Message-ID: <20241115211106.2759121-5-j@lambda.is> (raw)
In-Reply-To: <20241115211106.2759121-1-j@lambda.is>

* gnu/packages/golang-xyz.scm (go-buf): New variable.

Change-Id: I2ff7ee23bcf5413ad3b4b4b9cbfc8a007b0b9b80
---
 gnu/packages/golang-xyz.scm | 63 ++++++++++++++++++++++++++++---------
 1 file changed, 49 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 0d6debcac4..0d8147e484 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -68,6 +68,7 @@ (define-module (gnu packages golang-xyz)
   #:use-module (guix build-system copy)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
+  #:use-module (guix go-mod-download)
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (gnu packages)
@@ -7591,31 +7592,65 @@ (define-public glua
       #:import-path "github.com/yuin/gopher-lua/cmd/glua"
       #:unpack-path "github.com/yuin/gopher-lua"))))
 
+(define-public go-buf
+  (package
+    (name "go-buf")
+    (version "1.46.0")
+    (source
+     (origin
+       (method go-mod-fetch)
+       (uri (go-mod-reference
+             (go go-1.23)
+             (source
+              (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/bufbuild/buf")
+                      (commit (string-append "v" version))))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "049rp4f2i759xmws6pqrw3208x1v0zdcmi3ymjbxmaq4hijl9daw"))))))
+       (sha256
+        (base32 "1sk2jhazaa1y2y5m1nmd753s0gr52c8967xr6j9pf2d675fzi7q0"))))
+    (arguments
+     (list
+      #:go go-1.23
+      #:import-path "cmd/buf"))
+    (build-system go-mod-build-system)
+    (home-page "https://github.com/bufbuild/buf")
+    (synopsis "Buf")
+    (description
+     "The @@url{https://buf.build,(code buf)} CLI is the best tool for working with
+@@url{https://protobuf.dev,Protocol Buffers}.  It provides:.")
+    (license license:asl2.0)))
+
 (define-public go-chroma
   (package
     (name "go-chroma")
     (version "2.14.0")
     (source
      (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/alecthomas/chroma")
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
+       (method go-mod-fetch)
+       (uri (go-mod-reference
+             (source
+              (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/alecthomas/chroma")
+                      (commit (string-append "v" version))))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1qgr4gywjks869sc85wb8nby612b8wvsa1dwpsbanjsljq7wq7mp"))))))
        (sha256
         (base32
-         "1qgr4gywjks869sc85wb8nby612b8wvsa1dwpsbanjsljq7wq7mp"))))
-    (build-system go-build-system)
+         "1xq2v3qr71mbjm328a6snqvba83nq70z6qqjfgh5mp25bwkwy6bl"))))
+    (build-system go-mod-build-system)
     (arguments
      (list
       #:install-source? #f
-      #:import-path "github.com/alecthomas/chroma/cmd/chroma"))
-    (native-inputs
-     (list go-github-com-alecthomas-assert-v2
-           go-github-com-alecthomas-chroma-v2
-           go-github-com-alecthomas-kong
-           go-github-com-mattn-go-colorable
-           go-github-com-mattn-go-isatty))
+      #:import-path "cmd/chroma"))
     (home-page "https://github.com/alecthomas/chroma")
     (synopsis "General purpose syntax highlighter in pure Golang")
     (description
-- 
2.39.5





      parent reply	other threads:[~2024-11-15 21:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-15 21:11 [bug#74370] [PATCH 0/4] Module aware go build system, downloader Jørgen Kvalsvik
2024-11-15 21:11 ` [bug#74372] [PATCH 1/4] guix: Add go module fetcher Jørgen Kvalsvik
2024-11-15 21:11 ` [bug#74374] [PATCH 2/4] guix: add go module aware build system Jørgen Kvalsvik
2024-11-15 21:11 ` [bug#74371] [PATCH 3/4] guix: Add module aware 'guix import go' Jørgen Kvalsvik
2024-11-15 21:11 ` Jørgen Kvalsvik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241115211106.2759121-5-j@lambda.is \
    --to=j@lambda.is \
    --cc=74373@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).