Commit b0d9a788 authored by pancaek's avatar pancaek
Browse files

roboto-mono: use installFonts

parent ac93b65a
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -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 { };