mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 11:22:58 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
43 lines
1.3 KiB
Nix
43 lines
1.3 KiB
Nix
{ lib, stdenvNoCC, fetchurl, cabextract }:
|
|
|
|
stdenvNoCC.mkDerivation {
|
|
pname = "vista-fonts-chs";
|
|
version = "1";
|
|
|
|
src = fetchurl {
|
|
url = "https://web.archive.org/web/20161221192937if_/http://download.microsoft.com/download/d/6/e/d6e2ff26-5821-4f35-a18b-78c963b1535d/VistaFont_CHS.EXE";
|
|
# Alternative mirror:
|
|
# http://www.eeo.cn/download/font/VistaFont_CHS.EXE
|
|
sha256 = "1qwm30b8aq9piyqv07hv8b5bac9ms40rsdf8pwix5dyk8020i8xi";
|
|
};
|
|
|
|
nativeBuildInputs = [ cabextract ];
|
|
|
|
unpackPhase = ''
|
|
cabextract --lowercase --filter '*.TTF' $src
|
|
'';
|
|
|
|
installPhase = ''
|
|
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"
|
|
'';
|
|
|
|
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 = lib.licenses.unfree;
|
|
maintainers = [ lib.maintainers.ChengCat ];
|
|
|
|
# Set a non-zero priority to allow easy overriding of the
|
|
# fontconfig configuration files.
|
|
priority = 5;
|
|
platforms = lib.platforms.all;
|
|
};
|
|
}
|