Unverified Commit 6f6140c9 authored by Yohann Boniface's avatar Yohann Boniface Committed by GitHub
Browse files

nom fonts: use installFonts hook (#495716)

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

stdenvNoCC.mkDerivation rec {
@@ -14,14 +15,7 @@ stdenvNoCC.mkDerivation rec {
    hash = "sha256-Oh8V72tYvVA6Sk0f9UTIkRQYjdUbEB/fmCSaRYfyoP8=";
  };

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share/fonts/truetype
    mv *.ttf -t $out/share/fonts/truetype

    runHook postInstall
  '';
  nativeBuildInputs = [ installFonts ];

  meta = {
    description = "UNICODE Han Nom Font Set";
+3 −10
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
  fetchFromGitHub,
  python3Packages,
  nix-update-script,
  installFonts,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
@@ -18,6 +19,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
  };

  nativeBuildInputs = [
    installFonts
    python3Packages.afdko
    python3Packages.fonttools
  ];
@@ -34,22 +36,13 @@ stdenvNoCC.mkDerivation (finalAttrs: {
    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    install -Dm444 NomNaTong-Regular.otf -t $out/share/fonts/opentype/
    install -Dm444 NomNaTong-Regular.ttf -t $out/share/fonts/truetype/

    runHook postInstall
  '';

  passthru.updateScript = nix-update-script { };

  meta = {
    homepage = "https://nomfoundation.org/nom-tools/Nom-Font";
    description = "Hán-Nôm Coded Character Set and Nom Na Tong Regular Reference Font";
    license = lib.licenses.mit;
    maintainers = [ ];
    maintainers = [ lib.maintainers.eclairevoyant ];
    platforms = lib.platforms.all;
  };
})