skribilo.scm 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2020, 2021 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 utils) #:select (version-major+minor))
  23. #:use-module (guix build-system gnu)
  24. #:use-module (gnu packages guile)
  25. #:use-module (gnu packages guile-xyz)
  26. #:use-module (gnu packages lout)
  27. #:use-module (gnu packages pkg-config)
  28. #:use-module (gnu packages plotutils)
  29. #:use-module (gnu packages imagemagick)
  30. #:use-module (gnu packages ghostscript))
  31. (define-public skribilo
  32. (package
  33. (name "skribilo")
  34. (version "0.9.5")
  35. (source (origin
  36. (method url-fetch)
  37. (uri (string-append "mirror://savannah/skribilo/skribilo-"
  38. version ".tar.gz"))
  39. (sha256
  40. (base32
  41. "02dzy2imqgfmwda4d1r51205si4c0r4fp2gf22sb0kv3qhhnm0h0"))))
  42. (build-system gnu-build-system)
  43. (arguments
  44. ;; Make the modules available under the usual location.
  45. `(#:phases
  46. (modify-phases %standard-phases
  47. (add-before 'configure 'pre-configure
  48. (lambda* (#:key inputs #:allow-other-keys)
  49. ;; Make sure the 'skribilo' command gets to see
  50. ;; Guile-Reader, even if Guile-Reader is not in the search
  51. ;; path.
  52. (let ((reader (assoc-ref inputs "guile-reader"))
  53. (effective ,(version-major+minor
  54. (package-version
  55. (car (assoc-ref (package-inputs this-package)
  56. "guile"))))))
  57. (substitute* "src/skribilo.in"
  58. (("^exec (.*) -c" _ things)
  59. (string-append "exec " things
  60. " -L " reader "/share/guile/site/" effective
  61. " -C " reader
  62. "/lib/guile/" effective "/site-ccache"
  63. " -c"))))
  64. #t)))
  65. #:parallel-build? #f
  66. ;; XXX: Temporarily disable tests because they rely on
  67. ;; 'test-runner-current' *not* returning #f after 'test-end', which is
  68. ;; no longer the case in Guile >= 3.0.6. This is fixed upstream.
  69. #:tests? #f))
  70. (native-inputs `(("pkg-config" ,pkg-config)))
  71. (inputs `(("guile" ,guile-3.0)
  72. ("imagemagick" ,imagemagick)
  73. ("ghostscript" ,ghostscript) ; for 'convert'
  74. ("ploticus" ,ploticus)
  75. ("lout" ,lout)))
  76. ;; The 'skribilo' command needs them, and for people using Skribilo as a
  77. ;; library, these inputs are needed as well.
  78. (propagated-inputs `(("guile-reader" ,guile-reader)
  79. ("guile-lib" ,guile-lib)))
  80. (home-page "https://www.nongnu.org/skribilo/")
  81. (synopsis "Document production tool written in Guile Scheme")
  82. (description
  83. "Skribilo is a free document production tool that takes a structured
  84. document representation as its input and renders that document in a variety of
  85. output formats: HTML and Info for on-line browsing, and Lout and LaTeX for
  86. high-quality hard copies.
  87. The input document can use Skribilo's markup language to provide information
  88. about the document's structure, which is similar to HTML or LaTeX and does not
  89. require expertise. Alternatively, it can use a simpler, “markup-less” format
  90. that borrows from Emacs' outline mode and from other conventions used in
  91. emails, Usenet and text.
  92. Lastly, Skribilo provides Guile Scheme APIs.")
  93. (license gpl3+)))