summary refs log tree commit diff
path: root/pkgs/data/fonts/fantasque-sans-mono/default.nix
blob: 930c0a22520b6b2b5cf0a3b89163a6a9c3785de6 (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
{stdenv, fetchurl, unzip}:

stdenv.mkDerivation rec {
  name = "fantasque-sans-mono-${version}";
  version = "1.6.5";

  src = fetchurl {
    url = "https://github.com/belluzj/fantasque-sans/releases/download/v${version}/FantasqueSansMono.zip";
    sha256 = "19a82xlbcnd7dxqmpp03b62gjvi33bh635r0bjw2l09lgir6alym";
  };

  buildInputs = [unzip];
  phases = ["unpackPhase" "installPhase"];

  unpackCmd = ''
    mkdir -p ${name}
    unzip -qq -d ${name} $src
  '';

  installPhase = ''
    mkdir -p $out/share/fonts/opentype
    mkdir -p $out/share/doc/${name}
    cp -v "OTF/"*.otf $out/share/fonts/opentype
    cp -v README.md $out/share/doc/${name}
  '';

  meta = with stdenv.lib; {
    homepage = https://github.com/belluzj/fantasque-sans;
    description = "A font family with a great monospaced variant for programmers";
    license = licenses.ofl;
    platforms = platforms.all;
    maintainers = [maintainers.rycee];
  };
}