(define-module (elenq documentation) #:use-module (elenq graphics) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system copy) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (gnu packages haskell-xyz)) (define-public elenq-pandoc-templates (let ((revision "2") (commit "ef4aca28748f8a8439b11258af77bc323187b4cb")) (package (name "elenq-pandoc-templates") (version (git-version "0.0.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "git://git.elenq.tech/pandoc-templates") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "13hgcq5zpilwmbi1f16yx8ma6vazk754yb7nmyjhag151vbskapr")))) (build-system copy-build-system) (inputs (list elenq-logos)) (arguments (list #:install-plan ''(("pandoc" "/share/pandoc")) #:phases #~(modify-phases %standard-phases (add-before 'install 'set-url (lambda _ (for-each (lambda (f) (substitute* f (("\\$elenq-directory\\$") (string-append #$elenq-logos "/share/elenq/")))) (list "pandoc/templates/elenq-article.latex" "pandoc/templates/elenq-book.latex"))))))) (native-search-paths (list (search-path-specification (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 (git-version "0.0.0" revision commit)) (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 elenq-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 #$elenq-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))))