diff options
author | taku0 <mxxouy6x3m_github@tatapa.org> | 2015-09-15 23:45:19 +0900 |
---|---|---|
committer | taku0 <mxxouy6x3m_github@tatapa.org> | 2015-09-19 09:57:06 +0900 |
commit | 2f0b7a29a2c4a9a25d9691766ce4989449a49a07 (patch) | |
tree | b21ee6096ceb761732e24953dce46ecc0095d345 /pkgs/data | |
parent | 21a3ebd013bf29817098a5bab7d118a56374cff6 (diff) |
source-han-sans: 1.001 -> 1.004
Diffstat (limited to 'pkgs/data')
-rw-r--r-- | pkgs/data/fonts/source-han-sans/default.nix | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/pkgs/data/fonts/source-han-sans/default.nix b/pkgs/data/fonts/source-han-sans/default.nix index 9e0bf7505718d..2fb4787774f45 100644 --- a/pkgs/data/fonts/source-han-sans/default.nix +++ b/pkgs/data/fonts/source-han-sans/default.nix @@ -1,23 +1,29 @@ -{stdenv, fetchurl}: +{stdenv, fetchurl, unzip}: let - makePackage = {language, region, description}: stdenv.mkDerivation rec { - version = "1.001R"; - name = "source-han-sans-${language}-${version}"; + makePackage = {variant, language, region, sha256}: stdenv.mkDerivation rec { + version = "1.004R"; + name = "source-han-sans-${variant}-${version}"; + revision = "5f5311e71cb628321cc0cffb51fb38d862b726aa"; + + buildInputs = [ unzip ]; src = fetchurl { - url = "https://github.com/adobe-fonts/source-han-sans/archive/${version}.tar.gz"; - sha256 = "0cwz3d8jancl0a7vbjxhnh1vgwsjba62lahfjya9yrjkp1ndxlap"; + url = "https://github.com/adobe-fonts/source-han-sans/raw/${revision}/SubsetOTF/SourceHanSans${region}.zip"; + inherit sha256; }; + setSourceRoot = '' + sourceRoot=$( echo SourceHanSans* ) + ''; + installPhase = '' mkdir -p $out/share/fonts/opentype - cp $( find SubsetOTF/${region} -name '*.otf' ) $out/share/fonts/opentype + cp $( find . -name '*.otf' ) $out/share/fonts/opentype ''; meta = { - inherit description; - + description = "${language} subset of an open source Pan-CJK typeface"; homepage = https://github.com/adobe-fonts/source-han-sans; license = stdenv.lib.licenses.asl20; }; @@ -25,23 +31,27 @@ let in { japanese = makePackage { - language = "japanese"; + variant = "japanese"; + language = "Japanese"; region = "JP"; - description = "Japanese subset of an open source Pan-CJK typeface"; + sha256 = "0m1zprwqnqp3za42firg53hyzir6p0q73fl8mh5j4px3zgivlvfw"; }; korean = makePackage { - language = "korean"; + variant = "korean"; + language = "Korean"; region = "KR"; - description = "Korean subset of an open source Pan-CJK typeface"; + sha256 = "1bz6n2sd842vgnqky0i7a3j3i2ixhzzkkbx1m8plk04r1z41bz9q"; }; simplified-chinese = makePackage { - language = "simplified-chinese"; + variant = "simplified-chinese"; + language = "Simplified Chinese"; region = "CN"; - description = "Simplified Chinese subset of an open source Pan-CJK typeface"; + sha256 = "0ksafcwmnpj3yxkgn8qkqkpw10ivl0nj9n2lsi9c6fw3aa71s3ha"; }; traditional-chinese = makePackage { - language = "traditional-chinese"; + variant = "traditional-chinese"; + language = "Traditional Chinese"; region = "TW"; - description = "Traditional Chinese subset of an open source Pan-CJK typeface"; + sha256 = "1l4zymd5n4nl9gmja707xq6bar88dxki2mwdixdfrkf544cidflj"; }; } |