aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanketsu <hanketsu@egregore.fun>2025-03-14 13:06:19 +0100
committerHanketsu <hanketsu@egregore.fun>2025-06-13 00:04:50 +0200
commitebb882b2bfbb7763e866795b518d9cd1a027270f (patch)
treed0be746736ce3f04e8c8d3ccb3dcc77bf3bbb25c
parenta7d03f90953c6d87118d3a48e8c0be5ee06288d6 (diff)
battering: Add opennic-up.
* battering/packages/dns.scm (opennic-up): New variable.
-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+)))