2016-05-15 04:59:57 +01:00
|
|
|
{ stdenv, fetchurl, bdftopcf, mkfontdir, mkfontscale }:
|
2012-06-04 20:57:56 +01:00
|
|
|
|
2016-02-16 15:38:59 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "dosemu-fonts";
|
2016-05-15 04:59:57 +01:00
|
|
|
version = "1.4.0";
|
2012-06-04 20:57:56 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-02-16 15:38:59 +00:00
|
|
|
url = "mirror://sourceforge/dosemu/dosemu-${version}.tgz";
|
2012-06-04 20:57:56 +01:00
|
|
|
sha256 = "0l1zwmw42mpakjrzmbygshcg2qzq9mv8lx42738rz3j9hrqzg4pw";
|
|
|
|
};
|
|
|
|
|
2016-05-15 04:59:57 +01:00
|
|
|
buildCommand = ''
|
|
|
|
tar xf "$src" --anchored --wildcards '*/etc/*.bdf' '*/etc/dosemu.alias'
|
2012-06-04 20:57:56 +01:00
|
|
|
fontPath="$out/share/fonts/X11/misc/dosemu"
|
|
|
|
mkdir -p "$fontPath"
|
2016-05-15 04:59:57 +01:00
|
|
|
for i in */etc/*.bdf; do
|
2012-06-04 20:57:56 +01:00
|
|
|
fontOut="$out/share/fonts/X11/misc/dosemu/$(basename "$i" .bdf).pcf.gz"
|
|
|
|
echo -n "Installing font $fontOut..." >&2
|
2017-08-10 20:43:49 +01:00
|
|
|
${bdftopcf}/bin/bdftopcf $i | gzip -c -9 -n > "$fontOut"
|
2012-06-04 20:57:56 +01:00
|
|
|
echo " done." >&2
|
|
|
|
done
|
2016-05-15 04:59:57 +01:00
|
|
|
cp */etc/dosemu.alias "$fontPath/fonts.alias"
|
2012-06-04 20:57:56 +01:00
|
|
|
cd "$fontPath"
|
2016-05-15 04:59:57 +01:00
|
|
|
${mkfontdir}/bin/mkfontdir
|
|
|
|
${mkfontscale}/bin/mkfontscale
|
2012-06-04 20:57:56 +01:00
|
|
|
'';
|
|
|
|
|
2017-08-10 20:43:49 +01:00
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHashMode = "recursive";
|
|
|
|
outputHash = "1miqv0ral5vazx721wildjlzvji5r7pbgm39c0cpj5ywafaikxr8";
|
|
|
|
|
2012-06-04 20:57:56 +01:00
|
|
|
meta = {
|
|
|
|
description = "Various fonts from the DOSEmu project";
|
|
|
|
};
|
|
|
|
}
|