guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Go importer and packages with version flags


From: Jack Hill
Subject: Go importer and packages with version flags
Date: Mon, 27 Sep 2021 17:51:35 -0400 (EDT)
User-agent: Alpine 2.21 (DEB 202 2017-01-01)

Hi Guix,

While I was was working with the go importer today, it suggested I package go-github-com-russross-blackfriday-v2. Fair enough, except we already have a package for go-github-com-russross-blackfriday. The packages differ in their version (2.1.0 verses 2.0.1), their imputs (the imported package definition is missing the inputs and native-inputs that we have in the Guix package), and the presense of the v2 versioning disambiguation tag.

I was puzzled by this last bit since both packages seem to compatible with the v2 API. If I replace the exising package definition with the one suggested by the importer (with one small tweak, I needed to add a /v2 to the #:unpack-path) all the packages reported by `guix refresh -l go-github-com-russross-blackfriday` build sucessfully.

What's the path forward here? I'm thinking I should update our blackfriday backage to the 2.1.0 release, but leave the inputs and native inputs. I'm less sure about what to do about the v2 tag. Should I switch over the package and varialbe name? What do we usually do?

Best,
Jack

The package the importer suggested:

```
(define-public go-github-com-russross-blackfriday-v2
  (package
    (name "go-github-com-russross-blackfriday-v2")
    (version "2.1.0")
    (source
      (origin
        (method git-fetch)
        (uri (git-reference
               (url "https://github.com/russross/blackfriday";)
               (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
          (base32 "0d1rg1drrfmabilqjjayklsz5d0n3hkf979sr3wsrw92bfbkivs7"))))
    (build-system go-build-system)
    (arguments
      '(#:import-path
        "github.com/russross/blackfriday/v2"
        #:unpack-path
        "github.com/russross/blackfriday"))
    (home-page "https://github.com/russross/blackfriday";)
    (synopsis "Blackfriday")
    (description "Package blackfriday is a markdown processor.
")
    (license license:bsd-2)))
```

Our existing package:

```
(define-public go-github-com-russross-blackfriday
  (package
    (name "go-github-com-russross-blackfriday")
    (version "2.0.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/russross/blackfriday";)
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32
         "0nlz7isdd4rgnwzs68499hlwicxz34j2k2a0b8jy0y7ycd2bcr5j"))))
    (build-system go-build-system)
    (arguments
     '(#:import-path "github.com/russross/blackfriday"))
    (propagated-inputs
     `(("go-github-com-shurcool-sanitized-anchor-name"
        ,go-github-com-shurcool-sanitized-anchor-name)))
    (native-inputs
     `(("go-github-com-pmezard-go-difflib" ,go-github-com-pmezard-go-difflib)))
    (home-page "https://github.com/russross/blackfriday";)
    (synopsis "Markdown processor in Go")
    (description "Blackfriday is a Markdown processor in Go.")
    (license license:bsd-2)))
```



reply via email to

[Prev in Thread] Current Thread [Next in Thread]