Unverified Commit 5ae7195e authored by jopejoe1's avatar jopejoe1 Committed by GitHub
Browse files

fira-*: use installFonts (#496780)

parents e0239fe7 de800ded
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenvNoCC,
  fetchzip,
  installFonts,
}:

stdenvNoCC.mkDerivation {
@@ -13,13 +14,7 @@ stdenvNoCC.mkDerivation {
    hash = "sha256-7y51blEn0Osf8azytK08zJgtfVX/CIWQkiOoRzYKIa4=";
  };

  installPhase = ''
    runHook preInstall

    install -Dm644 *.otf -t $out/share/fonts/opentype

    runHook postInstall
  '';
  nativeBuildInputs = [ installFonts ];

  meta = {
    description = "FiraCode unicode ligature glyphs in private use area";
@@ -29,7 +24,7 @@ stdenvNoCC.mkDerivation {
      See https://github.com/tonsky/FiraCode/issues/211.
    '';
    license = lib.licenses.ofl;
    maintainers = [ ];
    maintainers = with lib.maintainers; [ pancaek ];
    homepage = "https://github.com/tonsky/FiraCode/issues/211#issuecomment-239058632";
  };
}
+3 −8
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenvNoCC,
  fetchzip,
  installFonts,
  useVariableFont ? true,
}:

@@ -16,15 +17,9 @@ stdenvNoCC.mkDerivation (finalAttrs: {
  };

  # only extract the variable font because everything else is a duplicate
  installPhase = ''
    runHook preInstall
  preInstall = "cd ${lib.optionalString useVariableFont "variable_"}ttf";

    install -Dm644 -t $out/share/fonts/truetype ${
      if useVariableFont then "variable_ttf/*-VF.ttf" else "ttf/*.ttf"
    }

    runHook postInstall
  '';
  nativeBuildInputs = [ installFonts ];

  meta = {
    homepage = "https://github.com/tonsky/FiraCode";
+10 −10
Original line number Diff line number Diff line
@@ -2,27 +2,27 @@
  lib,
  stdenvNoCC,
  fetchzip,
  installFonts,
}:

stdenvNoCC.mkDerivation rec {
stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "fira-go";
  version = "1.001";

  outputs = [
    "out"
    "webfont"
  ];

  src = fetchzip {
    url = "https://carrois.com/downloads/FiraGO/Download_Folder_FiraGO_${
      lib.replaceStrings [ "." ] [ "" ] version
      lib.replaceStrings [ "." ] [ "" ] finalAttrs.version
    }.zip";
    hash = "sha256-+lw4dh7G/Xv3pzGXdMUl9xNc2Nk7wUOAh+lq3K1LrXs=";
    stripRoot = false;
  };

  installPhase = ''
    runHook preInstall

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

    runHook postInstall
  '';
  nativeBuildInputs = [ installFonts ];

  meta = {
    homepage = "https://carrois.com/fira/";
@@ -34,4 +34,4 @@ stdenvNoCC.mkDerivation rec {
    maintainers = [ lib.maintainers.loicreynier ];
    platforms = lib.platforms.all;
  };
}
})
+2 −8
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  fetchFromGitHub,
  python3,
  installFonts,
  stdenvNoCC,
}:

@@ -21,6 +22,7 @@ stdenvNoCC.mkDerivation {
  };

  nativeBuildInputs = [
    installFonts
    (python3.withPackages (
      ps: with ps; [
        fontmake
@@ -39,14 +41,6 @@ stdenvNoCC.mkDerivation {
    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    install -D "build/"*.otf -t "$out/share/fonts/opentype/"

    runHook postInstall
  '';

  meta = {
    description = "Math font with Unicode math support based on FiraSans and FiraGO";
    homepage = "https://github.com/firamath/firamath";
+10 −10
Original line number Diff line number Diff line
@@ -2,26 +2,26 @@
  lib,
  stdenvNoCC,
  fetchzip,
  installFonts,
}:

stdenvNoCC.mkDerivation rec {
stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "fira-mono";
  version = "3.2";

  outputs = [
    "out"
    "webfont"
  ];

  src = fetchzip {
    url = "https://carrois.com/downloads/Fira/Fira_Mono_${
      lib.replaceStrings [ "." ] [ "_" ] version
      lib.replaceStrings [ "." ] [ "_" ] finalAttrs.version
    }.zip";
    hash = "sha256-Ukc+K2sdSz+vUQFD8mmwJHZQ3N68oM4fk6YzGLwzAfQ=";
  };

  installPhase = ''
    runHook preInstall

    install -Dm644 Fonts/FiraMono_OTF*/*.otf -t $out/share/fonts/opentype

    runHook postInstall
  '';
  nativeBuildInputs = [ installFonts ];

  meta = {
    homepage = "https://carrois.com/fira/";
@@ -36,4 +36,4 @@ stdenvNoCC.mkDerivation rec {
    maintainers = [ lib.maintainers.rycee ];
    platforms = lib.platforms.all;
  };
}
})
Loading