Merge pull request #80228 from rnhmjoj/tamsyn
tamsyn: generate otb and split output
This commit is contained in:
commit
02371d9410
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, mkfontdir, mkfontscale }:
|
||||
{ stdenv, fetchurl, fontforge, mkfontscale }:
|
||||
|
||||
let
|
||||
version = "1.11";
|
||||
@ -11,27 +11,32 @@ in stdenv.mkDerivation {
|
||||
sha256 = "0kpjzdj8sv5871b8827mjgj9dswk75h94jj5iia2bds18ih1pglp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ mkfontdir mkfontscale ];
|
||||
nativeBuildInputs = [ fontforge mkfontscale ];
|
||||
|
||||
unpackPhase = ''
|
||||
tar -xzf $src --strip-components=1
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
# install the pcf fonts (for xorg applications)
|
||||
fontDir="$out/share/fonts/tamsyn"
|
||||
mkdir -p "$fontDir"
|
||||
mv *.pcf "$fontDir"
|
||||
mv *.psf.gz "$fontDir"
|
||||
postBuild = ''
|
||||
# convert pcf fonts to otb
|
||||
for i in *.pcf; do
|
||||
name=$(basename "$i" .pcf)
|
||||
fontforge -lang=ff -c "Open(\"$i\"); Generate(\"$name.otb\")"
|
||||
done
|
||||
|
||||
cd "$fontDir"
|
||||
mkfontdir
|
||||
mkfontscale
|
||||
# compress pcf fonts
|
||||
gzip -n -9 *.pcf
|
||||
'';
|
||||
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = "13l7ighfmn3kmqmchlksfg8ss22ndjk71rs0f9fn5p5zk7s4dn5x";
|
||||
installPhase = ''
|
||||
install -m 644 -D *.pcf.gz -t "$out/share/fonts/misc"
|
||||
install -m 644 -D *.psf.gz -t "$out/share/consolefonts"
|
||||
install -m 644 -D *.otb -t "$otb/share/fonts/misc"
|
||||
mkfontdir "$out/share/fonts/misc"
|
||||
mkfontdir "$otb/share/fonts/misc"
|
||||
'';
|
||||
|
||||
outputs = [ "out" "otb" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A monospace bitmap font aimed at programmers";
|
||||
|
@ -17965,7 +17965,7 @@ in
|
||||
|
||||
inherit (callPackages ../data/fonts/tai-languages { }) tai-ahom;
|
||||
|
||||
tamsyn = callPackage ../data/fonts/tamsyn { };
|
||||
tamsyn = callPackage ../data/fonts/tamsyn { inherit (buildPackages.xorg) mkfontscale; };
|
||||
|
||||
tango-icon-theme = callPackage ../data/icons/tango-icon-theme {
|
||||
gtk = res.gtk2;
|
||||
|
Loading…
Reference in New Issue
Block a user