diff --git a/pkgs/data/fonts/gentium-book-basic/default.nix b/pkgs/data/fonts/gentium-book-basic/default.nix index c6812e39ef86..4c1e484253cf 100644 --- a/pkgs/data/fonts/gentium-book-basic/default.nix +++ b/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"; - }; + url = "http://software.sil.org/downloads/r/gentium/GentiumBasic_${major}${minor}.zip"; - phases = [ "unpackPhase" "installPhase" ]; - - 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"; diff --git a/pkgs/data/fonts/gentium/default.nix b/pkgs/data/fonts/gentium/default.nix index 975c4c72a9c0..2e2ffdeb5bb4 100644 --- a/pkgs/data/fonts/gentium/default.nix +++ b/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"; - }; + url = "http://software.sil.org/downloads/r/gentium/GentiumPlus-${version}.zip"; - phases = [ "unpackPhase" "installPhase" ]; - - 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";