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-android-stringslib
183
  (package
184
    (name "python-android-stringslib")
185
    (version "0.1.1.1")
186
    (source
187
      (origin
188
        (method git-fetch)
189
        (uri (git-reference
190
	       (url "https://framagit.org/tyreunom/python-android-strings-lib")
191
	       (commit "0415535b125a64eb6da20a6b15ad92456e73ca8d")))
192
	(file-name (git-file-name name version))
193
        (sha256
194
          (base32
195
            "0icalva7a5w8a6qcrgkxkywckdqv8r5j5y9d5m6ln8bbk9s9fbls"))))
196
    (build-system python-build-system)
197
    (arguments
198
     `(#:tests? #f))
199
    (home-page
200
      "https://framagit.org/tyreunom/python-android-strings-lib")
201
    (synopsis
202
      "Android Strings Lib provides support for android's strings.xml files.  These files are used to translate strings in android apps.")
203
    (description
204
      "Android Strings Lib provides support for android's strings.xml files.  These files are used to translate strings in android apps.")
205
    (license license:expat)))
206
207
(define-public python-altgraph
208
  (package
209
    (name "python-altgraph")
210
    (version "0.16.1")
211
    (source
212
      (origin
213
        (method url-fetch)
214
        (uri (pypi-uri "altgraph" version))
215
        (sha256
216
          (base32
217
            "034vgy3nnm58rs4a6k83m9imayxx35k0p3hr22wafyql2w035xfx"))))
218
    (build-system python-build-system)
219
    (home-page "https://altgraph.readthedocs.io")
220
    (synopsis "Python graph (network) package")
221
    (description "Python graph (network) package")
222
    (license license:expat)))
223
224
(define-public python-pyinstaller
225
  (package
226
    (name "python-pyinstaller")
227
    (version "3.5")
228
    (source
229
      (origin
230
        (method url-fetch)
231
        (uri (pypi-uri "PyInstaller" version))
232
        (sha256
233
          (base32
234
            "15ha3mmy4p93rpwcy2b3vcgwfsm5bq9z5yjh88ra6chk5l108xgf"))))
235
    (build-system python-build-system)
236
    (arguments
237
     `(#:tests? #f
238
       #:phases
239
       (modify-phases %standard-phases
240
         (delete 'validate-runpath))))
241
    (propagated-inputs
242
      `(("python-altgraph" ,python-altgraph)
243
        ("python-setuptools" ,python-setuptools)))
244
    (home-page "http://www.pyinstaller.org")
245
    (synopsis
246
      "PyInstaller bundles a Python application and all its dependencies into a single package.")
247
    (description
248
      "PyInstaller bundles a Python application and all its dependencies into a single package.")
249
    (license #f)))
250
251
(package
252
  (name "offlate")
253
  (version "0.4")
254
  (source
255
    (origin
256
      (method git-fetch)
257
      (uri (git-reference
258
             (url "https://framagit.org/tyreunom/offlate")
259
             (commit version)))
260
      (file-name (git-file-name name version))
261
      (sha256
262
       (base32
263
        "10l03j8ajkd1a7sg1zycbpdaz71mscrncw7rwjzqk2ia6j04rwxm"))))
264
  (build-system python-build-system)
265
  (arguments
266
   ;; No tests
267
   `(#:tests? #f))
268
  (propagated-inputs
269
    `(("python-android-stringslib" ,python-android-stringslib)
270
      ("python-dateutil" ,python-dateutil)
271
      ("python-gitlab" ,python-gitlab)
272
      ("python-lxml" ,python-lxml)
273
      ("python-polib" ,python-polib)
274
      ("python-pyenchant" ,python-pyenchant)
275
      ("python-pygit2" ,python-pygit2)
276
      ("python-pyqt" ,python-pyqt)
277
      ("python-requests" ,python-requests)
278
      ("python-ruamel.yaml" ,python-ruamel.yaml)
279
      ("python-translation-finder" ,python-translation-finder)))
280
  (native-inputs
281
   `(("python-pyinstaller" ,python-pyinstaller)))
282
  (home-page
283
    "https://framagit.org/tyreunom/offlate")
284
  (synopsis
285
    "Offline translation interface for online translation tools.")
286
  (description
287
    "Offline translation interface for online translation tools.")
288
  (license license:gpl3+))
289