uni-vega: fix build on darwin
This commit is contained in:
parent
a3b97a4061
commit
fc479ad23f
@ -2,6 +2,8 @@
|
||||
, libfaketime, fonttosfnt, mkfontscale
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "uni-vga";
|
||||
|
||||
@ -11,9 +13,9 @@ stdenv.mkDerivation {
|
||||
};
|
||||
|
||||
nativeBuildInputs =
|
||||
[ perl kbd bdftopcf libfaketime
|
||||
[ bdftopcf libfaketime
|
||||
fonttosfnt mkfontscale
|
||||
];
|
||||
] ++ optionals stdenv.isLinux [ perl kbd ];
|
||||
|
||||
postPatch = "patchShebangs .";
|
||||
|
||||
@ -21,20 +23,19 @@ stdenv.mkDerivation {
|
||||
# convert font to compressed pcf
|
||||
bdftopcf u_vga16.bdf | gzip -c -9 -n > u_vga16.pcf.gz
|
||||
|
||||
# convert bdf font to otb
|
||||
faketime -f "1970-01-01 00:00:01" \
|
||||
fonttosfnt -v -o u_vga16.otb u_vga16.bdf
|
||||
'' + optionalString stdenv.isLinux ''
|
||||
# convert font to compressed psf
|
||||
./bdf2psf.pl -s UniCyrX.sfm u_vga16.bdf \
|
||||
| psfaddtable - UniCyrX.sfm - \
|
||||
| gzip -c -9 -n > u_vga16.psf.gz
|
||||
|
||||
# convert bdf font to otb
|
||||
faketime -f "1970-01-01 00:00:01" \
|
||||
fonttosfnt -v -o u_vga16.otb u_vga16.bdf
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
# install pcf (for X11 applications) and psf (virtual terminal)
|
||||
# install pcf (for X11 applications)
|
||||
install -m 644 -D *.pcf.gz -t "$out/share/fonts"
|
||||
install -m 644 -D *.psf.gz -t "$out/share/consolefonts"
|
||||
mkfontdir "$out/share/fonts"
|
||||
|
||||
# install bdf font
|
||||
@ -44,14 +45,17 @@ stdenv.mkDerivation {
|
||||
# install otb font (for GTK applications)
|
||||
install -m 644 -D *.otb -t "$otb/share/fonts"
|
||||
mkfontdir "$otb/share/fonts"
|
||||
'' + optionalString stdenv.isLinux ''
|
||||
# install psf (for linux virtual terminal)
|
||||
install -m 644 -D *.psf.gz -t "$out/share/consolefonts"
|
||||
'';
|
||||
|
||||
outputs = [ "out" "bdf" "otb" ];
|
||||
|
||||
meta = {
|
||||
description = "Unicode VGA font";
|
||||
maintainers = [stdenv.lib.maintainers.ftrvxmtrx];
|
||||
maintainers = [ maintainers.ftrvxmtrx ];
|
||||
homepage = http://www.inp.nsk.su/~bolkhov/files/fonts/univga/;
|
||||
license = stdenv.lib.licenses.mit;
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user