From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SCQhDmMcRGOrDwAAbAwnHQ (envelope-from ) for ; Mon, 10 Oct 2022 15:21:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kC+vDmMcRGNpHwEAG6o9tA (envelope-from ) for ; Mon, 10 Oct 2022 15:21:39 +0200 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 E647C13824 for ; Mon, 10 Oct 2022 15:21:38 +0200 (CEST) Received: from localhost ([::1]:58466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohsiw-00041x-2t for larch@yhetil.org; Mon, 10 Oct 2022 09:21:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohsiO-0003zI-6V for guix-patches@gnu.org; Mon, 10 Oct 2022 09:21:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47326) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ohsiM-0003Jf-O1 for guix-patches@gnu.org; Mon, 10 Oct 2022 09:21:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ohsiM-00046e-9i for guix-patches@gnu.org; Mon, 10 Oct 2022 09:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58408] [PATCH] gnu: Add doctl. Resent-From: Matthew James Kraai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 10 Oct 2022 13:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58408 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "(" Cc: 58408@debbugs.gnu.org Received: via spool by 58408-submit@debbugs.gnu.org id=B58408.166540801215684 (code B ref 58408); Mon, 10 Oct 2022 13:21:02 +0000 Received: (at 58408) by debbugs.gnu.org; 10 Oct 2022 13:20:12 +0000 Received: from localhost ([127.0.0.1]:46404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohshY-00044o-8s for submit@debbugs.gnu.org; Mon, 10 Oct 2022 09:20:12 -0400 Received: from mail.ftbfs.org ([52.8.68.13]:33466 helo=aws.ftbfs.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohshV-00044b-32 for 58408@debbugs.gnu.org; Mon, 10 Oct 2022 09:20:10 -0400 Received: from ip68-4-255-43.oc.oc.cox.net ([68.4.255.43] helo=carlo) by aws.ftbfs.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ohshO-00066g-12; Mon, 10 Oct 2022 13:20:02 +0000 Date: Mon, 10 Oct 2022 06:20:00 -0700 From: Matthew James Kraai Message-ID: References: <20221010095456.23196-1-kraai@ftbfs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665408099; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=qvPEFiSA/mD2sUs8r3nfcb6OMs3532nzXkG6FM55RIU=; b=lVU2l5qyiUtEX/kvLi5YjnN6bOSDvN3/S3+y7qQeNuAgEWdx8nhiQP/L91hcfH+Zq1Nh8W aLHgEYkcrUTwZ22+UXpiOj++I2XOK0uCQ+xsznSqJZxYJvh/DMJxoU0MixFozY7g3tgdQs DfOWFJTXCgEjBWnoXx0z/hRL75/F3PFTz2yQx/sL8C7dZvjL361gTD2lzpMgR4FCVm4lkI rwkyN2xA8DFHllnSRqbnxUZk9/3Y7clRQlCpsSWV3/5cAZpw22+QskJ6u2Nw52kY4daXUd GNBxXAQeJDzKqYeOinVq8cLE4UsrjNOeJrxYmS4XFNQ391ujpJ9PkBvmvzXWcQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665408099; a=rsa-sha256; cv=none; b=ruB5i9/E3e+InChWIWAYu5R03KLuEuO1VeIsGM2Cwv6QrCb0Rd4g0ry8aZIV0opd7mLtDe DnL5rE3M2hwYHlC8XftDJpDsPBrwSJWP07HcnoNjv9thZ42Maawd1VZfhsq17uki683DlU 3GUR3Hbj+GOrEkxZFYRkR3p7NKa0xoMweukrKhbkXRPCt/x7fR21IEYiglbH3OI1ApP3Bv jdxWDfVFebVRnewD5M4wM1TLYxj5YA26pvUToMIwDTU1UxaSiVExzesubU4O9xh8wPNfeE c4Klf8wAvlHWvqPhpQiQxzgnIcBsW5N5v99ZMTC+THd9ihDM3US07lxLH1+VIg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.28 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E647C13824 X-Spam-Score: -3.28 X-Migadu-Scanner: scn0.migadu.com X-TUID: DNeoWHMkj3SD Hi, On Mon, Oct 10, 2022 at 12:01:58PM +0100, ( wrote: > Hey Matthew, > > On Mon Oct 10, 2022 at 10:54 AM BST, Matthew James Kraai wrote: > > * gnu/packages/doctl.scm: New file. > > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > > You sure there's no better place to put it than a new file? Maybe > ``gnu/packages/admin.scm''? > > > + #:use-module (guix download) > > Since you're using git-fetch, you shouldn't need this module, right? > > > + (arguments > > + `(#:build-flags '(,(string-append "-ldflags=-X github.com/digitalocean/doctl.Label=release" > > + " -X github.com/digitalocean/doctl.Major=" > > + (first (string-split version #\.)) > > + " -X github.com/digitalocean/doctl.Minor=" > > + (second (string-split version #\.)) > > + " -X github.com/digitalocean/doctl.Patch=" > > + (third (string-split version #\.)))) > > So, this whole thing would be better formatted with "new style" arguments > (using ``list'' and gexps). Like this: > > (arguments > (list #:build-flags > #~(list (string-append ...)) > #| et cetera |#)) > > This would also allow you to remove the unquote in ``,go-1.19''. Note that only > ``#:build-flags'' needs the gexp ``#~'' in this arguments list. > > > + #:go ,go-1.19 > > Might be best to put this above build-flags. > > > + #:import-path "github.com/digitalocean/doctl/cmd/doctl" > > The import-path is usually at the top of the arguments list. > > > + #:unpack-path "github.com/digitalocean/doctl")) > > And the unpack-path is usually directly after the import-path. > > > + (description > > + "doctl provides a unified command line interface to the DigitalOcean API.") > > Change ``doctl'' to ``@code{doctl}''. > > -- ( Thank you for all of the suggestions. How about the following patch instead? -- Matt >From f31936b941b1db1a4dfe8e07270ef4b004c33c54 Mon Sep 17 00:00:00 2001 From: Matthew James Kraai Date: Sun, 9 Oct 2022 05:07:23 -0700 Subject: [PATCH] gnu: Add doctl. * gnu/packages/admin.scm (doctl): New variable. --- gnu/packages/admin.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 13d582403b..be80713f52 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -54,6 +54,7 @@ ;;; Copyright © 2022 Petr Hodina ;;; Copyright © 2022 Andreas Rammhold ;;; Copyright © 2022 ( +;;; Copyright © 2022 Matthew James Kraai ;;; ;;; This file is part of GNU Guix. ;;; @@ -5596,3 +5597,36 @@ (define-public rex several hosts in succession or in parallel. It can also be used to copy a file or files to several hosts.") (license license:gpl3+))) + +(define-public doctl + (package + (name "doctl") + (version "1.83.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/digitalocean/doctl") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1narjmj3npd39gxi42k3h4zjyiaq5lvjv31vaxw8slf9h9sjhjh9")))) + (build-system go-build-system) + (arguments + (list #:import-path "github.com/digitalocean/doctl/cmd/doctl" + #:unpack-path "github.com/digitalocean/doctl" + #:go go-1.19 + #:build-flags + #~(list (string-append "-ldflags=-X github.com/digitalocean/doctl.Label=release" + " -X github.com/digitalocean/doctl.Major=" + (car (string-split #$version #\.)) + " -X github.com/digitalocean/doctl.Minor=" + (cadr (string-split #$version #\.)) + " -X github.com/digitalocean/doctl.Patch=" + (caddr (string-split #$version #\.)))) + #:install-source? #f)) + (synopsis "Command line client for DigitalOcean") + (description + "@code{doctl} provides a unified command line interface to the DigitalOcean API.") + (home-page "https://github.com/digitalocean/doctl") + (license license:asl2.0))) -- 2.38.0