From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uBbRCspR+F/XJQAA0tVLHw (envelope-from ) for ; Fri, 08 Jan 2021 12:36:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id CO+nBspR+F+qXAAA1q6Kng (envelope-from ) for ; Fri, 08 Jan 2021 12:36:26 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2C3879402A0 for ; Fri, 8 Jan 2021 12:36:25 +0000 (UTC) Received: from localhost ([::1]:36408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxr0C-0003Gb-5k for larch@yhetil.org; Fri, 08 Jan 2021 07:36:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxlmc-00018a-Mw for help-guix@gnu.org; Fri, 08 Jan 2021 02:02:02 -0500 Received: from smtp-out-3.mxes.net ([2605:d100:2f:10::314]:64666) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxlma-0001aO-M5 for help-guix@gnu.org; Fri, 08 Jan 2021 02:02:02 -0500 Received: from Customer-MUA (mua.mxes.net [10.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 96A68759BB for ; Fri, 8 Jan 2021 02:01:52 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mxes.net; s=mta; t=1610089313; bh=oAXgB2RsR0gLhenXSxeQ7xCukQhOP8F1AqXCT9Edwxg=; h=From:To:Subject:Date:From; b=Zc9gGQ8iUK1LlTDdydv/rZx8kv3EZHXTbFlXASfFIL227z7AtCIoFSbuQMK8pblq/ 8OHnQ2sMEvyKZ5FGCCVmFWTn1/M4Bs9OKErukB9jVEtT9zYRzqnIXPmp8e3nRy2gSe snzH2j3nTIAMs/4mEIupxTCtO/Zr3HxQiWdeO6Ww= From: Timmy Douglas To: help-guix@gnu.org Subject: packaging a golang package Date: Thu, 07 Jan 2021 23:01:49 -0800 Message-ID: <87h7nrud2a.fsf@timmydouglas.com> MIME-Version: 1.0 Content-Type: text/plain X-Sent-To: Received-SPF: none client-ip=2605:d100:2f:10::314; envelope-from=mail+GL=3b58161f@timmydouglas.com; helo=smtp-out-3.mxes.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 08 Jan 2021 07:33:38 -0500 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.55 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=mxes.net header.s=mta header.b=Zc9gGQ8i; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 2C3879402A0 X-Spam-Score: -2.55 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8tfm9/9nqD4n 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 (https://github.com/coredns/coredns/blob/master/go.mod) for modules. Running `go build` would normally download those if they don't exist. 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? Thanks, ```coredns.scm (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 (package (name "coredns") (version "1.8.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/coredns/coredns.git") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "04hkz70s5i7ndwyg39za3k83amvmi90rkjm8qp3w3a8fbmq4q4y6")))) (build-system go-build-system) (arguments '(#:import-path "github.com/coredns/coredns")) (inputs `(;fixme )) (synopsis "CoreDNS is a DNS server/forwarder, written in Go, that chains plugins.") (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 "https://github.com/coredns/coredns") (license license:asl2.0))) coredns