summary refs log tree commit diff
path: root/pkgs/data/fonts/source-code-pro/default.nix
blob: dc5bcb5b9a79a89445b687e4f1837d0fcb2dee93 (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
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.017";
    name="SourceCodePro";
    url="mirror://sourceforge/sourcecodepro.adobe/${name}_FontsOnly-${version}.zip";
    hash="07xjfxin883a3g3admdddxxqyzigihbsnmik0zpjii09cdlb8dl1";
  };
in
rec {
  src = a.fetchurl {
    url = sourceInfo.url;
    sha256 = sourceInfo.hash;
  };

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

  phaseNames = ["doUnpack" "installFonts"];

  doUnpack = a.fullDepEntry (''
    unzip ${src}
    cd ${sourceInfo.name}*/OTF/
  '') ["addInputs"];

  meta = {
    description = "A set of monospaced OpenType fonts designed for coding environments";
    maintainers = with a.lib.maintainers; [ relrod ];
    platforms = with a.lib.platforms; all;
    homepage = "http://blog.typekit.com/2012/09/24/source-code-pro/";
    license = a.lib.licenses.ofl;
  };
}) x