summary refs log tree commit diff
path: root/pkgs/data/fonts/gentium-book-basic/default.nix
blob: be2f71b5346cf9ab0661b6d7b99c93590ca40010 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:

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

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

  sha256 = "0598zr5f7d6ll48pbfbmmkrybhhdks9b2g3m2g67wm40070ffzmd";

  meta = with lib; {
    homepage = "https://software.sil.org/gentium/";
    description = "A high-quality typeface family for Latin, Cyrillic, and Greek";
    maintainers = with maintainers; [ ];
    license = licenses.ofl;
    platforms = platforms.all;
  };
}).overrideAttrs (_: {
  postFetch = ''
    mkdir -p $out/share/{doc,fonts}
    unzip -j $downloadedFile \*.ttf                            -d $out/share/fonts/truetype
    unzip -j $downloadedFile \*/FONTLOG.txt \*/GENTIUM-FAQ.txt -d $out/share/doc/${name}
  '';
})