summary refs log tree commit diff
path: root/pkgs/data/fonts/anonymous-pro/default.nix
blob: 42f32f0ba716017a7fa83018c5fcd50e52f8c6cb (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
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 {
    version="1.002";
    name="anonymousPro";
    url="http://www.ms-studio.com/FontSales/AnonymousPro-${version}.zip";
    hash="86665847a51cdfb58a1e1dfd8b1ba33f183485affe50b53e3304f63d3d3552ab";
  };
in
rec {
  src = a.fetchurl {
    url = sourceInfo.url;
    sha256 = sourceInfo.hash;
  };

  inherit (sourceInfo) name version;
  inherit buildInputs;

  phaseNames = ["doUnpack" "installFonts"];

  doUnpack = a.fullDepEntry (''
    unzip ${src}
    cd AnonymousPro*/
  '') ["addInputs"];
      
  meta = {
    description = "A TrueType font set intended for source code";
    maintainers = with a.lib.maintainers;
    [
      raskin
    ];
    platforms = with a.lib.platforms;
      all;
  };
  passthru = {
    updateInfo = {
      downloadPage = "http://www.ms-studio.com/FontSales/anonymouspro.html";
    };
  };
}) x