gnu: emacs-ts: Update to 0.3.

* gnu/packages/emacs-xyz.scm (emacs-ts): Update to 0.3.
[arguments]: Use G-expressions.  Remove traling #T.
<#:phases>: Skip a slightly different set of tests.
[propagated-inputs]: Re-order alphabetically.
This commit is contained in:
Nicolas Goaziou 2022-11-05 00:02:37 +01:00
parent 3a227cff36
commit 0f8f9844a9
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -19687,66 +19687,68 @@ tables of contents.")
(license license:gpl3+))) (license license:gpl3+)))
(define-public emacs-ts (define-public emacs-ts
(package ;; XXX: Upstream did not tag last release. Use commit matching version
(name "emacs-ts") ;; bump.
(version "0.2.2") (let ((commit "552936017cfdec89f7fc20c254ae6b37c3f22c5b"))
(source (package
(origin (name "emacs-ts")
(method git-fetch) (version "0.3")
(uri (git-reference (source
(url "https://github.com/alphapapa/ts.el") (origin
(commit version))) (method git-fetch)
(sha256 (uri (git-reference
(base32 "0l35gz1hpada2kzascbyqgawa5d3sdyg67gzvak84p9zx62jppn8")) (url "https://github.com/alphapapa/ts.el")
(file-name (git-file-name name version)))) (commit commit)))
(build-system emacs-build-system) (sha256
(propagated-inputs (base32 "18lif159zndl19ddz9rfq12l90770858yasfns21ryl1yrq3aifr"))
(list emacs-s emacs-dash)) (file-name (git-file-name name version))))
(arguments (build-system emacs-build-system)
;; XXX: Three tests are failing because of a timezone-related issue (arguments
;; with how they're written. On my machine, all the failing test ;; XXX: Three tests are failing because of a timezone-related issue
;; results are 18000 seconds (5 hours) off. ;; with how they're written. On my machine, all the failing test
;; results are 18000 seconds (5 hours) off.
;; The ts-parse-org function accepts a string without any timezone ;; The ts-parse-org function accepts a string without any timezone
;; info, not assumed to be in Unix time, and converts it to a so-called ;; info, not assumed to be in Unix time, and converts it to a so-called
;; ts struct. The ts-unix function (accessor) accepts a ts struct, ;; ts struct. The ts-unix function (accessor) accepts a ts struct,
;; then seems to assume the struct's corresponding time is in terms of ;; then seems to assume the struct's corresponding time is in terms of
;; the user's current time zone, before returning a Unix time in ;; the user's current time zone, before returning a Unix time in
;; seconds. ;; seconds.
;; The failing tests all have similar problems, but nothing else about ;; The failing tests all have similar problems, but nothing else about
;; the library seems particularly off. ;; the library seems particularly off.
(list
`(#:tests? #t #:tests? #t
#:test-command '("emacs" "--batch" #:test-command #~(list "emacs" "--batch"
"-l" "test/test.el" "-l" "test/test.el"
"-f" "ert-run-tests-batch-and-exit") "-f" "ert-run-tests-batch-and-exit")
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-before 'check 'make-tests-writable (add-before 'check 'make-tests-writable
(lambda _ (lambda _
(make-file-writable "test/test.el") (make-file-writable "test/test.el")))
#t)) (add-before 'check 'delete-failing-tests
(add-before 'check 'delete-failing-tests (lambda _
(lambda _ (emacs-batch-edit-file "test/test.el"
(emacs-batch-edit-file "test/test.el" `(progn
`(progn (progn (goto-char (point-min))
(goto-char (point-min)) (dolist (test-regexp
(dolist (test-regexp '("ert-deftest ts-fill"
'("ert-deftest ts-format" "ert-deftest ts-format"
"ert-deftest ts-parse-org\\_>" "ert-deftest ts-parse-org\\_>"
"ert-deftest ts-parse-org-element" "ert-deftest ts-parse-org-element"))
"ert-deftest ts-update")) (re-search-forward test-regexp)
(re-search-forward test-regexp) (beginning-of-line)
(beginning-of-line) (kill-sexp)
(kill-sexp))) (goto-char (point-min)))
(basic-save-buffer))) (basic-save-buffer))))))))
#t))))) (propagated-inputs
(home-page "https://github.com/alphapapa/ts.el") (list emacs-dash emacs-s))
(synopsis "Timestamp and date/time library") (home-page "https://github.com/alphapapa/ts.el")
(description "This package facilitates manipulating dates, times, and (synopsis "Timestamp and date/time library")
(description "This package facilitates manipulating dates, times, and
timestamps by providing a @code{ts} struct.") timestamps by providing a @code{ts} struct.")
(license license:gpl3+))) (license license:gpl3+))))
(define-public emacs-circadian (define-public emacs-circadian
(package (package