Unverified Commit 6de3b4b6 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

various: use installFonts hook (#505780)

parents 75d784c0 3dd3f48e
Loading
Loading
Loading
Loading
+6 −11
Original line number Diff line number Diff line
@@ -2,32 +2,27 @@
  lib,
  stdenvNoCC,
  fetchFromGitHub,
  installFonts,
}:

stdenvNoCC.mkDerivation rec {
stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "behdad-fonts";
  version = "0.0.3";

  src = fetchFromGitHub {
    owner = "font-store";
    repo = "BehdadFont";
    rev = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-gKfzxo3/bCMKXl2d6SP07ahIiNrUyrk/SN5XLND2lWY=";
  };

  installPhase = ''
    runHook preInstall

    find . -name '*.ttf' -exec install -m444 -Dt $out/share/fonts/behrad-fonts {} \;

    runHook postInstall
  '';
  nativeBuildInputs = [ installFonts ];

  meta = {
    homepage = "https://github.com/font-store/BehdadFont";
    description = "Persian/Arabic Open Source Font";
    license = lib.licenses.ofl;
    platforms = lib.platforms.all;
    maintainers = [ ];
    maintainers = with lib.maintainers; [ pancaek ];
  };
}
})
+2 −8
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenvNoCC,
  fetchFromGitHub,
  installFonts,
}:
stdenvNoCC.mkDerivation {
  pname = "besley";
@@ -14,14 +15,7 @@ stdenvNoCC.mkDerivation {
    hash = "sha256-N6QU3Pd6EnIrdbRtDT3mW5ny683DBWo0odADJBSdA2E=";
  };

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share/fonts/truetype
    cp fonts/*/*.otf $out/share/fonts/truetype

    runHook postInstall
  '';
  nativeBuildInputs = [ installFonts ];

  meta = {
    homepage = "https://indestructibletype.com/Besley.html";
+5 −4
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  stdenvNoCC,
  lib,
  fetchFromGitHub,
  installFonts,
}:

stdenvNoCC.mkDerivation {
@@ -15,9 +16,9 @@ stdenvNoCC.mkDerivation {
    sha256 = "1sx2gv19pgdyccb38sx3qnwszksmva7pqa1c8m35s6cipgjhhgb4";
  };

  installPhase = ''
    install -m444 -Dt $out/share/fonts/truetype *Bront.ttf
  '';
  preInstall = "rm {DejaVuSansMono,UbuntuMono}.ttf";

  nativeBuildInputs = [ installFonts ];

  meta = {
    description = "Bront Fonts";
@@ -28,6 +29,6 @@ stdenvNoCC.mkDerivation {
      ufl
    ];
    platforms = lib.platforms.all;
    maintainers = [ ];
    maintainers = with lib.maintainers; [ pancaek ];
  };
}
+2 −7
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenvNoCC,
  fetchzip,
  installFonts,
}:

let
@@ -18,13 +19,7 @@ stdenvNoCC.mkDerivation {
    stripRoot = false;
  };

  installPhase = ''
    runHook preInstall

    install -D -m444 -t $out/share/fonts/opentype $src/*.otf

    runHook postInstall
  '';
  nativeBuildInputs = [ installFonts ];

  meta = {
    homepage = "https://dotcolon.net/font/ferrum/";
+6 −11
Original line number Diff line number Diff line
@@ -2,31 +2,26 @@
  lib,
  stdenvNoCC,
  fetchzip,
  installFonts,
}:

stdenvNoCC.mkDerivation rec {
stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "jigmo";
  version = "20250912";

  src = fetchzip {
    url = "https://kamichikoichi.github.io/jigmo/Jigmo-${version}.zip";
    url = "https://kamichikoichi.github.io/jigmo/Jigmo-${finalAttrs.version}.zip";
    hash = "sha256-Z9WYPqNjHqnYjRndxtHsQ9XhFshMR50hVkQsXgUMKE8=";
    stripRoot = false;
  };

  installPhase = ''
    runHook preInstall

    install -Dm644 *.ttf -t $out/share/fonts/truetype/

    runHook postInstall
  '';
  nativeBuildInputs = [ installFonts ];

  meta = {
    description = "Japanese Kanji font set which is the official successor to Hanazono Mincho";
    homepage = "https://kamichikoichi.github.io/jigmo/";
    license = lib.licenses.cc0;
    maintainers = [ ];
    maintainers = with lib.maintainers; [ pancaek ];
    platforms = lib.platforms.all;
  };
}
})
Loading