[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/06: gnu: Add doctl.
From: |
guix-commits |
Subject: |
02/06: gnu: Add doctl. |
Date: |
Sun, 23 Oct 2022 09:57:16 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 5bf34e36b1e75ad736c134d0d2ecf7bf12bc12f1
Author: Matthew James Kraai <kraai@ftbfs.org>
AuthorDate: Sun Oct 9 05:07:23 2022 -0700
gnu: Add doctl.
* gnu/packages/admin.scm (doctl): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/admin.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index b71f49727b..4539e92a8c 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,52 @@ mechanisms if you really want to protect services.")
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.84.1")
+ (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
+ "1jmqvz1rdqrsr4l0bv3ik1jla0xnbdvcmnw9892acvfs3wsmliyc"))))
+ (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
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'install-completions
+ (lambda _
+ (define (install-completion shell file)
+ (let ((file (string-append #$output file)))
+ (mkdir-p (dirname file))
+ (with-output-to-file file
+ (lambda _
+ (invoke (string-append #$output "/bin/doctl")
+ "completion" shell)))))
+ (install-completion "bash" "/etc/bash_completion.d/doctl")
+ (install-completion "fish"
+ "/etc/fish/completions/doctl.fish")
+ (install-completion "zsh"
+ "/etc/zsh/site-functions/_doctl"))))))
+ (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)))
- branch master updated (b741f30572 -> 3734857fc5), guix-commits, 2022/10/23
- 01/06: system: hurd: Boot with the statically-linked 'exec' server., guix-commits, 2022/10/23
- 02/06: gnu: Add doctl.,
guix-commits <=
- 06/06: gnu: libevent: Prefix (guix licenses) bindings., guix-commits, 2022/10/23
- 03/06: gnu: weasyprint: Update to 56.1., guix-commits, 2022/10/23
- 04/06: gnu: Add libevent-with-openssl., guix-commits, 2022/10/23
- 05/06: gnu: Add coturn., guix-commits, 2022/10/23