summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2025-01-08 19:18:05 +0100
committerEkaitz Zarraga <ekaitz@elenq.tech>2025-01-08 19:18:05 +0100
commit1a11c24858bf5ff3af351af62f3f7ba8dca9e491 (patch)
tree068929fe49ff0e0f48c6547a8c31605eade369c8
parent2f27f8c2a2ff2e8d44577053e1a433ca289bfdd1 (diff)
elenq: documentation: elenqdoc + fix templates
Fix XDG_DATA_HOME clobber issue with a wrapped `elenqdoc` until we make pandoc support XDG_DATA_DIRS. See: <https://github.com/jgm/pandoc/issues/7922>
-rw-r--r--elenq/documentation.scm37
1 files changed, 35 insertions, 2 deletions
diff --git a/elenq/documentation.scm b/elenq/documentation.scm
index 3ce728f..d61725c 100644
--- a/elenq/documentation.scm
+++ b/elenq/documentation.scm
@@ -3,7 +3,8 @@
#:use-module (guix build-system copy)
#:use-module (guix gexp)
#:use-module (guix git-download)
- #:use-module (guix packages))
+ #:use-module (guix packages)
+ #:use-module (gnu packages haskell-xyz))
(define-public pandoc-templates
(let ((revision "1")
@@ -22,10 +23,42 @@
(arguments (list #:install-plan ''(("pandoc" "/share/pandoc"))))
(native-search-paths
(list (search-path-specification
- (variable "XDG_DATA_HOME")
+ (variable "XDG_DATA_DIRS") ;; Not supported by pandoc _yet_
(files '("share")))))
(home-page "http://git.elenq.tech/pandoc-templates")
(synopsis "Pandoc templates for ElenQ Technology")
(description "A set of well configured Pandoc templates for ElenQ
Technology's documents.")
(license license:asl2.0))))
+
+
+(define-public elenqdoc
+ (let ((revision "1")
+ (commit "1cb21742a69f681e6452a7ddd0adc9543aefd72a"))
+ (package
+ (name "elenqdoc")
+ (version "1.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "git://git.elenq.tech/elenqdoc")
+ (commit commit)))
+ (sha256
+ (base32 "0fdxskf3h14vdr9w5pi18svrz40p9qkbwcn4c4rp1b1azpbfsa6s"))))
+ (build-system copy-build-system)
+ (inputs (list pandoc-templates))
+ (propagated-inputs (list pandoc))
+ (arguments
+ (list
+ #:install-plan ''(("elenqdoc" "/bin/elenqdoc"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'wrap
+ (lambda _
+ (wrap-program (string-append #$output "/bin/elenqdoc")
+ `("ELENQDOC_DATADIR" =
+ (,(string-append #$pandoc-templates "/share/pandoc/")))))))))
+ (home-page "http://git.elenq.tech/")
+ (synopsis "Simplified pandoc wrapper for ElenQ documents")
+ (description "Provides `elenqdoc` command.")
+ (license license:asl2.0))))