From 55ec8e18818a864d0bd8a5086fbac38ad0df085c Mon Sep 17 00:00:00 2001 From: Yucheng Zhang Date: Thu, 9 Nov 2017 14:48:34 +0800 Subject: [PATCH] vista-fonts-chs: init at 1 --- lib/maintainers.nix | 1 + pkgs/data/fonts/vista-fonts-chs/default.nix | 36 +++++++++++++++++++++ pkgs/data/fonts/vista-fonts-chs/no-op.conf | 9 ++++++ pkgs/top-level/all-packages.nix | 2 ++ 4 files changed, 48 insertions(+) create mode 100644 pkgs/data/fonts/vista-fonts-chs/default.nix create mode 100644 pkgs/data/fonts/vista-fonts-chs/no-op.conf diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 93edea1e40ef..fb33ab2e8694 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -111,6 +111,7 @@ changlinli = "Changlin Li "; chaoflow = "Florian Friesdorf "; chattered = "Phil Scott "; + ChengCat = "Yucheng Zhang "; choochootrain = "Hurshal Patel "; chpatrick = "Patrick Chilton "; chris-martin = "Chris Martin "; diff --git a/pkgs/data/fonts/vista-fonts-chs/default.nix b/pkgs/data/fonts/vista-fonts-chs/default.nix new file mode 100644 index 000000000000..e9a3282e7150 --- /dev/null +++ b/pkgs/data/fonts/vista-fonts-chs/default.nix @@ -0,0 +1,36 @@ +{stdenv, fetchzip, cabextract}: + +# Modified from vista-fonts + +fetchzip { + name = "vista-fonts-chs-1"; + + url = http://download.microsoft.com/download/d/6/e/d6e2ff26-5821-4f35-a18b-78c963b1535d/VistaFont_CHS.EXE; + + postFetch = '' + ${cabextract}/bin/cabextract --lowercase --filter '*.TTF' $downloadedFile + + mkdir -p $out/share/fonts/truetype + cp *.ttf $out/share/fonts/truetype + + # Set up no-op font configs to override any aliases set up by + # other packages. + mkdir -p $out/etc/fonts/conf.d + substitute ${./no-op.conf} $out/etc/fonts/conf.d/30-msyahei.conf \ + --subst-var-by fontname "Microsoft YaHei" + ''; + + sha256 = "1zwrgck84k80gpg7493jdnxnv9ajxk5c7qndinnmqydnrw239zbw"; + + meta = { + description = "TrueType fonts from Microsoft Windows Vista For Simplified Chinese (Microsoft YaHei)"; + homepage = https://www.microsoft.com/typography/fonts/family.aspx?FID=350; + license = stdenv.lib.licenses.unfree; + maintainers = [ stdenv.lib.maintainers.ChengCat ]; + + # Set a non-zero priority to allow easy overriding of the + # fontconfig configuration files. + priority = 5; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/data/fonts/vista-fonts-chs/no-op.conf b/pkgs/data/fonts/vista-fonts-chs/no-op.conf new file mode 100644 index 000000000000..2d00b6244887 --- /dev/null +++ b/pkgs/data/fonts/vista-fonts-chs/no-op.conf @@ -0,0 +1,9 @@ + + + + + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e37442940da6..f1836dbad569 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13598,6 +13598,8 @@ with pkgs; vistafonts = callPackage ../data/fonts/vista-fonts { }; + vistafonts-chs = callPackage ../data/fonts/vista-fonts-chs { }; + wireless-regdb = callPackage ../data/misc/wireless-regdb { }; wqy_microhei = callPackage ../data/fonts/wqy-microhei { };