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