~whereiseveryone/guixrus

guixrus/guixrus/packages/jrnl.scm -rw-r--r-- 7.1 KiB
cf656396jgart add emacs-charles 5 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Eric Bavier <address@hidden>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guixrus packages jrnl)
  #:use-module (guix packages)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix git-download)
  #:use-module (guix download)
  #:use-module (guix build-system python)
  #:use-module (gnu packages check)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages django)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-build)
  #:use-module (gnu packages python-crypto)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages time))

(define-public jrnl
  (package
    (name "jrnl")
    (version "2.8.4")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/jrnl-org/jrnl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0iqcycqb3xryw35d76qvqqy1b1gibyfx3y8ys5mixyf3dwcvxnqi"))))
    (build-system python-build-system)
    (arguments
     `(#:tests? #f
       #:phases
       (modify-phases %standard-phases
         (replace 'build
           (lambda _
             (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out"))
                   (whl (car (find-files "dist" "\\.whl$"))))
               (invoke "pip" "--no-cache-dir" "--no-input"
                       "install" "--no-deps" "--prefix" out whl))))
         (replace 'check
           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
             (when tests?
               (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
                 (setenv "PATH" (string-append (getenv "PATH") ":" bin)))
               (add-installed-pythonpath inputs outputs)
               (invoke "pytest" "-vv")))))))
    (native-inputs
         (list python-poetry-core
               python-pypa-build
               ;python-pytest-bdd ; tests are failing
               python-toml
               python-pytest))
    (inputs
     (list python
           python-ansiwrap
           python-asteval
           python-colorama
           python-cryptography
           python-keyring
           python-parsedatetime
           python-dateutil
           python-pytz
           python-pyxdg
           python-pyyaml
           python-tzlocal))
    (home-page "https://jrnl.sh/")
    (synopsis "Personal journal application")
    (description
     "Jrnl is a command line journal application that stores your journal in a
plain text file.  Optionally, your journal can be encrypted using 256-bit AES
encryption.")
    (license license:gpl3+)))

(define-public python-textwrap3
  (package
    (name "python-textwrap3")
    (version "0.9.2")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "textwrap3" version ".zip"))
              (sha256
               (base32
                "051l1h7f8xdwfjx55n8iflczcmfkasw1i3ynvh1n6vr3vgmyw22h"))))
    (build-system python-build-system)
    (arguments
     `(#:tests? #f))
    (native-inputs (list unzip))
    (home-page "https://github.com/jonathaneunice/textwrap3")
    (synopsis "textwrap from Python 3.6 backport (plus a few tweaks)")
    (description "textwrap from Python 3.6 backport (plus a few tweaks)")
    (license #f)))

(define-public python-ansiwrap
  (package
    (name "python-ansiwrap")
    (version "0.8.4")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "ansiwrap" version ".zip"))
              (sha256
               (base32
                "1dyrm0gd14s8x7pn1p4ch5ls7ybldww2rzzq37wrprfd6h3p836a"))))
    (build-system python-build-system)
    (arguments
     `(#:tests? #f))
    (propagated-inputs (list python-textwrap3))
    (native-inputs (list unzip))
    (home-page "https://github.com/jonathaneunice/ansiwrap")
    (synopsis "textwrap, but savvy to ANSI colors and styles")
    (description "textwrap, but savvy to ANSI colors and styles")
    (license #f)))

(define-public python-pytest-bdd
  (package
    (name "python-pytest-bdd")
    (version "5.0.0")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "pytest-bdd" version))
              (sha256
               (base32
                "1krr58mcx499icc4m9frbcsdwh2g1v4r7q4dqvh1xrfmscz0kdzs"))))
    (build-system python-build-system)
    (propagated-inputs (list python-glob2
                             python-mako
                             python-parse
                             python-parse-type
                             python-py
                             python-pytest))
    (home-page "https://github.com/pytest-dev/pytest-bdd")
    (synopsis "BDD for pytest")
    (description "BDD for pytest")
    (license license:expat)))

(define-public python-jedi
  (package
    (name "python-jedi")
    (version "0.18.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/davidhalter/jedi")
             (commit (string-append "v" version))
             (recursive? #true)))
       (file-name (git-file-name name version))
       (sha256
        (base32
         "07drmi3ai49jw5n23ibkambcgijqcw073ihypjgxfnks5lv4yqy1"))))
    (build-system python-build-system)
    (arguments
     `(#:tests? #f
       #:phases
       (modify-phases %standard-phases
         (replace 'check
           (lambda* (#:key tests? #:allow-other-keys)
             (when tests?
               (setenv "HOME" "/tmp")
               (invoke "python" "-m" "pytest" "-vv")))))))
    (native-inputs
     (list python-colorama python-docopt python-pytest python-django-3.1.14))
    (propagated-inputs
     (list python-parso))
    (home-page "https://github.com/davidhalter/jedi")
    (synopsis "Autocompletion and static analysis library for Python")
    (description
     "Jedi is a static analysis tool for Python that can be used in Integrated
Development Environments (@dfn{IDE}s) and text editors.  It understands Python
on a deeper level than many other static analysis frameworks for Python.

Jedi understands docstrings and you can use Jedi autocompletion in your REPL
as well.")
    (license license:expat)))