From 92ab81c3468b3bd84a455af2fc85a4d64c830503 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Sun, 1 Sep 2019 19:46:27 +0200 Subject: [PATCH 1/3] gnu: Add emacs-ts. * gnu/packages/emacs-xyz.scm (emacs-ts): New variable. --- gnu/packages/emacs-xyz.scm | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 4bfc09d0aa..815a68dc63 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -11113,6 +11113,49 @@ into sections while preserving the structure imposed by any timestamps.") tables of contents.") (license license:gpl3+))) +(define-public emacs-ts + (let ((commit "93c074f2895a204e003e8c7f3033c37d6486fac8") + (revision "1")) + (package + (name "emacs-ts") + (version (git-version "0.1" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/alphapapa/ts.el") + (commit commit))) + (sha256 + (base32 + "0lpyv78k04vbp9glnv14dawcfgi3m49847wlgwfmkdq5cr3fn735")) + (file-name (git-file-name name version)))) + (build-system emacs-build-system) + (propagated-inputs + `(("emacs-s" ,emacs-s) + ("emacs-dash" ,emacs-dash))) + (arguments + ;; XXX: Three tests are failing because of a timezone-related issue + ;; 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 + ;; 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, + ;; 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 + ;; seconds. + + ;; The failing tests all have similar problems, but nothing else about + ;; the library seems particularly off. + `(#:tests? #f + #:test-command '("emacs" "--batch" + "-l" "test/test.el" + "-f" "ert-run-tests-batch-and-exit"))) + (home-page "https://github.com/alphapapa/ts.el") + (synopsis "Timestamp and date/time library") + (description "This package facilitates manipulating dates, times, and +timestamps by providing a @code{ts} struct.") + (license license:gpl3+)))) + (define-public emacs-org-ql (package (name "emacs-org-ql") -- 2.23.0