3
0
Fork 0
forked from mirrors/nixpkgs

uni-vga: reduce with lib usage

This commit is contained in:
Sandro Jäckel 2022-04-30 02:43:24 +02:00
parent 9b310a73db
commit 0201c6cf46
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -2,8 +2,6 @@
, libfaketime, fonttosfnt, mkfontscale
}:
with lib;
stdenv.mkDerivation {
name = "uni-vga";
@ -15,7 +13,7 @@ stdenv.mkDerivation {
nativeBuildInputs =
[ bdftopcf libfaketime
fonttosfnt mkfontscale
] ++ optionals stdenv.isLinux [ perl kbd ];
] ++ lib.optionals stdenv.isLinux [ perl kbd ];
postPatch = "patchShebangs .";
@ -26,7 +24,7 @@ stdenv.mkDerivation {
# 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 ''
'' + lib.optionalString stdenv.isLinux ''
# convert font to compressed psf
./bdf2psf.pl -s UniCyrX.sfm u_vga16.bdf \
| psfaddtable - UniCyrX.sfm - \
@ -42,14 +40,14 @@ stdenv.mkDerivation {
install -m 644 -D *.bdf -t "$bdf/share/fonts"
mkfontdir "$bdf/share/fonts"
'' + optionalString stdenv.isLinux ''
'' + lib.optionalString stdenv.isLinux ''
# install psf (for linux virtual terminal)
install -m 644 -D *.psf.gz -t "$out/share/consolefonts"
'';
outputs = [ "out" "bdf" ];
meta = {
meta = with lib; {
description = "Unicode VGA font";
maintainers = [ maintainers.ftrvxmtrx ];
homepage = "http://www.inp.nsk.su/~bolkhov/files/fonts/univga/";