aboutsummaryrefslogtreecommitdiff
path: root/battering/packages/dns.scm
diff options
context:
space:
mode:
Diffstat (limited to 'battering/packages/dns.scm')
-rw-r--r--battering/packages/dns.scm57
1 files changed, 57 insertions, 0 deletions
diff --git a/battering/packages/dns.scm b/battering/packages/dns.scm
new file mode 100644
index 0000000..7bf352e
--- /dev/null
+++ b/battering/packages/dns.scm
@@ -0,0 +1,57 @@
+(define-module (battering packages dns)
+ #:use-module (guix build-system copy)
+ #:use-module (guix download)
+ #:use-module (guix packages)
+ #:use-module ((guix licenses)
+ #:prefix license:)
+ #:use-module (gnu packages networking)
+ #:use-module (gnu packages curl)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages gawk)
+ #:use-module (gnu packages dns))
+
+(define-public opennic-up
+ (package
+ (name "opennic-up")
+ (version "1.2.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://github.com/kewlfft/opennic-up/"
+ "archive/refs/tags/v" version ".tar.gz"))
+ (sha256
+ (base32 "1ii61xsqcb94fgfbxqjv87gm00kvh0ixlwjal80cjmdgy42axdwc"))))
+ (build-system copy-build-system)
+ (inputs
+ (list gawk
+ coreutils
+ curl
+ fping
+ findutils
+ `(,ldns "drill")))
+ (arguments
+ '(#:install-plan '(("opennic-up" "bin/")
+ ("opennic-up.conf" "etc/")
+ ("README.md" "share/doc/opennic-up/"))
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'patch-executables-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "opennic-up"
+ ((" (awk|drill|curl|sort|cat)" _ exec)
+ (string-append
+ " "
+ (search-input-file
+ inputs
+ (string-append "/bin/" exec)))))
+ (substitute* "opennic-up"
+ ((" (fping)" _ exec)
+ (string-append
+ " "
+ (search-input-file
+ inputs
+ (string-append "/sbin/" exec))))))))))
+ (home-page "https://github.com/kewlfft/opennic-up")
+ (synopsis "OpenNIC auto DNS updater")
+ (description "opennic-up is a DNS wizard for OpenNIC")
+ (license license:lgpl3+)))