Subject: bug#59399: closed (Re: [bug#59399] [PATCH 1/4] gnu: Add go-github-com-nathan-osman-go-sunrise.)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 24 Nov 2022 09:50:02 +0000

Your bug report

#59399: [PATCH] gnu: Add hebcal.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
59399: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59399
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#59399] [PATCH 1/4] gnu: Add go-github-com-nathan-osman-go-sunrise.
From: Christopher Baines <[email-masked]>
To: "(" <[email-masked]>, Felix Lechner <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Thu, 24 Nov 2022 09:48:27 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

"( via Guix-patches" via <[email-masked]> writes:

> Heya,
>
> On Sun Nov 20, 2022 at 5:23 PM GMT, Felix Lechner wrote:
>> * gnu/packages/golang.scm (go-github-com-nathan-osman-go-sunrise):
>>   New variable.
>
>> * gnu/packages/golang.scm (go-github-com-hebcal-gematriya):
>>   New variable.
>
>> * gnu/packages/golang.scm (go-github-com-hebcal-hebcal-go):
>>   New variable.
>
>> * gnu/packages/calendar.scm (hebcal): New variable.
>
> All LGTM!
>
>     -- (

Thanks both! I've gone ahead and pushed these patches to master as
963e86af87216e8c1f4967e8047e8de415bb1000.

Chris

Subject: [PATCH] gnu: Add hebcal.
From: Felix Lechner <[email-masked]>
To: [email-masked]
Cc: Felix Lechner <[email-masked]>
Date: Sat, 19 Nov 2022 20:15:12 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/calendar.scm (hebcal): New variable.
* gnu/packages/golang.scm
  (go-github-com-hebcal-hebcal-go,
   go-github-com-hebcal-gematriya,
   go-github-com-nathan-osman-go-sunrise): New variables.
---
 gnu/packages/calendar.scm | 36 +++++++++++++++
 gnu/packages/golang.scm   | 95 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 131 insertions(+)

diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm
index 6583810277..41c047f955 100644
--- a/gnu/packages/calendar.scm
+++ b/gnu/packages/calendar.scm
@@ -34,6 +34,7 @@ (define-module (gnu packages calendar)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system go)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system python)
   #:use-module (gnu packages admin)
@@ -45,6 +46,7 @@ (define-module (gnu packages calendar)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages golang)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages perl)
@@ -426,3 +428,37 @@ (define-public gsimplecal
 launched again it closes the running instance.  It can additionally be
 configured to show the current time in different timezones.")
       (license license:bsd-3))))
+
+(define-public hebcal
+  (let ((commit "2384bb88dc1a41a4a5ae57a29fb58b2dd49a475d")
+        (revision "0"))
+    (package
+      (name "hebcal")
+      (version (git-version "5.3.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/hebcal/hebcal")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "12rv3b51jb7wcjwmmizz9jkw7gh37yklys4xncvpzgxdkkfgmmjx"))))
+      (build-system go-build-system)
+      (arguments
+       '(#:import-path "github.com/hebcal/hebcal"))
+      (native-inputs
+       (list go-github-com-hebcal-hebcal-go
+             go-github-com-pborman-getopt))
+      (synopsis "Perpetual Jewish Calendar with holidays and prayer times")
+      (description "Hebcal is a program which converts between Hebrew and Gregorian
+dates, and generates lists of Jewish holidays for any year past, present or future.
+Shabbat and holiday candle lighting and havdalah times are approximated based on
+location.
+
+It can also show daily prayer times, the weekly Torah reading (Parashat HaShavua)
+and the daily leaf of Talmud (Daf Yomi).  The program can furthermore help with the
+counting of the Omer or with the calculation of Hebrew yahrzeits, birthdays or
+anniversaries.")
+      (home-page "https://github.com/hebcal/hebcal")
+      (license license:gpl2+))))
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index b3df51ed5f..1d5493ad40 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2485,6 +2485,101 @@ (define-public go-gopkg-in-go-playground-validator-v9
 @end itemize")
     (license license:expat)))
 
+(define-public go-github-com-nathan-osman-go-sunrise
+  (let ((commit "c8f9f1eb869135f07378e7e3c5ec7a005f806c73")
+        (revision "0"))
+    (package
+      (name "go-github-com-nathan-osman-go-sunrise")
+      (version (git-version "1.1.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/nathan-osman/go-sunrise")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "017zwzx05r5spxcs07dp6bnh7waknzsd819k7aqd8kr819v3x9in"))))
+      (build-system go-build-system)
+      (arguments
+       '(#:import-path "github.com/nathan-osman/go-sunrise"))
+      (home-page "https://github.com/nathan-osman/go-sunrise")
+      (synopsis "Calculates the sunrise and sunset times for a given location")
+      (description
+       "To calculate the sunrise and sunset times, you will need the date of your
+observation and the geographical coordinates in latitude and longitude for the
+location.")
+      (license license:expat))))
+
+(define-public go-github-com-hebcal-gematriya
+  (let ((commit "fe3043f73e415eb82727701d10f2fb40f87675e9")
+        (revision "0"))
+    (package
+      (name "go-github-com-hebcal-gematriya")
+      (version (git-version "1.0.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/hebcal/gematriya")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0xmnb2i80dy380yv8c4pd04bbyqgbc7c40p8hz1vqj2lhbm6jabf"))))
+      (build-system go-build-system)
+      (arguments
+       '(#:import-path "github.com/hebcal/gematriya"))
+      (home-page "https://github.com/hebcal/gematriya")
+      (synopsis "Provides a system of writing numbers as Hebrew letters")
+      (description
+       "Prints numbers as Hebrew letters.  Numerical values are represented using
+letters of the Hebrew alef-bet (alphabet).")
+      (license license:bsd-2))))
+
+(define-public go-github-com-hebcal-hebcal-go
+  (let ((commit "d42e881860cfc9e8249fc79f268091c3c4d36b0d")
+        (revision "0"))
+    (package
+      (name "go-github-com-hebcal-hebcal-go")
+      (version (git-version "0.9.11" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/hebcal/hebcal-go")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1m9akb8pwxchpaci05gambshrzw626gsrfhl25f36vjl7mq5292n"))))
+      (build-system go-build-system)
+      (arguments
+       (list
+        #:import-path "github.com/hebcal/hebcal-go"
+        ;; Source-only package
+        #:tests? #f
+        #:phases
+        #~(modify-phases %standard-phases
+            ;; Source-only package
+            (delete 'build))))
+      (propagated-inputs
+       (list go-github-com-hebcal-gematriya
+             go-github-com-nathan-osman-go-sunrise
+             go-github-com-stretchr-testify))
+      (home-page "https://github.com/hebcal/hebcal-go")
+      (synopsis "Library module for Hebcal, a perpetual Jewish Calendar")
+      (description
+       "This library converts between Hebrew and Gregorian dates, and generates lists
+of Jewish holidays for any year (past, present or future).  Shabbat and holiday candle
+lighting and havdalah times are approximated based on location.
+
+Torah readings (Parashat HaShavua), Daf Yomi, and counting of the Omer can also be
+specified.  Hebcal also includes algorithms to calculate yahrzeits, birthdays and
+anniversaries.")
+      (license license:gpl2+))))
+
 (define-public go-github-com-aws-sdk
   (package
     (name "go-github-com-aws-sdk")

base-commit: ac09fcb955e9358c330d728693759ca1a2e20542
-- 
2.38.1