offlate/guix.scm

guix.scm

1
(use-modules
2
  ((guix licenses) #:prefix license:)
3
  (guix build-system python)
4
  (guix download)
5
  (guix git-download)
6
  (guix packages)
7
  (gnu packages aspell)
8
  (gnu packages check)
9
  (gnu packages enchant)
10
  (gnu packages libreoffice)
11
  (gnu packages python-web)
12
  (gnu packages python-xyz)
13
  (gnu packages qt)
14
  (gnu packages serialization)
15
  (gnu packages time)
16
  (gnu packages version-control))
17
18
(define-public python-pyenchant
19
  (package
20
    (name "python-pyenchant")
21
    (version "2.0.0")
22
    (source (origin
23
              (method url-fetch)
24
              (uri (pypi-uri "pyenchant" version))
25
              (sha256
26
               (base32
27
                "1872ckgdip8nj9rnh167m0gsj5754qfg2hjxzsl1s06f5akwscgw"))))
28
    (build-system python-build-system)
29
    (arguments
30
     `(#:tests? #f; FIXME: Dictionary for language 'en_US' could not be found
31
       #:phases
32
       (modify-phases %standard-phases
33
         (add-before 'build 'setlib
34
           (lambda* (#:key inputs #:allow-other-keys)
35
             (substitute* "enchant/_enchant.py"
36
               (("/opt/local/lib/libenchant.dylib\"")
37
                (string-append "/opt/local/lib/libenchant.dylib\"\n"
38
                               "    yield \"" (assoc-ref inputs "enchant")
39
                               "/lib/libenchant-2.so\""))))))))
40
             ;(setenv "PYENCHANT_LIBRARY_PATH"
41
             ;        (string-append (assoc-ref inputs "enchant") "/lib/libenchant.so")))))))
42
    (propagated-inputs
43
     `(("enchant" ,enchant)
44
       ("hunspell" ,hunspell)))
45
    (native-inputs
46
     `(("hunspell-dict-en-us" ,hunspell-dict-en-us)))
47
    (home-page "")
48
    (synopsis "")
49
    (description "")
50
    (license license:lgpl2.1+)))
51
52
(define-public python-check-manifest
53
  (package
54
    (name "python-check-manifest")
55
    (version "0.37")
56
    (source
57
      (origin
58
        (method url-fetch)
59
        (uri (pypi-uri "check-manifest" version))
60
        (sha256
61
          (base32
62
            "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
63
    (build-system python-build-system)
64
    (native-inputs
65
      `(("python-mock" ,python-mock)
66
        ("git" ,git)))
67
    (home-page
68
      "https://github.com/mgedmin/check-manifest")
69
    (synopsis
70
      "Check MANIFEST.in in a Python source package for completeness")
71
    (description
72
      "Check MANIFEST.in in a Python source package for completeness")
73
    (license license:expat)))
74
75
(define-public python-codacy-coverage
76
  (package
77
    (name "python-codacy-coverage")
78
    (version "1.3.11")
79
    (source
80
      (origin
81
        (method url-fetch)
82
        (uri (pypi-uri "codacy-coverage" version))
83
        (sha256
84
          (base32
85
            "1g0c0w56xdkmqb8slacyw5qhzrkp814ng3ddh2lkiij58y9m2imr"))))
86
    (build-system python-build-system)
87
    (arguments
88
     ;; No tests
89
     `(#:tests? #f))
90
    (propagated-inputs
91
      `(("python-check-manifest" ,python-check-manifest)))
92
    (home-page
93
      "https://github.com/codacy/python-codacy-coverage")
94
    (synopsis "Codacy coverage reporter for Python")
95
    (description
96
      "Codacy coverage reporter for Python")
97
    (license license:expat)))
98
99
(define-public python-translation-finder
100
  (package
101
    (name "python-translation-finder")
102
    (version "1.6")
103
    (source
104
      (origin
105
        (method url-fetch)
106
        (uri (pypi-uri "translation-finder" version))
107
        (sha256
108
          (base32
109
            "0lq9441ziiq8aw8ldippkcvzhyw12lfra72kc6f5ik3rvw612m2a"))))
110
    (build-system python-build-system)
111
    (arguments
112
     `(#:phases
113
       (modify-phases %standard-phases
114
	 (add-before 'build 'remove-failing-test
115
	   (lambda _
116
	     (delete-file "translation_finder/test_api.py")
117
	     #t)))))
118
    (propagated-inputs
119
      `(("python-chardet" ,python-chardet)
120
        ("python-pathlib2" ,python-pathlib2)
121
	("python-ruamel.yaml" ,python-ruamel.yaml)
122
        ("python-six" ,python-six)))
123
    (native-inputs
124
     `(("python-codecov" ,python-codecov)
125
       ("python-codacy-coverage" ,python-codacy-coverage)
126
       ("python-pytest-cov" ,python-pytest-cov)
127
       ("python-pytest-runner" ,python-pytest-runner)
128
       ("python-twine" ,python-twine)))
129
    (home-page "https://weblate.org/")
130
    (synopsis
131
      "A translation file finder for Weblate, translation tool with tight version control integration")
132
    (description
133
      "A translation file finder for Weblate, translation tool with tight version control integration")
134
    (license license:gpl3+)))
135
136
(define-public python-httmock
137
  (package
138
    (name "python-httmock")
139
    (version "1.3.0")
140
    (source
141
      (origin
142
        (method url-fetch)
143
        (uri (pypi-uri "httmock" version))
144
        (sha256
145
          (base32
146
            "1zj1fcm0n6f0wr9mr0hmlqz9430fnr5cdwd5jkcvq9j44bnsrfz0"))))
147
    (build-system python-build-system)
148
    (arguments
149
     ;; Tests can't be run?
150
     `(#:tests? #f))
151
    (propagated-inputs
152
      `(("python-requests" ,python-requests)))
153
    (home-page "https://github.com/patrys/httmock")
154
    (synopsis "A mocking library for requests.")
155
    (description "A mocking library for requests.")
156
    (license license:asl2.0)))
157
158
(define-public python-gitlab
159
  (package
160
    (name "python-gitlab")
161
    (version "1.10.0")
162
    (source
163
      (origin
164
        (method url-fetch)
165
        (uri (pypi-uri "python-gitlab" version))
166
        (sha256
167
          (base32
168
            "0n2s4cmmrhx1yxpfa6xfkncairgrcvcmvhq2sx4k0k65cy9ipsf4"))))
169
    (build-system python-build-system)
170
    (propagated-inputs
171
      `(("python-requests" ,python-requests)
172
        ("python-six" ,python-six)))
173
    (native-inputs
174
     `(("python-httmock" ,python-httmock)
175
       ("python-mock" ,python-mock)))
176
    (home-page
177
      "https://github.com/python-gitlab/python-gitlab")
178
    (synopsis "Interact with GitLab API")
179
    (description "Interact with GitLab API")
180
    (license license:lgpl3+)))
181
182
(define-public python-altgraph
183
  (package
184
    (name "python-altgraph")
185
    (version "0.16.1")
186
    (source
187
      (origin
188
        (method url-fetch)
189
        (uri (pypi-uri "altgraph" version))
190
        (sha256
191
          (base32
192
            "034vgy3nnm58rs4a6k83m9imayxx35k0p3hr22wafyql2w035xfx"))))
193
    (build-system python-build-system)
194
    (home-page "https://altgraph.readthedocs.io")
195
    (synopsis "Python graph (network) package")
196
    (description "Python graph (network) package")
197
    (license license:expat)))
198
199
(define-public python-pyinstaller
200
  (package
201
    (name "python-pyinstaller")
202
    (version "3.5")
203
    (source
204
      (origin
205
        (method url-fetch)
206
        (uri (pypi-uri "PyInstaller" version))
207
        (sha256
208
          (base32
209
            "15ha3mmy4p93rpwcy2b3vcgwfsm5bq9z5yjh88ra6chk5l108xgf"))))
210
    (build-system python-build-system)
211
    (arguments
212
     `(#:tests? #f
213
       #:phases
214
       (modify-phases %standard-phases
215
         (delete 'validate-runpath))))
216
    (propagated-inputs
217
      `(("python-altgraph" ,python-altgraph)
218
        ("python-setuptools" ,python-setuptools)))
219
    (home-page "http://www.pyinstaller.org")
220
    (synopsis
221
      "PyInstaller bundles a Python application and all its dependencies into a single package.")
222
    (description
223
      "PyInstaller bundles a Python application and all its dependencies into a single package.")
224
    (license #f)))
225
226
(package
227
  (name "offlate")
228
  (version "0.4")
229
  (source
230
    (origin
231
      (method git-fetch)
232
      (uri (git-reference
233
             (url "https://framagit.org/tyreunom/offlate")
234
             (commit version)))
235
      (file-name (git-file-name name version))
236
      (sha256
237
       (base32
238
        "10l03j8ajkd1a7sg1zycbpdaz71mscrncw7rwjzqk2ia6j04rwxm"))))
239
  (build-system python-build-system)
240
  (arguments
241
   ;; No tests
242
   `(#:tests? #f))
243
  (propagated-inputs
244
    `(("python-dateutil" ,python-dateutil)
245
      ("python-gitlab" ,python-gitlab)
246
      ("python-lxml" ,python-lxml)
247
      ("python-polib" ,python-polib)
248
      ("python-pyenchant" ,python-pyenchant)
249
      ("python-pygit2" ,python-pygit2)
250
      ("python-pyqt" ,python-pyqt)
251
      ("python-requests" ,python-requests)
252
      ("python-ruamel.yaml" ,python-ruamel.yaml)
253
      ("python-translation-finder" ,python-translation-finder)))
254
  (native-inputs
255
   `(("python-pyinstaller" ,python-pyinstaller)))
256
  (home-page
257
    "https://framagit.org/tyreunom/offlate")
258
  (synopsis
259
    "Offline translation interface for online translation tools.")
260
  (description
261
    "Offline translation interface for online translation tools.")
262
  (license license:gpl3+))
263