Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #50974 from dramforever/sarasa-gothic-ttc
Browse files Browse the repository at this point in the history
sarasa-gothic: rewrite: TTC and fixed-output
  • Loading branch information
Mic92 committed Nov 24, 2018
2 parents e426613 + 95a56e4 commit 9842853
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions 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; {
Expand All @@ -26,7 +25,5 @@ stdenv.mkDerivation rec {
license = licenses.ofl;
maintainers = [ maintainers.ChengCat ];
platforms = platforms.all;
# large package, mainly i/o bound
hydraPlatforms = [];
};
}

0 comments on commit 9842853

Please sign in to comment.