diff mbox series

[bug#58408] gnu: Add doctl.

Message ID Y0VxcfPzk1lWIxJt@carlo
State New
Headers show
Series [bug#58408] gnu: Add doctl. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Matthew James Kraai Oct. 11, 2022, 1:36 p.m. UTC
Hi,

On Mon, Oct 10, 2022 at 04:21:33PM +0100, ( wrote:
> Mostly LGTM, but it looks like I forgot something:
> 
> On Mon Oct 10, 2022 at 2:20 PM BST, Matthew James Kraai wrote:
> > +    (home-page "https://github.com/digitalocean/doctl")
> 
> ``home-page'' is generally put before ``synopsis''.

Thanks again.  How about the following patch?
diff mbox series

Patch

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 13d582403b..2e3395052c 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -54,6 +54,7 @@ 
 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2022 Andreas Rammhold <andreas@rammhold.de>
 ;;; Copyright © 2022 ( <paren@disroot.org>
+;;; Copyright © 2022 Matthew James Kraai <kraai@ftbfs.org>
 ;;;
 ;;; 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))
+    (home-page "https://github.com/digitalocean/doctl")
+    (synopsis "Command line client for DigitalOcean")
+    (description
+     "@code{doctl} provides a unified command line interface to the DigitalOcean API.")
+    (license license:asl2.0)))