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