nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchurl, python3
2, bdftopcf, xorg
3}:
4
5stdenv.mkDerivation rec {
6 pname = "terminus-font";
7 version = "4.49.1";
8
9 src = fetchurl {
10 url = "mirror://sourceforge/project/${pname}/${pname}-${lib.versions.majorMinor version}/${pname}-${version}.tar.gz";
11 sha256 = "0yggffiplk22lgqklfmd2c0rw8gwchynjh5kz4bz8yv2h6vw2qfr";
12 };
13
14 patches = [ ./SOURCE_DATE_EPOCH-for-otb.patch ];
15
16 nativeBuildInputs =
17 [ python3 bdftopcf xorg.mkfontscale ];
18
19 enableParallelBuilding = true;
20
21 postPatch = ''
22 substituteInPlace Makefile --replace 'fc-cache' '#fc-cache'
23 substituteInPlace Makefile --replace 'gzip' 'gzip -n'
24 '';
25
26 installTargets = [ "install" "install-otb" "fontdir" ];
27 # fontdir depends on the previous two targets, but this is not known
28 # to make, so we need to disable parallelism:
29 enableParallelInstalling = false;
30
31 meta = with lib; {
32 description = "A clean fixed width font";
33 longDescription = ''
34 Terminus Font is designed for long (8 and more hours per day) work
35 with computers. Version 4.30 contains 850 characters, covers about
36 120 language sets and supports ISO8859-1/2/5/7/9/13/15/16,
37 Paratype-PT154/PT254, KOI8-R/U/E/F, Esperanto, many IBM, Windows and
38 Macintosh code pages, as well as the IBM VGA, vt100 and xterm
39 pseudographic characters.
40
41 The sizes present are 6x12, 8x14, 8x16, 10x20, 11x22, 12x24, 14x28 and
42 16x32. The styles are normal and bold (except for 6x12), plus
43 EGA/VGA-bold for 8x14 and 8x16.
44 '';
45 homepage = "https://terminus-font.sourceforge.net/";
46 license = licenses.gpl2Plus;
47 maintainers = with maintainers; [ astsmtl ];
48 };
49}