2021-02-13 14:23:35 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, libfaketime, fonttosfnt, mkfontscale }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "siji-${version}";
|
|
|
|
version = "2016-05-13";
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stark";
|
|
|
|
repo = "siji";
|
|
|
|
rev = "3cbb7fe938c33aaadbb657803ea5946e5157d6e2";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1408g4nxwdd682vjqpmgv0cp0bfnzzzwls62cjs9zrds16xa9dpf";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ libfaketime fonttosfnt mkfontscale ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
# compress pcf fonts
|
|
|
|
gzip -n -9 pcf/*
|
|
|
|
|
|
|
|
# convert bdf fonts to otb
|
|
|
|
for i in bdf/*; do
|
|
|
|
name=$(basename $i .bdf)
|
|
|
|
faketime -f "1970-01-01 00:00:01" \
|
|
|
|
fonttosfnt -v -o "$name.otb" "$i"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2020-09-25 04:45:31 +00:00
|
|
|
install -m 644 -D *.otb pcf/* -t "$out/share/fonts/misc"
|
2020-04-24 23:36:52 +00:00
|
|
|
install -m 644 -D bdf/* -t "$bdf/share/fonts/misc"
|
|
|
|
mkfontdir "$out/share/fonts/misc"
|
|
|
|
mkfontdir "$bdf/share/fonts/misc"
|
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
outputs = [ "out" "bdf" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/stark/siji";
|
|
|
|
description = "An iconic bitmap font based on Stlarch with additional glyphs";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.asymmetric ];
|
|
|
|
};
|
|
|
|
}
|