Update cron jobs

Julien LepillerFri Aug 12 09:50:50+0200 2022

495458f

Update cron jobs

systems/xana.scm

2323
(use-modules (gnu services web))
2424
(use-modules (config certbot) (config network) (config os) (config web))
2525
(use-modules (guix gexp))
26-
(use-package-modules base compression gettext guile guile-xyz linux version-control
27-
                     web wget)
26+
(use-package-modules base compression gettext gnupg guile guile-xyz linux
27+
                     version-control web wget)
28+
(use-modules (packages mecab))
2829
2930
(define lepiller-policy
3031
  (append

3435
    '("error_page 404 /$lang/404.html;")))
3536
3637
(define (makefile-job directory target packages env)
37-
  #~(lambda ()
38+
  #~(begin
3839
      (define path
3940
        (string-join
4041
          (map (lambda (p) (string-append p "/bin")) (list #$@packages))
4142
          ":"))
4243
      (define (get-path dir)
4344
        (string-join
44-
          (map (lambda (p) (string-append p "/" path) (list #$@packages)))
45+
          (map (lambda (p) (string-append p "/" dir)) (list #$@packages))
4546
          ":"))
4647
      (setenv "PATH" path)
4748
      (setenv "GIT_SSL_CAINFO" "/etc/ssl/certs/ca-certificates.crt")

5657
5758
(define i18n-download-job
5859
  #~(job '(next-minute-from (next-hour '(05)) '(51))
59-
         #$(makefile-job "/srv/http/i18n" "fdroid-update"
60-
                         (list gnu-make coreutils findutils git)
61-
                         '())))
60+
         #$(program-file
61+
             "i18n-download"
62+
             (makefile-job "/srv/http/i18n" "fdroid-update"
63+
                           (list gnu-make coreutils findutils git)
64+
                           '()))))
6265
6366
(define i18n-compile-job
6467
  #~(job '(next-minute-from (next-hour '(06)) '(21))
65-
         #$(makefile-job "/srv/http/i18n" "all"
66-
                         (list gnu-make coreutils findutils git grep util-linux)
67-
                         '())))
68+
         #$(program-file
69+
             "i18n-compile"
70+
             (makefile-job "/srv/http/i18n" "all"
71+
                           (list gnu-make coreutils findutils git grep util-linux)
72+
                           '()))))
6873
6974
(define nani-download-job
7075
  #~(job '(next-minute-from (next-hour-from (next-day (range 1 31 5)) '(02)) '(12))
71-
         #$(makefile-job "/srv/http/nani" "download"
72-
                         (list gnu-make coreutils findutils grep gzip libiconv
73-
                               sed tar unzip util-linux wget xz)
74-
                         '())))
76+
         #$(program-file
77+
             "nani-download"
78+
             (makefile-job "/srv/http/nani" "download"
79+
                           (list gnu-make coreutils findutils grep gzip libiconv
80+
                                 git sed tar unzip util-linux wget xz)
81+
                           '()))))
7582
7683
(define nani-update-job
7784
  #~(job '(next-minute-from (next-hour-from (next-day (range 1 31 5)) '(03)) '(12))
78-
         #$(makefile-job "/srv/http/nani" "all"
79-
                         (list gnu-make coreutils findutils gnu-gettext grep guile-3.0
80-
                               haunt sed)
81-
                         '(("GUILE_LOAD_PATH" . "share/guile/site/3.0")
82-
                           ("GUILE_LOAD_COMPILED_PATH" . "share/guile/site/3.0")))))
85+
         #$(program-file
86+
             "nani-update"
87+
             (makefile-job "/srv/http/nani" "all"
88+
                           (list gnu-make coreutils findutils gnu-gettext grep
89+
                                 guile-3.0 haunt sed guile-gcrypt
90+
                                 mecab mecab-ipadic guile-mecab)
91+
                           '(("GUILE_LOAD_PATH" . "share/guile/site/3.0")
92+
                             ("GUILE_LOAD_COMPILED_PATH" . "lib/guile/3.0/site-ccache")
93+
                             ("MECAB_DICDIR" . "lib/mecab/dic"))))))
8394
8495
(operating-system
8596
  (inherit (tyreunom-os "xana"))