From 0816b75dd6d97db3f8442e2f6463e8f5fb76dd8f Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sun, 15 Jan 2023 23:19:00 +0100 Subject: [PATCH] hannom: fix build --- pkgs/data/fonts/hannom/default.nix | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/pkgs/data/fonts/hannom/default.nix b/pkgs/data/fonts/hannom/default.nix index fa586caa79c..72ba87fb17f 100644 --- a/pkgs/data/fonts/hannom/default.nix +++ b/pkgs/data/fonts/hannom/default.nix @@ -1,27 +1,28 @@ -{ lib, fetchzip }: +{ lib, stdenvNoCC, fetchzip }: -let +stdenvNoCC.mkDerivation rec { + pname = "hannom"; version = "2005"; -in fetchzip { - name = "hannom-${version}"; - url = "mirror://sourceforge/vietunicode/hannom/hannom%20v${version}/hannomH.zip"; + src = fetchzip { + url = "mirror://sourceforge/vietunicode/hannom/hannom%20v${version}/hannomH.zip"; + stripRoot = false; + hash = "sha256-Oh8V72tYvVA6Sk0f9UTIkRQYjdUbEB/fmCSaRYfyoP8="; + }; - stripRoot = false; + dontBuild = true; + + installPhase = '' + runHook preInstall - postFetch = '' mkdir -p $out/share/fonts/truetype - mv $out/*.ttf -t $out/share/fonts/truetype - shopt -s extglob dotglob - rm -rf $out/!(share) - shopt -u extglob dotglob - ''; + mv *.ttf -t $out/share/fonts/truetype - sha256 = "sha256-zOYJxEHl4KM0ncVQDBs9+e3z8DxzF2ef3pRj0OVSuUo="; + runHook postInstall + ''; meta = with lib; { description = "UNICODE Han Nom Font Set"; - homepage = "http://vietunicode.sourceforge.net/fonts/fonts_hannom.html"; longDescription = '' The true type fonts HAN NOM A and HAN NOM B have been developed by Chan Nguyen Do Quoc Bao (Germany), To Minh Tam (USA) and Ni sinh Thien Vien Vien @@ -31,6 +32,7 @@ in fetchzip { code points by the Unicode Standard. Two sets of true type fonts are available with high and low resolutions. ''; + homepage = "https://vietunicode.sourceforge.net/fonts/fonts_hannom.html"; license = licenses.unfree; maintainers = with maintainers; [ wegank ]; platforms = platforms.all;