Commit 69e70dcb authored by pancaek's avatar pancaek
Browse files

fira-sans: use installFonts

parent 2cbdcc0d
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -2,27 +2,26 @@
  lib,
  stdenvNoCC,
  fetchzip,
  installFonts,
}:

stdenvNoCC.mkDerivation rec {
stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "fira-sans";
  version = "4.301";
  outputs = [
    "out"
    "webfont"
  ];

  src = fetchzip {
    url = "https://carrois.com/downloads/Fira/Download_Folder_FiraSans_${
      lib.replaceStrings [ "." ] [ "" ] version
      lib.replaceStrings [ "." ] [ "" ] finalAttrs.version
    }.zip";
    hash = "sha256-WBt3oqPK7ACqMhilYkyFx9Ek2ugwdCDFZN+8HLRnGRs";
    stripRoot = false;
  };

  installPhase = ''
    runHook preInstall

    install --mode=644 -Dt $out/share/fonts/opentype Download_Folder_FiraSans*/Fonts/Fira_Sans_OTF*/*/*/*.otf

    runHook postInstall
  '';
  nativeBuildInputs = [ installFonts ];

  meta = {
    homepage = "https://carrois.com/fira/";
@@ -36,7 +35,8 @@ stdenvNoCC.mkDerivation rec {
      Medium, Semi Bold, Bold, Extra Bold, Heavy weights with
      corresponding italic versions.
    '';
    maintainers = with lib.maintainers; [ pancaek ];
    license = lib.licenses.ofl;
    platforms = lib.platforms.all;
  };
}
})