GNU bug report logs - #44178
Add a Go Module Importer

Previous Next

Package: guix-patches;

Reported by: Katherine Cox-Buday <cox.katherine.e <at> gmail.com>

Date: Fri, 23 Oct 2020 14:08:01 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: JOULAUD François <Francois.JOULAUD <at> radiofrance.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, "44178 <at> debbugs.gnu.org" <44178 <at> debbugs.gnu.org>, Katherine Cox-Buday <cox.katherine.e <at> gmail.com>
Subject: [bug#44178] [PATCH v4] Re: bug#44178: Add a Go Module Importer
Date: Thu, 04 Mar 2021 00:40:36 -0500
[Message part 1 (text/plain, inline)]
Hi François, Ludovic, et al!

Sorry for bumping in the review, but I have been experimenting with this
importer, and it looks promising; thanks for everyone involved!  I made
a couple changes, mostly with regard to integrating support for the
synopsis, description and license field of the package, plus other
cosmetic changes.  I thought I should share it quickly so that it can be
used as the basis for a v5, so here's the patch, attached.

I hope you don't mind!

I tested it with:

$ ./pre-inst-env guix environment guix

$ ./pre-inst-env guix import go -r github.com/dgraph-io/badger/v2

--8<---------------cut here---------------start------------->8---
[...]

(define-public go-github-com-dgraph-io-badger-v2
  (package
    (name "go-github-com-dgraph-io-badger-v2")
    (version "2.2007.2")
    (source
      (origin
        (method git-fetch)
        (uri (git-reference
               (url "https://github.com/dgraph-io/badger.git")
               (commit (go-version->git-ref version))))
        (file-name (git-file-name name version))
        (sha256
          (base32
            "0000000000000000000000000000000000000000000000000000"))))
    (build-system go-build-system)
    (arguments
      '(#:import-path "github.com/dgraph-io/badger"))
    (inputs
      `(("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)
        ("go-golang-org-x-sys" ,go-golang-org-x-sys)
        ("go-golang-org-x-net" ,go-golang-org-x-net)
        ("go-github-com-stretchr-testify"
         ,go-github-com-stretchr-testify)
        ("go-github-com-spf13-cobra"
         ,go-github-com-spf13-cobra)
        ("go-github-com-spaolacci-murmur3"
         ,go-github-com-spaolacci-murmur3)
        ("go-github-com-pkg-errors"
         ,go-github-com-pkg-errors)
        ("go-github-com-kr-pretty"
         ,go-github-com-kr-pretty)
        ("go-github-com-golang-snappy"
         ,go-github-com-golang-snappy)
        ("go-github-com-golang-protobuf"
         ,go-github-com-golang-protobuf)
        ("go-github-com-dustin-go-humanize"
         ,go-github-com-dustin-go-humanize)
        ("go-github-com-dgryski-go-farm"
         ,go-github-com-dgryski-go-farm)
        ("go-github-com-dgraph-io-ristretto"
         ,go-github-com-dgraph-io-ristretto)
        ("go-github-com-cespare-xxhash"
         ,go-github-com-cespare-xxhash)
        ("go-github-com-datadog-zstd"
         ,go-github-com-datadog-zstd)))
    (home-page "https://github.com/dgraph-io/badger")
    (synopsis "BadgerDB")
    (description
      "Package badger implements an embeddable, simple and fast key-value database, written in pure Go. It is designed to be highly performant for both reads and writes simultaneously. Badger uses Multi-Version Concurrency Control (MVCC), and supports transactions. It runs transactions concurrently, with serializable snapshot isolation guarantees.")
    (license (license:asl2.0))))
--8<---------------cut here---------------end--------------->8---

Attached is the fixup commit which should apply cleanly on top of your
v3 patch on master, along a (now required) commit to use a temporary
fork of guile-lib:

[0001-gnu-guile-lib-Update-to-a-temporary-fork.patch (text/x-patch, attachment)]
[0002-fixup-Create-importer-for-Go-modules.patch (text/x-patch, attachment)]
[Message part 4 (text/plain, inline)]
I hope I'm not making things more difficult for you!

Thank you for working on it! :-)

Maxim

This bug report was last modified 4 years and 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.