mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
Merge pull request #11350 from magnetophon/dina-font-master
dina font: rename to dina-pcf, add vanilla version
This commit is contained in:
commit
92f27b1a0a
61
pkgs/data/fonts/dina-pcf/default.nix
Normal file
61
pkgs/data/fonts/dina-pcf/default.nix
Normal file
@ -0,0 +1,61 @@
|
||||
{stdenv, fetchurl, unzip, bdftopcf, mkfontdir, mkfontscale}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.92";
|
||||
name = "dina-font-pcf-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.donationcoder.com/Software/Jibz/Dina/downloads/Dina.zip";
|
||||
sha256 = "1kq86lbxxgik82aywwhawmj80vsbz3hfhdyhicnlv9km7yjvnl8z";
|
||||
};
|
||||
|
||||
buildInputs = [ unzip bdftopcf mkfontdir mkfontscale ];
|
||||
|
||||
dontBuild = true;
|
||||
patchPhase = "sed -i 's/microsoft-cp1252/ISO8859-1/' *.bdf";
|
||||
installPhase = ''
|
||||
_get_font_size() {
|
||||
_pt=$\{1%.bdf}
|
||||
_pt=$\{_pt#*-}
|
||||
echo $_pt
|
||||
}
|
||||
|
||||
for i in Dina_i400-*.bdf; do
|
||||
bdftopcf -t -o DinaItalic$(_get_font_size $i).pcf $i
|
||||
done
|
||||
for i in Dina_i700-*.bdf; do
|
||||
bdftopcf -t -o DinaBoldItalic$(_get_font_size $i).pcf $i
|
||||
done
|
||||
for i in Dina_r400-*.bdf; do
|
||||
bdftopcf -t -o DinaMedium$(_get_font_size $i).pcf $i
|
||||
done
|
||||
for i in Dina_r700-*.bdf; do
|
||||
bdftopcf -t -o DinaBold$(_get_font_size $i).pcf $i
|
||||
done
|
||||
gzip *.pcf
|
||||
|
||||
fontDir="$out/share/fonts/misc"
|
||||
mkdir -p "$fontDir"
|
||||
mv *.pcf.gz "$fontDir"
|
||||
|
||||
cd "$fontDir"
|
||||
mkfontdir
|
||||
mkfontscale
|
||||
'';
|
||||
|
||||
preferLocalBuild = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A monospace bitmap font aimed at programmers";
|
||||
longDescription = ''
|
||||
Dina is a monospace bitmap font, primarily aimed at programmers. It is
|
||||
relatively compact to allow a lot of code on screen, while (hopefully)
|
||||
clear enough to remain readable even at high resolutions.
|
||||
'';
|
||||
homepage = https://www.donationcoder.com/Software/Jibz/Dina/;
|
||||
downloadPage = https://www.donationcoder.com/Software/Jibz/Dina/;
|
||||
license = licenses.free;
|
||||
maintainers = [ maintainers.prikhi ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{stdenv, fetchurl, unzip, bdftopcf, mkfontdir, mkfontscale}:
|
||||
{ stdenv, fetchurl, unzip }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.92";
|
||||
@ -9,42 +9,15 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1kq86lbxxgik82aywwhawmj80vsbz3hfhdyhicnlv9km7yjvnl8z";
|
||||
};
|
||||
|
||||
buildInputs = [ unzip bdftopcf mkfontdir mkfontscale ];
|
||||
nativeBuildInputs = [ unzip ];
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
dontBuild = true;
|
||||
patchPhase = "sed -i 's/microsoft-cp1252/ISO8859-1/' *.bdf";
|
||||
installPhase = ''
|
||||
_get_font_size() {
|
||||
_pt=$\{1%.bdf}
|
||||
_pt=$\{_pt#*-}
|
||||
echo $_pt
|
||||
}
|
||||
|
||||
for i in Dina_i400-*.bdf; do
|
||||
bdftopcf -t -o DinaItalic$(_get_font_size $i).pcf $i
|
||||
done
|
||||
for i in Dina_i700-*.bdf; do
|
||||
bdftopcf -t -o DinaBoldItalic$(_get_font_size $i).pcf $i
|
||||
done
|
||||
for i in Dina_r400-*.bdf; do
|
||||
bdftopcf -t -o DinaMedium$(_get_font_size $i).pcf $i
|
||||
done
|
||||
for i in Dina_r700-*.bdf; do
|
||||
bdftopcf -t -o DinaBold$(_get_font_size $i).pcf $i
|
||||
done
|
||||
gzip *.pcf
|
||||
|
||||
fontDir="$out/share/fonts/misc"
|
||||
mkdir -p "$fontDir"
|
||||
mv *.pcf.gz "$fontDir"
|
||||
|
||||
cd "$fontDir"
|
||||
mkfontdir
|
||||
mkfontscale
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/share/fonts
|
||||
cp *.bdf $out/share/fonts
|
||||
'';
|
||||
|
||||
preferLocalBuild = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A monospace bitmap font aimed at programmers";
|
||||
longDescription = ''
|
||||
|
@ -10677,6 +10677,8 @@ let
|
||||
|
||||
dina-font = callPackage ../data/fonts/dina { };
|
||||
|
||||
dina-font-pcf = callPackage ../data/fonts/dina-pcf { };
|
||||
|
||||
docbook5 = callPackage ../data/sgml+xml/schemas/docbook-5.0 { };
|
||||
|
||||
docbook_sgml_dtd_31 = callPackage ../data/sgml+xml/schemas/sgml-dtd/docbook/3.1.nix { };
|
||||
|
Loading…
Reference in New Issue
Block a user