datepicker

An fzf-like tool to interactively select a date in a provided format

git clone https://git.8pit.net/datepicker.git

 1(use-modules (guix packages)
 2             (guix gexp)
 3             (guix download)
 4             (guix build-system haskell)
 5             ((guix licenses) #:prefix license:)
 6
 7             (gnu packages tmux)
 8             (gnu packages haskell)
 9             (gnu packages haskell-check)
10             (gnu packages haskell-xyz))
11
12;; The version of the time library shipped by ghc-9.2 is too old.
13(define-public ghc-time
14  (package
15    (name "ghc-time")
16    (version "1.14")
17    (source
18     (origin
19       (method url-fetch)
20       (uri (hackage-uri "time" version))
21       (sha256
22        (base32 "0gkzffnvi33ksw4zln0d31dpmqiyl8gicrx04g8j13kjr5ygx86z"))))
23    (build-system haskell-build-system)
24    (properties '((upstream-name . "time")))
25    (inputs (list ghc-random
26                  ghc-tasty
27                  ghc-tasty-hunit
28                  ghc-tasty-quickcheck))
29    (home-page "https://github.com/haskell/time")
30    (synopsis "A time library for Haskell")
31    (description "")
32    (license license:bsd-2)))
33
34(define-public ghc-tasty-tmux
35  (package
36    (name "ghc-tasty-tmux")
37    (version "0.1.0.5")
38    (source
39     (origin
40       (method url-fetch)
41       (uri (hackage-uri "tasty-tmux" version))
42       (sha256
43        (base32 "12v1avr74zsaq2dnssbip7pc6qalh8w7ilqb5z8azplg6h83vh93"))))
44    (build-system haskell-build-system)
45    (properties '((upstream-name . "tasty-tmux")))
46    (propagated-inputs (list tmux))
47    (inputs (list ghc-typed-process
48                  ghc-regex-posix
49                  ghc-tasty
50                  ghc-tasty-hunit))
51    (home-page "https://github.com/purebred-mua/tasty-tmux")
52    (synopsis "Terminal user acceptance testing (UAT) via tmux")
53    (description "")
54    (license license:agpl3)))
55
56(package
57  (name "datepicker")
58  (version "0.1.0")
59  (source (local-file "." "git-checkout"
60                      #:recursive? #t))
61  (inputs
62    (list
63      ghc-9.2))
64  (native-inputs
65    (list ghc-time
66          ghc-vty
67          ghc-vty-unix
68          ghc-optparse-applicative
69
70          ghc-tasty
71          ghc-tasty-tmux
72          ghc-tasty-hunit
73          ghc-tasty-quickcheck))
74  (build-system haskell-build-system)
75  (arguments
76    `(#:phases
77      (modify-phases %standard-phases
78        (add-before 'check 'setenv-check
79          (lambda _
80            (setenv "PATH" (string-append (getcwd) "/dist/build/datepicker:"
81                                          (getenv "PATH"))))))))
82  (synopsis "An fzf-like tool to interactively select a date in a provided format")
83  (description "")
84  (home-page "https://git.8pit.net/datepicker")
85  (license license:gpl3+))