From 4ae0815d3bf068f05aad961adf179d781e4c5829 Mon Sep 17 00:00:00 2001 From: fro_ozen Date: Thu, 4 Jun 2015 23:09:32 +0200 Subject: [PATCH] Add the tewi font --- lib/maintainers.nix | 1 + pkgs/data/fonts/tewi/default.nix | 47 ++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 50 insertions(+) create mode 100644 pkgs/data/fonts/tewi/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 174eced43c28..7f755154814a 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -79,6 +79,7 @@ fluffynukeit = "Daniel Austin "; forkk = "Andrew Okin "; fpletz = "Franz Pletz "; + fro_ozen = "fro_ozen "; ftrvxmtrx = "Siarhei Zirukin "; funfunctor = "Edward O'Callaghan "; fuuzetsu = "Mateusz Kowalczyk "; diff --git a/pkgs/data/fonts/tewi/default.nix b/pkgs/data/fonts/tewi/default.nix new file mode 100644 index 000000000000..dfcc0578f000 --- /dev/null +++ b/pkgs/data/fonts/tewi/default.nix @@ -0,0 +1,47 @@ +{stdenv, fetchgit, bdftopcf, mkfontdir, mkfontscale}: + +stdenv.mkDerivation rec { + date = "2015-06-07"; + name = "tewi-font-${date}"; + + src = fetchgit { + url = "https://github.com/lucy/tewi-font"; + rev = "ff930e66ae471da4fdc226ffe65fd1ccd13d4a69"; + sha256 = "d641b911cc2132a00c311e3d978c1ca454b0fb3bc3ff4b4742b9f765b765a94b"; + }; + + buildInputs = [ bdftopcf mkfontdir mkfontscale ]; + buildPhase = '' + for i in *.bdf; do + bdftopcf -o ''${i/bdf/pcf} $i + done + + gzip *.pcf + ''; + + installPhase = '' + fontDir="$out/share/fonts/misc" + mkdir -p "$fontDir" + mv *.pcf.gz "$fontDir" + + cd "$fontDir" + mkfontdir + mkfontscale + ''; + + meta = with stdenv.lib; { + description = "A nice bitmap font, readable even at small sizes"; + longDescription = '' + Tewi is a bitmap font, readable even at very small font sizes. This is + particularily useful while programming, to fit a lot of code on your + screen. + ''; + homepage = "https://github.com/lucy/tewi-font"; + license = { + fullName = "GNU General Public License with a font exception"; + url = "https://www.gnu.org/licenses/gpl-faq.html#FontException"; + }; + maintainers = [ maintainers.fro_ozen ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6b54674cb656..164b7dee77e2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14529,6 +14529,8 @@ let tetex = callPackage ../tools/typesetting/tex/tetex { libpng = libpng12; }; + tewi-font = callPackage ../data/fonts/tewi {}; + tex4ht = callPackage ../tools/typesetting/tex/tex4ht { }; texFunctions = import ../tools/typesetting/tex/nix pkgs;