skribilo.scm 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages skribilo)
  19. #:use-module (guix packages)
  20. #:use-module (guix download)
  21. #:use-module (guix licenses)
  22. #:use-module (guix build-system gnu)
  23. #:use-module (gnu packages guile)
  24. #:use-module (gnu packages guile-xyz)
  25. #:use-module (gnu packages lout)
  26. #:use-module (gnu packages pkg-config)
  27. #:use-module (gnu packages plotutils)
  28. #:use-module (gnu packages imagemagick)
  29. #:use-module (gnu packages ghostscript))
  30. (define-public skribilo
  31. (package
  32. (name "skribilo")
  33. (version "0.9.4")
  34. (source (origin
  35. (method url-fetch)
  36. (uri (string-append "mirror://savannah/skribilo/skribilo-"
  37. version ".tar.gz"))
  38. (sha256
  39. (base32
  40. "06ywnfjfa9sxrzdszb5sryzg266380g519cm64kq62sskzl7zmnf"))))
  41. (build-system gnu-build-system)
  42. (arguments
  43. ;; Make the modules available under the usual location.
  44. '(#:phases
  45. (modify-phases %standard-phases
  46. (add-before 'configure 'pre-configure
  47. (lambda* (#:key inputs #:allow-other-keys)
  48. ;; Make sure the 'skribilo' command gets to see
  49. ;; Guile-Reader, even if Guile-Reader is not in the search
  50. ;; path.
  51. (let ((reader (assoc-ref inputs "guile-reader")))
  52. (substitute* "src/skribilo.in"
  53. (("^exec (.*) -c" _ things)
  54. (string-append "exec " things
  55. " -L " reader "/share/guile/site/2.2"
  56. " -C " reader "/lib/guile/2.2/site-ccache"
  57. " -c"))))
  58. #t)))
  59. #:parallel-build? #f))
  60. (native-inputs `(("pkg-config" ,pkg-config)))
  61. (inputs `(("guile" ,guile-2.2)
  62. ("imagemagick" ,imagemagick)
  63. ("ghostscript" ,ghostscript) ; for 'convert'
  64. ("ploticus" ,ploticus)
  65. ("lout" ,lout)))
  66. ;; The 'skribilo' command needs them, and for people using Skribilo as a
  67. ;; library, these inputs are needed as well.
  68. (propagated-inputs `(("guile-reader" ,guile-reader)
  69. ("guile-lib" ,guile-lib)))
  70. (home-page "https://www.nongnu.org/skribilo/")
  71. (synopsis "Document production tool written in Guile Scheme")
  72. (description
  73. "Skribilo is a free document production tool that takes a structured
  74. document representation as its input and renders that document in a variety of
  75. output formats: HTML and Info for on-line browsing, and Lout and LaTeX for
  76. high-quality hard copies.
  77. The input document can use Skribilo's markup language to provide information
  78. about the document's structure, which is similar to HTML or LaTeX and does not
  79. require expertise. Alternatively, it can use a simpler, “markup-less” format
  80. that borrows from Emacs' outline mode and from other conventions used in
  81. emails, Usenet and text.
  82. Lastly, Skribilo provides Guile Scheme APIs.")
  83. (license gpl3+)))