roboto*: use installFonts (#496974)
This commit is contained in:
@@ -2,25 +2,21 @@
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchzip,
|
||||
installFonts,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "roboto-flex";
|
||||
version = "3.200";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/googlefonts/roboto-flex/releases/download/${version}/roboto-flex-fonts.zip";
|
||||
stripRoot = false;
|
||||
url = "https://github.com/googlefonts/roboto-flex/releases/download/${finalAttrs.version}/roboto-flex-fonts.zip";
|
||||
hash = "sha256-p8BvE4f6zQLygl49hzYTXXVQFZEJjrlfUvjNW+miar4=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
sourceRoot = "${finalAttrs.src.name}/roboto-flex-fonts/fonts";
|
||||
|
||||
install -Dm644 roboto-flex-fonts/fonts/variable/*.ttf -t $out/share/fonts/truetype
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
nativeBuildInputs = [ installFonts ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/googlefonts/roboto-flex";
|
||||
@@ -29,4 +25,4 @@ stdenvNoCC.mkDerivation rec {
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = [ lib.maintainers.romildo ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
installFonts,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
@@ -9,6 +10,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "roboto-mono";
|
||||
version = "3.001";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"webfont"
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "googlefonts";
|
||||
repo = "robotomono";
|
||||
@@ -16,11 +22,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-i0r8x4VgaOYW/pYXK+AXw7jMwhA8Hs9VQ1lq5f/xTe0=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm644 fonts/ttf/*.ttf -t $out/share/fonts/truetype/RobotoMono
|
||||
runHook postInstall
|
||||
'';
|
||||
nativeBuildInputs = [ installFonts ];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
|
||||
@@ -3,14 +3,20 @@
|
||||
stdenvNoCC,
|
||||
fetchurl,
|
||||
unzip,
|
||||
installFonts,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "roboto-serif";
|
||||
version = "1.008";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"webfont"
|
||||
];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/googlefonts/roboto-serif/releases/download/v${version}/RobotoSerifFonts-v${version}.zip";
|
||||
url = "https://github.com/googlefonts/roboto-serif/releases/download/v${finalAttrs.version}/RobotoSerifFonts-v${finalAttrs.version}.zip";
|
||||
hash = "sha256-Nm9DcxL0CgA51nGeZJPWSCipgqwnNPlhj0wHyGhLaYQ=";
|
||||
};
|
||||
|
||||
@@ -18,16 +24,9 @@ stdenvNoCC.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [
|
||||
unzip
|
||||
installFonts
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm644 variable/*.ttf -t $out/share/fonts/truetype
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Roboto family of fonts";
|
||||
longDescription = ''
|
||||
@@ -40,4 +39,4 @@ stdenvNoCC.mkDerivation rec {
|
||||
maintainers = with lib.maintainers; [ wegank ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
installFonts,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "roboto-slab";
|
||||
version = "2.000";
|
||||
|
||||
@@ -15,14 +16,11 @@ stdenv.mkDerivation {
|
||||
sha256 = "1v6z0a2xgwgf9dyj62sriy8ckwpbwlxkki6gfax1f4h4livvzpdn";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/fonts/truetype
|
||||
cp -a fonts/static/*.ttf $out/share/fonts/truetype/
|
||||
postPatch = ''
|
||||
rm -r ./old
|
||||
'';
|
||||
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = "0g663npi5lkvwcqafd4cjrm90ph0nv1lig7d19xzfymnj47qpj8x";
|
||||
nativeBuildInputs = [ installFonts ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://fonts.google.com/specimen/Roboto+Slab";
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchzip,
|
||||
installFonts,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
@@ -14,13 +15,9 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-vfn4KmOHHSVYT9XK+mDz5f4s8LnkCAY/IyTa3Rmir2k=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
nativeBuildInputs = [ installFonts ];
|
||||
|
||||
install -Dm644 unhinted/static/*.ttf -t $out/share/fonts/truetype
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
sourceRoot = "${finalAttrs.src.name}/unhinted/static";
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/googlefonts/roboto-3-classic";
|
||||
|
||||
Reference in New Issue
Block a user