about summary refs log tree commit diff
path: root/pkgs/data/fonts/andagii/default.nix
blob: 8143d28412063bccffdf3edd31ae48ce1ddda955 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
x@{builderDefsPackage
  , unzip
  , ...}:
builderDefsPackage
(a :  
let 
  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
    [];

  buildInputs = map (n: builtins.getAttr n x)
    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
  sourceInfo = rec {
    url="http://www.i18nguy.com/unicode/andagii.zip";
    name="andagii";
    version="1.0.2";
    hash="0cknb8vin15akz4ahpyayrpqyaygp9dgrx6qw7zs7d6iv9v59ds1";
  };
in
rec {
  src = a.fetchurl {
    url = sourceInfo.url;
    curlOpts = "--user-agent 'Mozilla/5.0'";
    sha256 = sourceInfo.hash;
  };

  name = "${sourceInfo.name}-${sourceInfo.version}";
  inherit buildInputs;

  /* doConfigure should be removed if not needed */
  phaseNames = ["doUnpack" "doInstall"];

  doUnpack = a.fullDepEntry ''
    unzip "${src}"
  '' ["addInputs"];

  doInstall = a.fullDepEntry (''
    mkdir -p "$out"/share/fonts/ttf/
    cp ANDAGII_.TTF "$out"/share/fonts/ttf/andagii.ttf
  '') ["defEnsureDir" "minInit"];
      
  meta = {
    description = "Unicode Plane 1 Osmanya script font";
    maintainers = with a.lib.maintainers;
    [
      raskin
    ];
    hydraPlatforms = [];
    # There are multiple claims that the font is GPL, 
    # so I include the package; but I cannot find the
    # original source, so use it on your own risk
    # Debian claims it is GPL - good enough for me.
  };
  passthru = {
    updateInfo = {
      downloadPage = "http://www.i18nguy.com/unicode/unicode-font.html";
    };
  };
}) x