Created dina-psf package

This commit is contained in:
Jan-Bulthuis committed 2025-02-11 15:48:55 +01:00
1 parent 1b35d92f6b
commit fc5a748fa5
6 files changed
+55 -73

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@
nixpkgs.config = {
packageOverrides = pkgs: {
dina-vector = pkgs.callPackage ./fonts/dina-vector.nix { };
dina-psfu = pkgs.callPackage ./fonts/dina-psfu.nix { };
dina-psf = pkgs.callPackage ./fonts/dina-psf.nix { };
wqy-zenhei = pkgs.callPackage ./fonts/wqy-zenhei.nix { };
wqy-microhei = pkgs.callPackage ./fonts/wqy-microhei.nix { };
wqy-bitmapsong = pkgs.callPackage ./fonts/wqy-bitmapsong.nix { };
+36
View File
@@ -0,0 +1,36 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation {
pname = "dina-psfu";
version = "1.0.0";
unpackPhase = ''
true
'';
buildInputs = with pkgs; [
dina-font.bdf
bdf2psf
];
buildPhase = ''
cp ${pkgs.dina-font.bdf}/share/fonts/misc/Dina_r400-9.bdf ./dina.bdf
# Set the AVERAGE_WIDTH property on the font
sed 's/STARTPROPERTIES 16/STARTPROPERTIES 17\
AVERAGE_WIDTH 70/' ./dina.bdf > ./dina-mod.bdf
# Convert the bdf to psf
bdf2psf --fb ./dina-mod.bdf \
${pkgs.bdf2psf}/share/bdf2psf/standard.equivalents \
${pkgs.bdf2psf}/share/bdf2psf/ascii.set+${pkgs.bdf2psf}/share/bdf2psf/linux.set+${pkgs.bdf2psf}/share/bdf2psf/useful.set \
512 ./dina.psf
'';
installPhase = ''
install -Dm644 -t $out/share/consolefonts *.psf
'';
}
-29
View File
@@ -1,29 +0,0 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation {
pname = "dina-psfu";
version = "1.0.0";
# src = pkgs.fetchurl {
# url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
# # hash = "sha256-r2Vf7ftJCqu7jOc2AqCKaoR/r8eNw2P/OQGqbDOEyl0=";
# hash = "sha256-0uvwkRUbvJ0remTnlP8dElRjaBVd6iukNYBTE/CTO7s=";
# };
unpackPhase = "true";
buildInputs = with pkgs; [
dina-font
bdf2psf
tree
];
buildPhase = ''
tree > debug.txt
'';
installPhase = ''
install -Dm644 $out/debug.txt
'';
}
+2 -6
View File
@@ -7,12 +7,6 @@ pkgs.stdenv.mkDerivation {
pname = "dina-font";
version = "1.0.0";
# src = pkgs.fetchurl {
# url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
# # hash = "sha256-r2Vf7ftJCqu7jOc2AqCKaoR/r8eNw2P/OQGqbDOEyl0=";
# hash = "sha256-0uvwkRUbvJ0remTnlP8dElRjaBVd6iukNYBTE/CTO7s=";
# };
unpackPhase = "true";
buildInputs = [
@@ -21,6 +15,8 @@ pkgs.stdenv.mkDerivation {
pkgs.wqy-bitmapsong
pkgs.tree
];
# TODO: Fix or remove package
buildPhase = ''
tree > debug.txt
'';