1{ lib, stdenvNoCC, fetchzip }:
2
3stdenvNoCC.mkDerivation rec {
4 pname = "hack-font";
5 version = "3.003";
6
7 src = fetchzip {
8 url = "https://github.com/chrissimpkins/Hack/releases/download/v${version}/Hack-v${version}-ttf.zip";
9 hash = "sha256-SxF4kYp9aL/9L9EUniquFadzWt/+PcvhUQOIOvCrFRM=";
10 };
11
12 installPhase = ''
13 runHook preInstall
14
15 install -Dm644 *.ttf -t $out/share/fonts/truetype
16
17 runHook postInstall
18 '';
19
20 meta = with lib; {
21 description = "A typeface designed for source code";
22 longDescription = ''
23 Hack is hand groomed and optically balanced to be a workhorse face for
24 code. It has deep roots in the libre, open source typeface community and
25 expands upon the contributions of the Bitstream Vera & DejaVu projects.
26 The face has been re-designed with a larger glyph set, modifications of
27 the original glyph shapes, and meticulous attention to metrics.
28 '';
29 homepage = "https://sourcefoundry.org/hack/";
30
31 /*
32 "The font binaries are released under a license that permits unlimited
33 print, desktop, and web use for commercial and non-commercial
34 applications. It may be embedded and distributed in documents and
35 applications. The source is released in the widely supported UFO format
36 and may be modified to derive new typeface branches. The full text of
37 the license is available in LICENSE.md" (From the GitHub page)
38 */
39 license = licenses.free;
40 maintainers = with maintainers; [ dywedir ];
41 platforms = platforms.all;
42 };
43}