1 { lib, stdenv, fetchFromGitHub
2 , xorg, bdf2psf, bdftopcf
6 stdenv.mkDerivation rec {
10 src = fetchFromGitHub {
13 rev = "cc36b8c9fed7141763e55dcee0a97abffcf08224";
14 sha256 = "1hmp11mrr01b29phw0xyj4h9b92qz19cf56ssf6c47c5j2c4xmbv";
18 [ xorg.mkfontscale bdf2psf bdftopcf
19 xorg.fonttosfnt libfaketime
23 # convert bdf fonts to psf
26 cd ${bdf2psf}/share/bdf2psf
27 for i in $src/*.bdf; do
28 name=$(basename $i .bdf)
30 --fb "$i" standard.equivalents \
31 ascii.set+useful.set+linux.set 512 \
32 "$build/psf/$name.psf"
36 # convert bdf fonts to pcf
37 for i in *.bdf $src/hidpi/*.bdf; do
38 name=$(basename $i .bdf)
39 bdftopcf -o "$name.pcf" "$i"
42 # convert unicode bdf fonts to otb
43 for i in *-uni*.bdf $src/hidpi/*-uni*.bdf; do
44 name=$(basename $i .bdf)
45 faketime -f "1970-01-01 00:00:01" \
46 fonttosfnt -v -o "$name.otb" "$i"
51 # install the psf fonts (for the virtual console)
52 fontDir="$out/share/consolefonts"
53 install -D -m 644 -t "$fontDir" psf/*.psf
55 # install the pcf and otb fonts (for X11,GTK applications)
56 fontDir="$out/share/fonts/misc"
57 install -D -m 644 -t "$fontDir" *.pcf *.otb
63 A monospace bitmap font well suited for programming and terminal use
65 homepage = "https://font.gohu.org/";
66 license = licenses.wtfpl;
67 maintainers = with maintainers; [ rnhmjoj ];