summaryrefslogtreecommitdiff
path: root/guix/vkraus/packages/h4sp.scm
blob: badeeee8c89d80a25a40774e7a9fd654c8309548 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
(define-module (vkraus packages h4sp))

(use-modules
 (guix packages)
 ((guix licenses) #:prefix license:)
 (guix download)
 (guix git-download)
 (guix build-system gnu)
 (guix licenses)
 (guix gexp)
 (gnu packages)
 (gnu packages autotools)
 (gnu services web))

(define-public h4sp
  (package
   (name "h4sp")
   (version "1.2.4")
   (source (origin
            (method git-fetch)
            (uri (git-reference
                  (url "https://labo.planete-kraus.eu/h4sp.git")
                  (commit version)))
            (sha256
             (base32
              "1gr9cabzd0ckv3kqk5xk96j5mj4xhjwrf22kcxq12ksx5872kvkx"))
            (snippet
             `(begin
                (with-output-to-file ".tarball-version"
                  (lambda _ (format #t "~a~%" ,version)))
                #t))))
   (build-system gnu-build-system)
   (native-inputs
    `(("autoconf" ,autoconf)
      ("autoconf-archive" ,autoconf-archive)
      ("automake" ,automake)))
   (inputs `())
   (synopsis "HTML for Scientific Publications")
   (description "HTML is not sufficient for scientific publications. However, LaTeX is not a good markup language. To bring LaTeX equations, bibliography and other scientific elements to HTML, we employ some stylesheets to generate proper LaTeX from HTML plus a few namespaces.")
   (home-page "https://labo.planete-kraus.eu/h4sp.git")
   (native-search-paths
    (list (search-path-specification
           (variable "XML_CATALOG_FILES")
           (files '("share/h4sp/catalog"))
           (separator " ")
           (file-type 'file))))
   (license license:gpl3+)))

(define website-files
  (file-union
   "h4sp-website-files"
   `(("transform"
      ,(file-append h4sp (format #f "/share/h4sp/xslt/~a" (package-version h4sp)))))))

(define-public h4sp:website
  (nginx-server-configuration
   (server-name '("h4sp.planete-kraus.eu"))
   (listen '("443 ssl" "[::]:443 ssl"))
   (ssl-certificate
    "/etc/letsencrypt/live/planete-kraus.eu/fullchain.pem")
   (ssl-certificate-key
    "/etc/letsencrypt/live/planete-kraus.eu/privkey.pem")
   (root website-files)))