Paste number 343859: cns fonts guix

Paste number 343859: cns fonts guix
Pasted by: Brendan
When:3 years, 1 month ago
Share:Tweet this! | http://paste.lisp.org/+7DBN
Channel:None
Paste contents:
Raw Source | XML | Display As
(define-public font-cns11643-kai
  (package
    (name "font-cns11643-kai")
    (version "98.1")
    (source
     (origin
       (method url-fetch)
       (uri "http://127.0.0.1/pp94dir9f02qcwx13z78d6djb6psizx1-Open_Data.zip")
       ;(uri "http://www.cns11643.gov.tw/AIDB/Open_Data.zip")
       (sha256
        (base32
         "1q3pq8cdg7vd773an68djlm8ck7hzw2b4s6vhzmnylagapyp8w5h"
         ;"0zhw95ghazqbp28j16cvazr407ab5r1wv0imzkndnazbblnrxb0q"
         ))))
    (build-system trivial-build-system)
    (native-inputs
     `(("unzip" ,unzip)))
    (arguments
     `(#:modules ((guix build utils))
       #:builder (begin
                   (use-modules (guix build utils))
                   (let ((font-dir
                          (string-append %output "/share/fonts/truetype/cns11643"))
                         (unzip
                          (string-append (assoc-ref %build-inputs "unzip")
                                         "/bin/unzip")))
                     (system* unzip (assoc-ref %build-inputs "source"))
                     (chdir "Open_Data/Fonts/")
                     (mkdir-p font-dir)
                     (install-file "TW-Kai-98_1.ttf" font-dir)
                     (install-file "TW-Kai-Ext-B-98_1.ttf" font-dir)
                     (install-file "TW-Kai-Plus-98_1.ttf" font-dir)
                     ))))
    (home-page "ttt")
    (synopsis "ttt")
    (description "ttt")
    (license license:expat))
  ;;http://http.debian.net/debian/pool/main/f/fonts-cns11643/fonts-cns11643_98.1+20150923.orig.tar.xz
  ;;
  )
(define-public font-cns11643-sung
  (package
    (inherit font-cns11643-kai)
    (name "font-cns11643-sung")
    (arguments
     `(#:modules ((guix build utils))
       #:builder (begin
                   (use-modules (guix build utils))
                   (let ((font-dir
                          (string-append %output "/share/fonts/truetype/cns11643"))
                         (unzip
                          (string-append (assoc-ref %build-inputs "unzip")
                                         "/bin/unzip")))
                     (system* unzip (assoc-ref %build-inputs "source"))
                     (chdir "Open_Data/Fonts/")
                     (mkdir-p font-dir)
                     (install-file "TW-Sung-98_1.ttf" font-dir)
                     (install-file "TW-Sung-Ext-B-98_1.ttf" font-dir)
                     (install-file "TW-Sung-Plus-98_1.ttf" font-dir)
                     ))))))

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.