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