Skip to content

Commit

Permalink
gentium: make the font derivation fixed-output (#28132)
Browse files Browse the repository at this point in the history
- [x] source link fixed
- [x] make the font derivations fixed-output (#27754)
  • Loading branch information
volth authored and fpletz committed Aug 11, 2017
1 parent 7e2b15f commit 8ec0a03
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 27 deletions.
25 changes: 11 additions & 14 deletions pkgs/data/fonts/gentium-book-basic/default.nix
@@ -1,26 +1,23 @@
{ stdenv, fetchzip }:

stdenv.mkDerivation rec {
name = "gentium-book-basic-${version}";
let
major = "1";
minor = "102";
version = "${major}.${minor}";
in fetchzip rec {
name = "gentium-book-basic-${version}";

src = fetchzip {
name = "${name}.zip";
url = "http://software.sil.org/downloads/gentium/GentiumBasic_${major}${minor}.zip";
sha256 = "109yiqwdfb1bn7d6bjp8d50k1h3z3kz86p3faz11f9acvsbsjad0";
};

phases = [ "unpackPhase" "installPhase" ];
url = "http://software.sil.org/downloads/r/gentium/GentiumBasic_${major}${minor}.zip";

installPhase = ''
mkdir -p $out/share/fonts/truetype
mkdir -p $out/share/doc/${name}
cp -v *.ttf $out/share/fonts/truetype/
cp -v FONTLOG.txt GENTIUM-FAQ.txt $out/share/doc/${name}
postFetch = ''
mkdir -p $out/share/{doc,fonts}
unzip -l $downloadedFile
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
unzip -j $downloadedFile \*/FONTLOG.txt \*/GENTIUM-FAQ.txt -d $out/share/doc/${name}
'';

sha256 = "0598zr5f7d6ll48pbfbmmkrybhhdks9b2g3m2g67wm40070ffzmd";

meta = with stdenv.lib; {
homepage = http://software.sil.org/gentium/;
description = "A high-quality typeface family for Latin, Cyrillic, and Greek";
Expand Down
25 changes: 12 additions & 13 deletions pkgs/data/fonts/gentium/default.nix
@@ -1,23 +1,22 @@
{ stdenv, fetchzip }:

stdenv.mkDerivation rec {
name = "gentium-${version}";
let
version = "5.000";
in fetchzip rec {
name = "gentium-${version}";

src = fetchzip {
url = "http://software.sil.org/downloads/d/gentium/GentiumPlus-${version}.zip";
sha256 = "0g9sx38wh7f0m16gr64g2xggjwak2q6jw9y4zhrvhmp4aq4xfqm6";
};

phases = [ "unpackPhase" "installPhase" ];
url = "http://software.sil.org/downloads/r/gentium/GentiumPlus-${version}.zip";

installPhase = ''
mkdir -p $out/share/fonts/truetype
mkdir -p $out/share/doc/${name}
cp -v *.ttf $out/share/fonts/truetype/
cp -vr documentation/ FONTLOG.txt GENTIUM-FAQ.txt README.txt $out/share/doc/${name}
postFetch = ''
mkdir -p $out/share/{doc,fonts}
unzip -l $downloadedFile
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
unzip -j $downloadedFile \*/FONTLOG.txt \*/GENTIUM-FAQ.txt \*/README.txt -d $out/share/doc/${name}
unzip -j $downloadedFile \*/documentation/\* -d $out/share/doc/${name}/documentation
'';

sha256 = "1qr2wjdmm93167b0w9cidlf3wwsyjx4838ja9jmm4jkyian5whhp";

meta = with stdenv.lib; {
homepage = http://software.sil.org/gentium/;
description = "A high-quality typeface family for Latin, Cyrillic, and Greek";
Expand Down

0 comments on commit 8ec0a03

Please sign in to comment.