Commit aae62105 authored by pancaek's avatar pancaek
Browse files

roboto-serif: use installFonts

parent b0d9a788
Loading
Loading
Loading
Loading
+10 −11
Original line number Diff line number Diff line
@@ -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;
  };
}
})