mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
noto-fonts{,-extra}: 2018-11-30 -> 2020-01-23
This commit is contained in:
parent
b94c1c89f6
commit
fe690a84eb
@ -1,28 +1,44 @@
|
|||||||
{ stdenv, fetchzip, fetchFromGitHub, optipng, cairo, python3Packages, pkgconfig, pngquant, which, imagemagick }:
|
{ stdenv
|
||||||
|
, stdenvNoCC
|
||||||
|
, lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, fetchzip
|
||||||
|
, optipng
|
||||||
|
, cairo
|
||||||
|
, python3Packages
|
||||||
|
, pkgconfig
|
||||||
|
, pngquant
|
||||||
|
, which
|
||||||
|
, imagemagick
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
mkNoto = { name, weights, sha256, }:
|
mkNoto = { pname, weights }:
|
||||||
let
|
stdenvNoCC.mkDerivation {
|
||||||
version = "2018-11-30";
|
inherit pname;
|
||||||
ref = "85e78f831469323c85847e23f95026c894159135";
|
version = "2020-01-23";
|
||||||
in
|
|
||||||
fetchzip {
|
src = fetchFromGitHub {
|
||||||
name = "${name}-${version}";
|
owner = "googlefonts";
|
||||||
inherit sha256;
|
repo = "noto-fonts";
|
||||||
url = "https://github.com/googlei18n/noto-fonts/archive/${ref}.zip";
|
rev = "f4726a2ec36169abd02a6d8abe67c8ff0236f6d8";
|
||||||
postFetch = ''
|
sha256 = "0zc1r7zph62qmvzxqfflsprazjf6x1qnwc2ma27kyzh6v36gaykw";
|
||||||
unzip $downloadedFile
|
};
|
||||||
mkdir -p $out/share/fonts/noto
|
|
||||||
# Also copy unhinted & alpha fonts for better glyph coverage,
|
installPhase = ''
|
||||||
# if they don't have a hinted version
|
# We copy in reverse preference order -- unhinted first, then
|
||||||
# (see https://groups.google.com/d/msg/noto-font/ZJSkZta4n5Y/tZBnLcPdbS0J)
|
# hinted -- to get the "best" version of each font while
|
||||||
for ttf in noto-fonts-*/{hinted,unhinted,alpha}/*-${weights}.ttf
|
# maintaining maximum coverage.
|
||||||
do
|
#
|
||||||
cp -n "$ttf" -t "$out/share/fonts/noto"
|
# TODO: install OpenType, variable versions?
|
||||||
done
|
local out_ttf=$out/share/fonts/truetype/noto
|
||||||
|
install -m444 -Dt $out_ttf phaseIII_only/unhinted/ttf/*/*-${weights}.ttf
|
||||||
|
install -m444 -Dt $out_ttf phaseIII_only/hinted/ttf/*/*-${weights}.ttf
|
||||||
|
install -m444 -Dt $out_ttf unhinted/*/*-${weights}.ttf
|
||||||
|
install -m444 -Dt $out_ttf hinted/*/*-${weights}.ttf
|
||||||
'';
|
'';
|
||||||
meta = with stdenv.lib; {
|
|
||||||
inherit version;
|
meta = with lib; {
|
||||||
description = "Beautiful and free fonts for many languages";
|
description = "Beautiful and free fonts for many languages";
|
||||||
homepage = https://www.google.com/get/noto/;
|
homepage = https://www.google.com/get/noto/;
|
||||||
longDescription =
|
longDescription =
|
||||||
@ -39,24 +55,24 @@ let
|
|||||||
|
|
||||||
This package also includes the Arimo, Cousine, and Tinos fonts.
|
This package also includes the Arimo, Cousine, and Tinos fonts.
|
||||||
'';
|
'';
|
||||||
license = licenses.asl20;
|
license = licenses.ofl;
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
maintainers = with maintainers; [ mathnerd314 ];
|
maintainers = with maintainers; [ mathnerd314 emily ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
noto-fonts = mkNoto {
|
noto-fonts = mkNoto {
|
||||||
name = "noto-fonts";
|
pname = "noto-fonts";
|
||||||
weights = "{Regular,Bold,Light,Italic,BoldItalic,LightItalic}";
|
weights = "{Regular,Bold,Light,Italic,BoldItalic,LightItalic}";
|
||||||
sha256 = "0kvq5ldip2ra2njlxg9fxj46nfqzq5l3n359d3kwfbsld7hixm2d";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
noto-fonts-extra = mkNoto {
|
noto-fonts-extra = mkNoto {
|
||||||
name = "noto-fonts-extra";
|
pname = "noto-fonts-extra";
|
||||||
weights = "{Black,Condensed,Extra,Medium,Semi,Thin}*";
|
weights = "{Black,Condensed,Extra,Medium,Semi,Thin}*";
|
||||||
sha256 = "0l94aiy1b3qirg2mmbagbr0014vqk32za79pzck1acy2hgy716kq";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
noto-fonts-cjk = let version = "1.004"; in fetchzip {
|
noto-fonts-cjk = let version = "1.004"; in fetchzip {
|
||||||
name = "noto-fonts-cjk-${version}";
|
name = "noto-fonts-cjk-${version}";
|
||||||
|
|
||||||
@ -68,7 +84,7 @@ in
|
|||||||
'';
|
'';
|
||||||
sha256 = "0ghw2azqq3nkcxsbvf53qjmrhcfsnry79rq7jsr0wwi2pn7d3dsq";
|
sha256 = "0ghw2azqq3nkcxsbvf53qjmrhcfsnry79rq7jsr0wwi2pn7d3dsq";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
inherit version;
|
inherit version;
|
||||||
description = "Beautiful and free fonts for CJK languages";
|
description = "Beautiful and free fonts for CJK languages";
|
||||||
homepage = https://www.google.com/get/noto/help/cjk/;
|
homepage = https://www.google.com/get/noto/help/cjk/;
|
||||||
@ -89,6 +105,7 @@ in
|
|||||||
maintainers = with maintainers; [ mathnerd314 ];
|
maintainers = with maintainers; [ mathnerd314 ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
noto-fonts-emoji = let
|
noto-fonts-emoji = let
|
||||||
version = "unstable-2019-10-22";
|
version = "unstable-2019-10-22";
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
@ -118,7 +135,7 @@ in
|
|||||||
cp NotoColorEmoji.ttf fonts/NotoEmoji-Regular.ttf $out/share/fonts/noto
|
cp NotoColorEmoji.ttf fonts/NotoEmoji-Regular.ttf $out/share/fonts/noto
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
inherit version;
|
inherit version;
|
||||||
description = "Color and Black-and-White emoji fonts";
|
description = "Color and Black-and-White emoji fonts";
|
||||||
homepage = https://github.com/googlei18n/noto-emoji;
|
homepage = https://github.com/googlei18n/noto-emoji;
|
||||||
|
Loading…
Reference in New Issue
Block a user