guix.scm
1 | (use-modules |
2 | ((guix licenses) #:prefix license:) |
3 | (guix build-system python) |
4 | (guix download) |
5 | (guix git-download) |
6 | (guix git) |
7 | (guix packages) |
8 | (guix utils) |
9 | (gnu packages aspell) |
10 | (gnu packages check) |
11 | (gnu packages enchant) |
12 | (gnu packages fontutils) |
13 | (gnu packages freedesktop) |
14 | (gnu packages libreoffice) |
15 | (gnu packages python) |
16 | (gnu packages python-web) |
17 | (gnu packages python-xyz) |
18 | (gnu packages qt) |
19 | (gnu packages serialization) |
20 | (gnu packages sphinx) |
21 | (gnu packages time) |
22 | (gnu packages version-control) |
23 | (gnu packages xml)) |
24 | |
25 | (define my-python-android-stringslib |
26 | (package |
27 | (inherit python-android-stringslib) |
28 | (source (origin |
29 | (method git-fetch) |
30 | (uri (git-reference |
31 | (url "https://framagit.org/tyreunom/python-android-strings-lib") |
32 | (commit "bea536ba7878ac1b569af45bffa2e4396bf134dc"))) |
33 | (file-name (git-file-name "python-android-stringslib" "1.2")) |
34 | (sha256 |
35 | (base32 |
36 | "01adzm17cs5980f7d2222lpgdar5n99chyap7541aa4wc6gm9wqs")))))) |
37 | |
38 | (define-public offlate |
39 | (package |
40 | (name "offlate") |
41 | (version "0.5") |
42 | (source (git-checkout (url (dirname (current-filename))))) |
43 | (build-system python-build-system) |
44 | (arguments |
45 | `(#:modules ((guix build python-build-system) |
46 | (guix build qt-utils) |
47 | (guix build utils)) |
48 | #:imported-modules (,@%python-build-system-modules |
49 | (guix build qt-utils)) |
50 | ;; No tests |
51 | #:tests? #f |
52 | #:phases |
53 | (modify-phases %standard-phases |
54 | (add-before 'build 'generate-fonts |
55 | (lambda _ |
56 | (invoke "make" "fonts"))) |
57 | (add-after 'install 'wrap-qt |
58 | (lambda* (#:key inputs outputs #:allow-other-keys) |
59 | (let ((out (assoc-ref outputs "out"))) |
60 | (wrap-qt-program "offlate" #:output out #:inputs inputs)))) |
61 | (add-after 'install 'wrap-offlate |
62 | (lambda* (#:key outputs #:allow-other-keys) |
63 | (wrap-program |
64 | (string-append (assoc-ref outputs "out") "/bin/offlate") |
65 | `("PYTHONPATH" ":" prefix |
66 | (,(string-append (getenv "PYTHONPATH") ":" |
67 | (assoc-ref outputs "out") "/lib/python" |
68 | ,(version-major+minor (package-version python-wrapper)) |
69 | "/site-packages"))))))))) |
70 | (inputs |
71 | `(("python-android-stringslib" ,my-python-android-stringslib) |
72 | ("python-dateutil" ,python-dateutil) |
73 | ("python-gitlab" ,python-gitlab) |
74 | ("python-lxml" ,python-lxml) |
75 | ("python-polib" ,python-polib) |
76 | ("python-pycountry" ,python-pycountry) |
77 | ("python-pyenchant" ,python-pyenchant) |
78 | ("python-pygit2" ,python-pygit2) |
79 | ("python-pygithub" ,python-pygithub) |
80 | ("python-pyqt" ,python-pyqt) |
81 | ("python-requests" ,python-requests) |
82 | ("python-ruamel.yaml" ,python-ruamel.yaml) |
83 | ("python-translate-toolkit" ,python-translate-toolkit) |
84 | ("python-translation-finder" ,python-translation-finder) |
85 | ("python-watchdog" ,python-watchdog))) |
86 | (native-inputs |
87 | `(("fontforge" ,fontforge) |
88 | ("qttools" ,qttools) |
89 | ("python-sphinx" ,python-sphinx))) |
90 | (home-page "https://framagit.org/tyreunom/offlate") |
91 | (synopsis "Offline translation interface for online translation tools") |
92 | (description "Offlate offers a unified interface for different translation |
93 | file formats, as well as many different online translation platforms. You can |
94 | use it to get work from online platforms, specialized such as the Translation |
95 | Project, or not such a gitlab instance when your upstream doesn't use any |
96 | dedicated platform. The tool proposes a unified interface for any format and |
97 | an upload option to send your work back to the platform.") |
98 | (license license:gpl3+))) |
99 | |
100 | offlate |
101 |