From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UCc9Dzus+F9rRAAA0tVLHw (envelope-from ) for ; Fri, 08 Jan 2021 19:02:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0NoDCzus+F/fMgAAB5/wlQ (envelope-from ) for ; Fri, 08 Jan 2021 19:02:19 +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 768B39402AF for ; Fri, 8 Jan 2021 19:02:16 +0000 (UTC) Received: from localhost ([::1]:40356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxx1b-0006PX-2D for larch@yhetil.org; Fri, 08 Jan 2021 14:02:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxx1H-0006OW-Up for help-guix@gnu.org; Fri, 08 Jan 2021 14:01:56 -0500 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:56043) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxx1A-0004Yf-OU for help-guix@gnu.org; Fri, 08 Jan 2021 14:01:55 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 6374D2C9; Fri, 8 Jan 2021 14:01:46 -0500 (EST) Received: from imap22 ([10.202.2.72]) by compute3.internal (MEProxy); Fri, 08 Jan 2021 14:01:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type:content-transfer-encoding; s=mesmtp; bh=4r cQo2agziFzNgkF7l/xYqsDiwKOF5cecri/u5bKnzk=; b=xeU5Dg/3JQsjufuNOz iQBejIRfJwuMzzQXAupf4n5lS5NR9xNgaVZ4OzmEqT57GlCFEOIKM2PI9J92qmFe Lm4Clt9XCq6R6KqChiwSdr/2jCiO7HnO2+3ZPSPMjWdVSg2rVNjwEZ6K+WMiAVkq CUyWNNryYJI2cPzWTTyIaPw5c= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=4rcQo2agziFzNgkF7l/xYqsDiwKOF5cecri/u5bKn zk=; b=mF7ZttKt4EIJvq2Ik4l7ZKCcBF90FZbnjDFx1FCAZUo4WcRt4qDxr6lM4 SHrq9HEQOKqSrQeXmzJ7dI/O+KJZQ1AjiahO3Rme/ATnbXOiW7hA51RhsxcsjbvZ RsX5Is2iQLXeSiPbi/RkeA4H2SCca+nY2vqo1rlh0IS9d49z4G0lSy5fEHE/CpRU 2jcnyDLgdYrkwCR/DQdi9tC+h5Eg3BgqDW6uPnwrrrqXgGm9eyBr7wndRfKrppiV qVHXW8Cn7WWZt3o3bZ//qWvSjfd0OzB0YXyXEPfIgKXH8qf18fHUyXhHE5A6VfgE RWfm0S0uKTAG5GKDelKKrJV70w4Xw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdeghedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtgfesth hqredtreerjeenucfhrhhomhepfdfnvghoucfhrghmuhhlrghrihdfuceolhgvohesfhgr mhhulhgrrhhirdhnrghmvgeqnecuggftrfgrthhtvghrnhepgefhteeuudefffeutefgie egfeeitdfggedukeffudeujeetkeeujeeklefgvdehnecuffhomhgrihhnpehgihhthhhu sgdrtghomhdpghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 9083A62A0060; Fri, 8 Jan 2021 14:00:34 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: <4bdbc469-ad45-4739-b001-739ad3a60adc@www.fastmail.com> In-Reply-To: <87h7nrud2a.fsf@timmydouglas.com> References: <87h7nrud2a.fsf@timmydouglas.com> Date: Fri, 08 Jan 2021 14:01:26 -0500 From: "Leo Famulari" To: "Timmy Douglas" , help-guix@gnu.org Subject: Re: packaging a golang package Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=64.147.123.20; envelope-from=leo@famulari.name; helo=wout4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: -1.54 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=famulari.name header.s=mesmtp header.b=xeU5Dg/3; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=mF7ZttKt; 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: 768B39402AF X-Spam-Score: -1.54 X-Migadu-Scanner: scn1.migadu.com X-TUID: FiFckM0MKzHH On Fri, Jan 8, 2021, at 02:01, Timmy Douglas wrote: >=20 > 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 an= d > uses go.mod (https://github.com/coredns/coredns/blob/master/go.mod) fo= r > modules. Running `go build` would normally download those if they don'= t > exist. >=20 > I took a look at a couple of other packages, and it looks like the rig= ht > 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... Thanks for working on this! It's true, Go programs usually have a dependency graph that is uncomfort= ably large =E2=80=94 although not impossibly large like Rust. There is a work-in-progress implementation of a Go package importer that= I believe should make it easier: https://issues.guix.gnu.org/issue/44178 You could try it out and, if it works for you, send those patches, and g= ive feedback on the importer as well :) As for the versioning, the Guix package tree can include multiple versio= ns of a package. Search for "inherit" in the crates-io.scm package modul= e for some examples. We would like to improve how this works, again for = Go and Rust, because it's such a common requirement.