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.
This commit is contained in:
parent
2bf16cbbc3
commit
95a56e47e5
@ -1,23 +1,22 @@
|
|||||||
{ stdenv, fetchurl, p7zip }:
|
{ stdenv, fetchurl, p7zip }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
version = "0.6.0";
|
version = "0.6.0";
|
||||||
|
sha256 = "08g3kzplp3v8kvni1vzl73fgh03xgfl8pwqyj7vwjihjdr1xfjyz";
|
||||||
|
in fetchurl rec {
|
||||||
|
inherit sha256;
|
||||||
|
|
||||||
name = "sarasa-gothic-${version}";
|
name = "sarasa-gothic-${version}";
|
||||||
|
|
||||||
package = fetchurl {
|
url = "https://github.com/be5invis/Sarasa-Gothic/releases/download/v${version}/sarasa-gothic-ttc-${version}.7z";
|
||||||
url = "https://github.com/be5invis/Sarasa-Gothic/releases/download/v${version}/sarasa-gothic-ttf-${version}.7z";
|
|
||||||
sha256 = "00kyx03lpgycxaw0cyx96hhrx8gwkcmy3qs35q7r09y60vg5i0nv";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ p7zip ];
|
recursiveHash = true;
|
||||||
|
downloadToTemp = true;
|
||||||
|
|
||||||
unpackPhase = ''
|
postFetch = ''
|
||||||
7z x $package
|
${p7zip}/bin/7z x $downloadedFile
|
||||||
'';
|
mkdir -p $out/share/fonts
|
||||||
|
install -m644 *.ttc $out/share/fonts/
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/share/fonts/truetype
|
|
||||||
cp *.ttf $out/share/fonts/truetype
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
@ -26,7 +25,5 @@ stdenv.mkDerivation rec {
|
|||||||
license = licenses.ofl;
|
license = licenses.ofl;
|
||||||
maintainers = [ maintainers.ChengCat ];
|
maintainers = [ maintainers.ChengCat ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
# large package, mainly i/o bound
|
|
||||||
hydraPlatforms = [];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user