about summary refs log tree commit diff
path: root/nixpkgs/pkgs/data/fonts/agave/default.nix
blob: d2ecda3a1118807ba1623eeef2575e2aaba52693 (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
{ lib, fetchurl, stdenv }:

let
  pname = "agave";
  version = "37";

  mkAg = name: hash: fetchurl {
    url = "https://github.com/agarick/agave/releases/download/v${version}/Agave-${name}.ttf";
    sha256 = hash;
    name = "Agave-${name}.ttf";
  };
  # There are slashed variants, but with same name so only bundle the default versions for now:
  fonts = [
    (mkAg "Regular" "sha256-vX1VhEgqy9rQ7hPmAgBGxKyIs2QSAYqZC/mL/2BIOrA=")
    (mkAg "Bold" "sha256-Ax/l/RKyc03law0ThiLac/7HHV4+YxibKzcZnjZs6VI=")
  ];

in stdenv.mkDerivation {
  inherit pname version;
  srcs = fonts;
  sourceRoot = ".";

  dontUnpack = true;

  installPhase = ''
    install -D $srcs -t $out/share/fonts/truetype/
  '';

  meta = with lib; {
    description = "truetype monospaced typeface designed for X environments";
    homepage = "https://b.agaric.net/page/agave";
    license = licenses.mit;
    maintainers = with maintainers; [ dtzWill ];
    platforms = platforms.all;
  };
}