about summary refs log tree commit diff
path: root/pkgs/data/fonts/source-han-sans/base.nix
blob: d319f41f2e52a18403fb58f6e23351f8d254375c (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
{version ? "1.000", prefix, url, sha256, description}:

{stdenv, fetchurl, unzip}:

stdenv.mkDerivation rec {
  inherit version;
  name = "${prefix}-${version}";

  src = fetchurl {
    inherit url sha256;
  };

  buildInputs = [ unzip ];

  installPhase = ''
    mkdir -p $out/share/fonts/truetype
    cp $( find . -name '*.otf' ) $out/share/fonts/truetype
  '';

  meta = {
    inherit description;

    homepage = http://sourceforge.net/adobe/source-han-sans/;
    license = stdenv.lib.licenses.asl20;
  };
}