diff options
author | dramforever <dramforever@live.com> | 2018-11-24 07:07:45 +0800 |
---|---|---|
committer | dramforever <dramforever@live.com> | 2018-11-24 07:07:45 +0800 |
commit | 95a56e47e51873f67bfe4e88c8ed06f308d5f761 (patch) | |
tree | 4ae9db2dc77b24f9e89a66a9aa1ba9915528db86 /pkgs | |
parent | 2bf16cbbc35e9ca459e0fed99ab7e2134c5e17f9 (diff) | |
download | nixpkgs-95a56e47e51873f67bfe4e88c8ed06f308d5f761.tar nixpkgs-95a56e47e51873f67bfe4e88c8ed06f308d5f761.tar.gz nixpkgs-95a56e47e51873f67bfe4e88c8ed06f308d5f761.tar.bz2 nixpkgs-95a56e47e51873f67bfe4e88c8ed06f308d5f761.tar.lz nixpkgs-95a56e47e51873f67bfe4e88c8ed06f308d5f761.tar.xz nixpkgs-95a56e47e51873f67bfe4e88c8ed06f308d5f761.tar.zst nixpkgs-95a56e47e51873f67bfe4e88c8ed06f308d5f761.zip |
sarasa-gothic: rewrite: TTC and fixed-output
Rewritten to use TTC archive instead of the TTF one, which drastically shrinks the closure size. (2.2G to 212M on v0.6.0.) It's also now fixed-output.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/data/fonts/sarasa-gothic/default.nix | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/pkgs/data/fonts/sarasa-gothic/default.nix b/pkgs/data/fonts/sarasa-gothic/default.nix index 32de9798cf9..b8cc43c254a 100644 --- a/pkgs/data/fonts/sarasa-gothic/default.nix +++ b/pkgs/data/fonts/sarasa-gothic/default.nix @@ -1,23 +1,22 @@ { stdenv, fetchurl, p7zip }: -stdenv.mkDerivation rec { +let version = "0.6.0"; - name = "sarasa-gothic-${version}"; + sha256 = "08g3kzplp3v8kvni1vzl73fgh03xgfl8pwqyj7vwjihjdr1xfjyz"; +in fetchurl rec { + inherit sha256; - package = fetchurl { - url = "https://github.com/be5invis/Sarasa-Gothic/releases/download/v${version}/sarasa-gothic-ttf-${version}.7z"; - sha256 = "00kyx03lpgycxaw0cyx96hhrx8gwkcmy3qs35q7r09y60vg5i0nv"; - }; + name = "sarasa-gothic-${version}"; - nativeBuildInputs = [ p7zip ]; + url = "https://github.com/be5invis/Sarasa-Gothic/releases/download/v${version}/sarasa-gothic-ttc-${version}.7z"; - unpackPhase = '' - 7z x $package - ''; + recursiveHash = true; + downloadToTemp = true; - installPhase = '' - mkdir -p $out/share/fonts/truetype - cp *.ttf $out/share/fonts/truetype + postFetch = '' + ${p7zip}/bin/7z x $downloadedFile + mkdir -p $out/share/fonts + install -m644 *.ttc $out/share/fonts/ ''; meta = with stdenv.lib; { @@ -26,7 +25,5 @@ stdenv.mkDerivation rec { license = licenses.ofl; maintainers = [ maintainers.ChengCat ]; platforms = platforms.all; - # large package, mainly i/o bound - hydraPlatforms = []; }; } |