summaryrefslogtreecommitdiff
path: root/gnu/packages/calendar.scm
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-07-03 15:01:48 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-07-04 12:50:22 +0100
commitbc62e66b9b670e496cf982f7b272f1a05c2c8110 (patch)
tree12bf2dc234b307ae703c3530f1e132bfba13235d /gnu/packages/calendar.scm
parente14ccf95b1249f3ec7ca4b672ff14f0d472f88b3 (diff)
gnu: date: Update to 3.0.1.
* gnu/packages/calendar.scm (date): Update to 3.0.1. [arguments]{phases}: Add phase 'skip-failing-test, adapt phase 'check. * gnu/packages/patches/date-output-pkg-config-files.patch: Update patch accordingly. Change-Id: Ie8b5dff4e8005b2654f2da295a6dd1cc629df001 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/calendar.scm')
-rw-r--r--gnu/packages/calendar.scm104
1 files changed, 51 insertions, 53 deletions
diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm
index a735b5a0cc6..03c9412df3e 100644
--- a/gnu/packages/calendar.scm
+++ b/gnu/packages/calendar.scm
@@ -105,61 +105,59 @@ available in French.")
(license license:gpl2))))
(define-public date
- ;; We make the same choice as the Arch package maintainer by choosing a
- ;; recent commit to fix some bugs.
- ;; https://github.com/Alexays/Waybar/issues/565
- (let ((commit "9a0ee2542848ab8625984fc8cdbfb9b5414c0082"))
- (package
- (name "date")
- (version (string-append "2.4.1-" (string-take commit 8)))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/HowardHinnant/date")
- (commit "9a0ee2542848ab8625984fc8cdbfb9b5414c0082")))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0yxsn0hj22n61bjywysxqgfv7hj5xvsl6isma95fl8xrimpny083"))
- (patches
- ;; Install pkg-config files
- ;; https://github.com/HowardHinnant/date/pull/538
- (search-patches "date-ignore-zonenow.patch"
- "date-output-pkg-config-files.patch"))))
- (inputs (list tzdata))
- (build-system cmake-build-system)
- (arguments
- '(#:configure-flags (list "-DUSE_SYSTEM_TZ_DB=ON"
- "-DBUILD_SHARED_LIBS=ON"
- "-DBUILD_TZ_LIB=ON"
- "-DENABLE_DATE_TESTING=ON")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-bin-bash
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "compile_fail.sh"
- (("/bin/bash") (which "bash")))
- #t))
- (add-after 'unpack 'patch-zoneinfo-path
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "src/tz.cpp"
- (("/usr/share/zoneinfo")
- (search-input-directory inputs
- "share/zoneinfo")))))
- (replace 'check
- (lambda _
- ;; Disable test that requires checking timezone that
- ;; isn't set in the build environment.
- (substitute* "CTestTestfile.cmake"
- (("add_test.tz_test_pass_zoned_time_deduction_test.*") "")
- (("set_tests_properties.tz_test_pass_zoned_time_deduction_test.*") ""))
- (invoke "make" "testit"))))))
- (synopsis "Date and time library for C++11 and C++14")
- (description "Date is a header only C++ library that extends the chrono
+ (package
+ (name "date")
+ (version "3.0.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/HowardHinnant/date")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1qk7pgnk0bpinja28104qha6f7r1xwh5dy3gra7vjkqwl0jdwa35"))
+ (patches
+ ;; Install pkg-config files
+ ;; https://github.com/HowardHinnant/date/pull/538
+ (search-patches "date-ignore-zonenow.patch"
+ "date-output-pkg-config-files.patch"))))
+ (inputs (list tzdata))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:configure-flags (list "-DUSE_SYSTEM_TZ_DB=ON"
+ "-DBUILD_SHARED_LIBS=ON"
+ "-DBUILD_TZ_LIB=ON"
+ "-DENABLE_DATE_TESTING=ON")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-bin-bash
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "compile_fail.sh"
+ (("/bin/bash") (which "bash")))
+ #t))
+ (add-after 'unpack 'patch-zoneinfo-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/tz.cpp"
+ (("/usr/share/zoneinfo")
+ (search-input-directory inputs
+ "share/zoneinfo")))))
+ (add-after 'unpack 'skip-failing-tests
+ ;; Disable test that requires checking timezone that
+ ;; isn't set in the build environment.
+ (lambda _
+ (for-each delete-file
+ '("test/solar_hijri_test/parse.pass.cpp"
+ "test/tz_test/zoned_time_deduction.pass.cpp"))))
+ (replace 'check
+ (lambda _
+ (invoke "make" "testit"))))))
+ (synopsis "Date and time library for C++11 and C++14")
+ (description "Date is a header only C++ library that extends the chrono
date algorithms library for calendar dates and durations. It also provides
the <tz.h> library for handling time zones and leap seconds.")
- (home-page "https://howardhinnant.github.io/date/date.html")
- (license license:expat))))
+ (home-page "https://howardhinnant.github.io/date/date.html")
+ (license license:expat)))
(define-public libical
(package