[Top][All Lists]

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

Re: Packaging (simple) tools in Golang

From: Jelle Licht
Subject: Re: Packaging (simple) tools in Golang
Date: Fri, 29 Jan 2021 21:51:15 +0100

Leo Famulari <> writes:

> On Thu, Jan 28, 2021 at 02:33:08PM +0100, Jelle Licht wrote:
>> Hello Guix!
>> How would one package a tool written in Go(lang) using guix? I am
>> looking at, but all of my efforts using
>> the go-build-system end up having only some documentation and (if I set
>> `#:install-source?' to #f) the sources in the resultant output. Ideally,
>> I would end up with a <out>/bin/n26 in addition to the documentation I
>> get now.
> Can you share your package definition?

I figured it out, it was a problem with the `#:unpack-path' being
"", yet the `#:import-path' needing to be
"". Cargo-culting saves the day yet again.

I'm not sure whether it works, as I don't have an account with this bank
to test it with, but it seems to at least build reproducibly on two of
my machines.

I'll clean it up and verify that it actually works before pushing it.
 - Jelle

--8<---------------cut here---------------start------------->8---
(define-public go-n26
    (name "go-n26")
    (version "1.5.2")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "";)
                    (commit version)))
              (file-name (git-file-name name version))
    (build-system go-build-system)
     `(#:import-path ""
       #:unpack-path ""
       #:install-source? #f))
     `(("go-golang-org-x-sys" ,go-golang-org-x-sys)
       ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
       ("" ,
       ("go-golang-org-x-oauth2" ,go-golang-org-x-oauth2)
       ("" ,
       ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)))
    (home-page "";)
    (synopsis "API and CLI to get information of your N26 account")
    (description "API and CLI to get information of your N26 account")
    (license license:expat)))
--8<---------------cut here---------------end--------------->8---

reply via email to

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