summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Ziltener <dziltener@lyrion.ch>2025-04-11 16:24:45 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-04-13 20:42:31 +0100
commit33fdb25fac453d1239739b9d5e239f1140b16532 (patch)
treeb6af3802c09b8c79670138690542aa3081cb9da9
parentccdf66cc597561cece796b949211eafa9f089bd7 (diff)
gnu: Add sunwait.
* gnu/packages/astronomy.scm (astronomy): New variable. Co-authored-by: Sharlatan Hellseher <sharlatanus@gmail.com> Change-Id: Ic199327e44078fd81434da19924f1b213d50194c Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
-rw-r--r--gnu/packages/astronomy.scm47
1 files changed, 47 insertions, 0 deletions
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index dfe1a7d6aa6..4773e82bd7e 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -8313,6 +8313,53 @@ a large map and offers more advanced functions: local time of cities, Sun and
Moon position, etc.")
(license license:gpl2+))))
+(define-public sunwait
+ (package
+ (name "sunwait")
+ (version "0.9.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/risacher/sunwait")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0mzc8bb7zzl1ch3v7w08vw2v50yjxvr7phyb78njpq89wy6hsrxz"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:tests? #f ; no tests provided
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ; no configure script is provided
+ (replace 'install
+ (lambda _
+ (install-file "sunwait"
+ (string-append #$output "/bin")))))))
+ (home-page "https://github.com/risacher/sunwait")
+ (synopsis "Sunrise and sunset times calculation")
+ (description
+ "Sunwait calculates sunrise or sunset times with civil, nautical,
+astronomical and custom twilights. The sun's position is calculated using
+time, and position - latitude and longitude should be specified on the command
+line.
+
+Features:
+
+@itemize
+@item calculates sunrise and sunset for given coordinates
+@item can wait for sunrise/sunset, or return DAY or NIGHT codes
+@item works with Windows Task Scheduler (or cron)
+@item supports custom twilight angles
+@item used to automate domestic lighting with Arduino transmitter and radio
+controlled sockets
+@end itemize")
+ (license license:gpl3)))
+
(define-public swarp
(package
(name "swarp")