diff options
Diffstat (limited to 'nixpkgs/pkgs/data/fonts/arphic/default.nix')
-rw-r--r-- | nixpkgs/pkgs/data/fonts/arphic/default.nix | 61 |
1 files changed, 41 insertions, 20 deletions
diff --git a/nixpkgs/pkgs/data/fonts/arphic/default.nix b/nixpkgs/pkgs/data/fonts/arphic/default.nix index 02e2a2de417b..ed55855e4347 100644 --- a/nixpkgs/pkgs/data/fonts/arphic/default.nix +++ b/nixpkgs/pkgs/data/fonts/arphic/default.nix @@ -1,22 +1,33 @@ -{ lib, fetchzip, mkfontscale, mkfontdir }: +{ lib, stdenvNoCC, fetchurl, mkfontdir, mkfontscale }: let version = "0.2.20080216.2"; -in { - arphic-ukai = fetchzip { - name = "arphic-ukai-${version}"; +in +{ + arphic-ukai = stdenvNoCC.mkDerivation rec { + pname = "arphic-ukai"; + inherit version; - url = "mirror://ubuntu/pool/main/f/fonts-arphic-ukai/fonts-arphic-ukai_${version}.orig.tar.bz2"; + src = fetchurl { + url = "mirror://ubuntu/pool/main/f/fonts-${pname}/fonts-${pname}_${version}.orig.tar.bz2"; + hash = "sha256-tJaNc1GfT4dH6FVI+4XSG2Zdob8bqQCnxJmXbmqK49I="; + }; + + nativeBuildInputs = [ + mkfontscale + mkfontdir + ]; + + installPhase = '' + runHook preInstall - postFetch = '' - tar -xjvf $downloadedFile --strip-components=1 install -D -v ukai.ttc $out/share/fonts/truetype/arphic-ukai.ttc cd $out/share/fonts - ${mkfontdir}/bin/mkfontdir - ${mkfontscale}/bin/mkfontscale - ''; + mkfontdir + mkfontscale - sha256 = "0xi5ycm7ydzpn7cqxv1kcj9vd70nr9wn8v27hmibyjc25y2qdmzl"; + runHook postInstall + ''; meta = with lib; { description = "CJK Unicode font Kai style"; @@ -28,20 +39,30 @@ in { }; }; - arphic-uming = fetchzip { - name = "arphic-uming-${version}"; + arphic-uming = stdenvNoCC.mkDerivation rec { + pname = "arphic-uming"; + inherit version; - url = "mirror://ubuntu/pool/main/f/fonts-arphic-uming/fonts-arphic-uming_${version}.orig.tar.bz2"; + src = fetchurl { + url = "mirror://ubuntu/pool/main/f/fonts-${pname}/fonts-${pname}_${version}.orig.tar.bz2"; + hash = "sha256-48GeBOp6VltKz/bx5CSAhNLhB1LjBb991sdugIYNwds="; + }; + + nativeBuildInputs = [ + mkfontscale + mkfontdir + ]; + + installPhase = '' + runHook preInstall - postFetch = '' - tar -xjvf $downloadedFile --strip-components=1 install -D -v uming.ttc $out/share/fonts/truetype/arphic-uming.ttc cd $out/share/fonts - ${mkfontdir}/bin/mkfontdir - ${mkfontscale}/bin/mkfontscale - ''; + mkfontdir + mkfontscale - sha256 = "16jybvj1cxamm682caj6nsm6l5c60x9mgchp1l2izrw2rvc8x38d"; + runHook postInstall + ''; meta = with lib; { description = "CJK Unicode font Ming style"; |