[Top][All Lists]

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

packaging a golang package

From: Timmy Douglas
Subject: packaging a golang package
Date: Thu, 07 Jan 2021 23:01:49 -0800

I recently installed guix for the first time and I wanted to try to
package my first program. The one I decided to try is written in go and
uses go.mod ( for
modules. Running `go build` would normally download those if they don't

I took a look at a couple of other packages, and it looks like the right
way to do it would be to package the individual modules as seen in
guix/gnu/packages/golang.scm. Has anyone tried automating this sort of
thing? There are almost 40 dependencies...

If some of the packages already exist, but are a different version,
what's the right way to resolve the conflict?



(define-module (coredns)
               #:use-module (guix packages)
               #:use-module (guix git-download)
               #:use-module (guix build-system go)
               #:use-module ((guix licenses) #:prefix license:))

(define-public coredns
   (name "coredns")
   (version "1.8.0")
   (source (origin
            (method git-fetch)
            (uri (git-reference
                  (url "";)
                  (commit (string-append "v" version))))
            (file-name (git-file-name name version))
   (build-system go-build-system)
    '(#:import-path ""))
   (synopsis "CoreDNS is a DNS server/forwarder, written in Go, that chains 
   (description "CoreDNS is a fast and flexible DNS server. The key word here 
is flexible: with CoreDNS you are able to do what you want with your DNS data 
by utilizing plugins. If some functionality is not provided out of the box you 
can add it by writing a plugin.")
   (home-page "";)
   (license license:asl2.0)))


reply via email to

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