Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

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.

+12 -15
+12 -15
pkgs/data/fonts/sarasa-gothic/default.nix
··· 1 1 { stdenv, fetchurl, p7zip }: 2 2 3 - stdenv.mkDerivation rec { 3 + let 4 4 version = "0.6.0"; 5 + sha256 = "08g3kzplp3v8kvni1vzl73fgh03xgfl8pwqyj7vwjihjdr1xfjyz"; 6 + in fetchurl rec { 7 + inherit sha256; 8 + 5 9 name = "sarasa-gothic-${version}"; 6 10 7 - package = fetchurl { 8 - url = "https://github.com/be5invis/Sarasa-Gothic/releases/download/v${version}/sarasa-gothic-ttf-${version}.7z"; 9 - sha256 = "00kyx03lpgycxaw0cyx96hhrx8gwkcmy3qs35q7r09y60vg5i0nv"; 10 - }; 11 + url = "https://github.com/be5invis/Sarasa-Gothic/releases/download/v${version}/sarasa-gothic-ttc-${version}.7z"; 11 12 12 - nativeBuildInputs = [ p7zip ]; 13 + recursiveHash = true; 14 + downloadToTemp = true; 13 15 14 - unpackPhase = '' 15 - 7z x $package 16 - ''; 17 - 18 - installPhase = '' 19 - mkdir -p $out/share/fonts/truetype 20 - cp *.ttf $out/share/fonts/truetype 16 + postFetch = '' 17 + ${p7zip}/bin/7z x $downloadedFile 18 + mkdir -p $out/share/fonts 19 + install -m644 *.ttc $out/share/fonts/ 21 20 ''; 22 21 23 22 meta = with stdenv.lib; { ··· 26 25 license = licenses.ofl; 27 26 maintainers = [ maintainers.ChengCat ]; 28 27 platforms = platforms.all; 29 - # large package, mainly i/o bound 30 - hydraPlatforms = []; 31 28 }; 32 29 }