@@ -0,0 +1,47 @@
1+{stdenv, fetchgit, bdftopcf, mkfontdir, mkfontscale}:
2+
3+stdenv.mkDerivation rec {
4+ date = "2015-06-07";
5+ name = "tewi-font-${date}";
6+
7+ src = fetchgit {
8+ url = "https://github.com/lucy/tewi-font";
9+ rev = "ff930e66ae471da4fdc226ffe65fd1ccd13d4a69";
10+ sha256 = "d641b911cc2132a00c311e3d978c1ca454b0fb3bc3ff4b4742b9f765b765a94b";
11+ };
12+
13+ buildInputs = [ bdftopcf mkfontdir mkfontscale ];
14+ buildPhase = ''
15+ for i in *.bdf; do
16+ bdftopcf -o ''${i/bdf/pcf} $i
17+ done
18+
19+ gzip *.pcf
20+ '';
21+
22+ installPhase = ''
23+ fontDir="$out/share/fonts/misc"
24+ mkdir -p "$fontDir"
25+ mv *.pcf.gz "$fontDir"
26+
27+ cd "$fontDir"
28+ mkfontdir
29+ mkfontscale
30+ '';
31+
32+ meta = with stdenv.lib; {
33+ description = "A nice bitmap font, readable even at small sizes";
34+ longDescription = ''
35+ Tewi is a bitmap font, readable even at very small font sizes. This is
36+ particularily useful while programming, to fit a lot of code on your
37+ screen.
38+ '';
39+ homepage = "https://github.com/lucy/tewi-font";
40+ license = {
41+ fullName = "GNU General Public License with a font exception";
42+ url = "https://www.gnu.org/licenses/gpl-faq.html#FontException";
43+ };
44+ maintainers = [ maintainers.fro_ozen ];
45+ platforms = platforms.unix;
46+ };
47+}