summary refs log tree commit diff
path: root/pkgs/data/fonts/lmodern/lmmath.nix
blob: 90132272dd10c5fb3711a8d530ec25b609dd7696 (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
{ stdenv, fetchurl, unzip }:

stdenv.mkDerivation {
  name = "lmmath-0.903";
  
  src = fetchurl {
    url = "http://www.gust.org.pl/projects/e-foundry/lm-math/download/lmmath0903otf";
    sha256 = "ee96cb14f5c746d6c6b9ecfbdf97dafc2f535be3dd277e15e8ea6fb594995d64";
    name = "lmmath-0.903.zip";
  };

  buildInputs = [unzip];

  sourceRoot = ".";

  installPhase = ''
    mkdir -p $out/texmf-dist/fonts/opentype
    mkdir -p $out/share/fonts/opentype

    cp *.{OTF,otf} $out/texmf-dist/fonts/opentype/lmmath-regular.otf
    cp *.{OTF,otf} $out/share/fonts/opentype/lmmath-regular.otf

    ln -s $out/texmf* $out/share/
  '';

  meta = {
    description = "Latin Modern font";
  };
}