nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, fetchurl, stdenv }:
2
3let
4 pname = "agave";
5 version = "37";
6
7 mkAg = name: hash: fetchurl {
8 url = "https://github.com/agarick/agave/releases/download/v${version}/Agave-${name}.ttf";
9 sha256 = hash;
10 name = "Agave-${name}.ttf";
11 };
12 # There are slashed variants, but with same name so only bundle the default versions for now:
13 fonts = [
14 (mkAg "Regular" "sha256-vX1VhEgqy9rQ7hPmAgBGxKyIs2QSAYqZC/mL/2BIOrA=")
15 (mkAg "Bold" "sha256-Ax/l/RKyc03law0ThiLac/7HHV4+YxibKzcZnjZs6VI=")
16 ];
17
18in stdenv.mkDerivation {
19 inherit pname version;
20 srcs = fonts;
21 sourceRoot = ".";
22
23 dontUnpack = true;
24
25 installPhase = ''
26 install -D $srcs -t $out/share/fonts/truetype/
27 '';
28
29 meta = with lib; {
30 description = "truetype monospaced typeface designed for X environments";
31 homepage = "https://b.agaric.net/page/agave";
32 license = licenses.mit;
33 maintainers = with maintainers; [ dtzWill ];
34 platforms = platforms.all;
35 };
36}
37