You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

134 lines
6.0 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 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 fonts)
  19. #:use-module ((guix licenses)
  20. #:renamer (symbol-prefix-proc 'license:))
  21. #:use-module (guix packages)
  22. #:use-module (guix download)
  23. #:use-module (guix build-system trivial)
  24. #:use-module ((gnu packages base)
  25. #:select (tar))
  26. #:use-module (gnu packages compression))
  27. (define-public ttf-bitstream-vera
  28. (package
  29. (name "ttf-bitstream-vera")
  30. (version "1.10")
  31. (source (origin
  32. (method url-fetch)
  33. (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
  34. version "/ttf-bitstream-vera-"
  35. version ".tar.bz2"))
  36. (sha256
  37. (base32
  38. "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
  39. (build-system trivial-build-system)
  40. (arguments
  41. `(#:modules ((guix build utils))
  42. #:builder (begin
  43. (use-modules (guix build utils)
  44. (srfi srfi-26))
  45. (let ((tar (string-append (assoc-ref %build-inputs
  46. "tar")
  47. "/bin/tar"))
  48. (PATH (string-append (assoc-ref %build-inputs
  49. "bzip2")
  50. "/bin"))
  51. (font-dir (string-append %output
  52. "/share/fonts/truetype"))
  53. (doc-dir (string-append %output "/share/doc/"
  54. ,name "-" ,version)))
  55. (setenv "PATH" PATH)
  56. (system* tar "xvf" (assoc-ref %build-inputs "source"))
  57. (mkdir-p font-dir)
  58. (mkdir-p doc-dir)
  59. (chdir (string-append "ttf-bitstream-vera-" ,version))
  60. (for-each (lambda (ttf)
  61. (copy-file ttf
  62. (string-append font-dir "/" ttf)))
  63. (find-files "." "\\.ttf$"))
  64. (for-each (lambda (doc)
  65. (copy-file doc
  66. (string-append doc-dir "/" doc)))
  67. (find-files "." "\\.TXT$"))))))
  68. (native-inputs `(("source" ,source)
  69. ("tar" ,tar)
  70. ("bzip2" ,bzip2)))
  71. (home-page "https://www-old.gnome.org/fonts/")
  72. (synopsis "Bitstream Vera sans-serif typeface")
  73. (description "Vera is a sans-serif typeface from Bitstream, Inc. This
  74. package provides the TrueType (TTF) files.")
  75. (license
  76. (license:x11-style
  77. "https://www-old.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"))))
  78. (define-public freefont-ttf
  79. (package
  80. (name "freefont-ttf")
  81. (version "20100919")
  82. (source (origin
  83. (method url-fetch)
  84. (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
  85. version ".tar.gz"))
  86. (sha256
  87. (base32
  88. "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"))))
  89. (build-system trivial-build-system)
  90. (arguments
  91. `(#:modules ((guix build utils))
  92. #:builder (begin
  93. (use-modules (guix build utils)
  94. (srfi srfi-26))
  95. (let ((tar (string-append (assoc-ref %build-inputs
  96. "tar")
  97. "/bin/tar"))
  98. (PATH (string-append (assoc-ref %build-inputs
  99. "gzip")
  100. "/bin"))
  101. (font-dir (string-append %output
  102. "/share/fonts/truetype"))
  103. (doc-dir (string-append %output "/share/doc/"
  104. ,name "-" ,version)))
  105. (setenv "PATH" PATH)
  106. (system* tar "xvf" (assoc-ref %build-inputs "source"))
  107. (mkdir-p font-dir)
  108. (mkdir-p doc-dir)
  109. (chdir (string-append "freefont-" ,version))
  110. (for-each (lambda (file)
  111. (let ((dir (if (string-suffix? "ttf" file)
  112. font-dir
  113. doc-dir)))
  114. (copy-file file
  115. (string-append dir "/" file))))
  116. (find-files "." ""))))))
  117. (native-inputs `(("source" ,source)
  118. ("tar" ,tar)
  119. ("gzip" ,gzip)))
  120. (home-page "http://www.gnu.org/software/freefont/")
  121. (synopsis "Unicode-encoded outline fonts")
  122. (description
  123. "The GNU Freefont project aims to provide a set of free outline
  124. (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
  125. 10646/Unicode UCS (Universal Character Set).")
  126. (license license:gpl3+)))