roboto-mono: use installFonts

This commit is contained in:
pancaek
2026-03-04 20:55:22 -08:00
parent ac93b65a4f
commit b0d9a788b8

View File

@@ -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 { };