all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Paul Weber <singpolyma@singpolyma.net>
To: 50793@debbugs.gnu.org
Cc: Stephen Paul Weber <singpolyma@singpolyma.net>, iskarian@mgsn.dev
Subject: [bug#50793] [PATCH v3 2/2] gnu: Add cloudflare-cli
Date: Sun, 26 Sep 2021 18:35:13 -0500	[thread overview]
Message-ID: <20210926233513.3710-2-singpolyma@singpolyma.net> (raw)
In-Reply-To: <20210926233513.3710-1-singpolyma@singpolyma.net>

* gnu/packages/dns.scm (cloudflare-cli): New variable.
---
 gnu/packages/dns.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 45e250138e..3b0da466f5 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -42,6 +42,7 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages certs)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages compression)
@@ -69,6 +70,7 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages ragel)
+  #:use-module (gnu packages serialization)
   #:use-module (gnu packages shells)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages swig)
@@ -82,11 +84,62 @@
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix utils)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system trivial))
 
+(define-public cloudflare-cli
+  (let ((commit "2d986d3ec1b0e3158c4bd40e8918947cb74aa392")
+        (revision "1"))
+    (package
+      (name "cloudflare-cli")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/earlchew/cloudflare-cli")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0f86g6n86kwykl3jnhqjrdfy8ybkp03ghr3dlr70q2552qw4axw2"))))
+      (build-system copy-build-system)
+      (arguments
+       `(#:install-plan '(("cloudflare-cli" "bin/") ("cloudflare-cli.sh" "bin/"))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'find-jsonsh
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "cloudflare-cli.sh"
+                 (("\\$\\{0%/\\*\\}/jsonsh")
+                  (string-append (assoc-ref inputs "json.sh") "/bin/JSON.sh")))
+               #t))
+           (add-after 'install 'wrap-program
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (wrap-program (string-append (assoc-ref outputs "out") "/bin/cloudflare-cli")
+                 `("PATH" ":" prefix
+                   (,(string-join
+                      (map (lambda (in) (string-append (assoc-ref inputs in) "/bin"))
+                           '("grep" "curl"))
+                      ":"))))
+               #t)))))
+      (inputs
+       `(("bash-minimal" ,bash-minimal)
+         ("curl" ,curl)
+         ("grep" ,grep)
+         ("json.sh" ,json.sh)))
+      (synopsis
+        "CLI to edit Cloudflare DNS records")
+      (description
+        "This command line tool to update Cloudfare DNS records is useful for tasks
+such as updating dynamic DNS records or updating DNS records for the ACME DNS-01
+protocol.")
+      (home-page "https://github.com/earlchew/cloudflare-cli")
+      (license license:expat))))
+
 (define-public ldns
   (package
     (name "ldns")
-- 
2.20.1




  reply	other threads:[~2021-09-26 23:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-25  1:38 [bug#50793] [PATCH 0/2] cloudflare-cli and dependency JSON.sh Stephen Paul Weber
2021-09-25  1:39 ` [bug#50793] [PATCH 1/2] gnu: Add JSON.sh Stephen Paul Weber
2021-09-25  1:39   ` [bug#50793] [PATCH 2/2] gnu: Add cloudflare-cli Stephen Paul Weber
2021-09-25  2:58     ` Sarah Morgensen
2021-09-26  1:21       ` Stephen Paul Weber
2021-09-25  2:58   ` [bug#50793] [PATCH 1/2] gnu: Add JSON.sh Sarah Morgensen
2021-09-26  1:08     ` Stephen Paul Weber
2021-09-26  3:02       ` Sarah Morgensen
2021-09-26 23:32         ` Stephen Paul Weber
2021-09-26  1:29 ` [bug#50793] [PATCH v2 " Stephen Paul Weber
2021-09-26  1:29   ` [bug#50793] [PATCH v2 2/2] gnu: Add cloudflare-cli Stephen Paul Weber
2021-09-26 23:35 ` [bug#50793] [PATCH v3 1/2] gnu: Add JSON.sh Stephen Paul Weber
2021-09-26 23:35   ` Stephen Paul Weber [this message]
2021-10-13  9:08     ` bug#50793: [PATCH 0/2] cloudflare-cli and dependency JSON.sh Ludovic Courtès
2021-10-13  9:05   ` [bug#50793] " Ludovic Courtès
2021-10-13 19:03     ` Maxim Cournoyer
2021-10-14  8:54       ` zimoun
2021-10-15  3:26         ` Maxim Cournoyer
2021-10-15 15:28       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210926233513.3710-2-singpolyma@singpolyma.net \
    --to=singpolyma@singpolyma.net \
    --cc=50793@debbugs.gnu.org \
    --cc=iskarian@mgsn.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.