remove khanat resources, add anki
more/packages/games.scm
45 | 45 | #:use-module (gnu packages pcre) | |
46 | 46 | #:use-module (gnu packages pkg-config) | |
47 | 47 | #:use-module (gnu packages python) | |
48 | + | #:use-module (more packages python) | |
49 | + | #:use-module (gnu packages qt) | |
48 | 50 | #:use-module (gnu packages sdl) | |
49 | 51 | #:use-module (gnu packages tbb) | |
50 | 52 | #:use-module (more packages tcl) | |
… | |||
249 | 251 | (description "") | |
250 | 252 | (license license:agpl3))) | |
251 | 253 | ||
252 | - | (define-public khanat-assets | |
254 | + | (define-public anki | |
253 | 255 | (package | |
254 | - | (name "khanat-assets") | |
255 | - | (version "3.0") | |
256 | + | (name "anki") | |
257 | + | ; the latest stable version requires qt4 webkit which we don't have because | |
258 | + | ; of issues on arm and probably security reasons. | |
259 | + | (version "2.1.0beta3") | |
256 | 260 | (source (origin | |
257 | 261 | (method url-fetch) | |
258 | - | (uri (string-append "https://git.khaganat.net/khaganat/khanat-assets" | |
259 | - | "/repository/archive.tar.bz2?ref=" | |
260 | - | "22abb542c6b87637ccf24bfd79ccd762b35f8f19")) | |
261 | - | (file-name (string-append name "-" version ".tar.bz2")) | |
262 | - | (sha256 | |
263 | - | (base32 | |
264 | - | "1f08s6682v6i909d0gp20pk599685gyhwivqxgs9cxxg6h132azz")))) | |
265 | - | (build-system trivial-build-system) | |
266 | - | (arguments | |
267 | - | `(#:modules ((guix build utils)) | |
268 | - | #:builder | |
269 | - | (begin | |
270 | - | (use-modules (guix build utils)) | |
271 | - | (let* ((source (assoc-ref %build-inputs "source")) | |
272 | - | (output (assoc-ref %outputs "out")) | |
273 | - | (vardir (string-append output "/share/khanat"))) | |
274 | - | (chdir (string-append source "/database")) | |
275 | - | (for-each | |
276 | - | (lambda (file) | |
277 | - | (mkdir-p (dirname (string-append vardir "/" file))) | |
278 | - | (copy-file file (string-append vardir "/" file))) | |
279 | - | (find-files "." "[^/]*")))))) | |
280 | - | (home-page "") | |
281 | - | (synopsis "") | |
282 | - | (description "") | |
283 | - | (license license:cc-by-sa3.0))) | |
284 | - | ||
285 | - | (define-public khanat-resources | |
286 | - | (package | |
287 | - | (name "khanat-resources") | |
288 | - | (version "3.0") | |
289 | - | (source (origin | |
290 | - | (method git-fetch) | |
291 | - | (uri (git-reference | |
292 | - | (url "https://git.khaganat.net/khaganat/khanat-ressources.git") | |
293 | - | (commit "8db7ba5840ced758710696a401ee4a4246eb9b70"))) | |
262 | + | (uri (string-append "https://apps.ankiweb.net/downloads/beta/anki-" | |
263 | + | version "-source.tgz")) | |
294 | 264 | (sha256 | |
295 | 265 | (base32 | |
296 | - | "010z3wvh0bkdbar0n0rvk0pqj87nnk9srgjh8pjx7mic8p517k8j")))) | |
297 | - | (build-system trivial-build-system) | |
266 | + | "1iffc8l856j7c6r8s6y5f79fgf31d4halbhrwfc09zlkasvf9wqg")))) | |
267 | + | (build-system gnu-build-system) | |
268 | + | (propagated-inputs | |
269 | + | `(("python" ,python) | |
270 | + | ("pyaudio" ,python-pyaudio) | |
271 | + | ("pyqt" ,python-pyqt) | |
272 | + | ("sip" ,python-sip))) | |
298 | 273 | (arguments | |
299 | - | `(#:modules ((guix build utils)) | |
300 | - | #:builder | |
301 | - | (begin | |
302 | - | (use-modules (guix build utils)) | |
303 | - | (let* ((source (assoc-ref %build-inputs "source")) | |
304 | - | (output (assoc-ref %outputs "out")) | |
305 | - | (vardir (string-append output "/share/khanat"))) | |
306 | - | (chdir source) | |
307 | - | (for-each | |
308 | - | (lambda (file) | |
309 | - | (mkdir-p (dirname (string-append vardir "/" file))) | |
310 | - | (copy-file file (string-append vardir "/" file))) | |
311 | - | (find-files "." "[^/]*")))))) | |
312 | - | (home-page "") | |
274 | + | `(#:tests? #f | |
275 | + | #:phases | |
276 | + | (modify-phases %standard-phases | |
277 | + | (delete 'configure) | |
278 | + | (delete 'build) | |
279 | + | (replace 'install | |
280 | + | (lambda* (#:key inputs outputs #:allow-other-keys) | |
281 | + | (let* ((output (assoc-ref outputs "out")) | |
282 | + | (bindir (string-append output "/bin")) | |
283 | + | (libdir (string-append output "/lib/python3.5/site-packages"))) | |
284 | + | (for-each | |
285 | + | (lambda (file) | |
286 | + | (mkdir-p (dirname (string-append libdir "/" file))) | |
287 | + | (copy-file file (string-append libdir "/" file))) | |
288 | + | (append (find-files "anki" ".*\\.py") | |
289 | + | (find-files "aqt" ".*\\.py"))) | |
290 | + | (mkdir-p bindir) | |
291 | + | (with-output-to-file (string-append bindir "/anki") | |
292 | + | (lambda _ | |
293 | + | (display | |
294 | + | (string-append | |
295 | + | "#!" (assoc-ref inputs "python") "/bin/python3\n" | |
296 | + | "import aqt\n" | |
297 | + | "aqt.run()\n")))) | |
298 | + | (chmod (string-append bindir "/anki") #o755))))))) | |
299 | + | (home-page "https://apps.ankiweb.net") | |
313 | 300 | (synopsis "") | |
314 | 301 | (description "") | |
315 | - | (license license:cc-by-sa3.0))) | |
302 | + | (license license:gpl2))) |