Skip to content

Commit

Permalink
Attempt to use inconsolata-psf
Browse files Browse the repository at this point in the history
Since giveup GH-667, I don't have any reason to
choose console fonts with the Japanese glyphs

Update GH-721
  • Loading branch information
kachick committed Dec 1, 2024
1 parent 936ed34 commit 9d519e1
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
in
{
cozette = pkgs.my.cozette;
inconsolata-psf = pkgs.my.inconsolata-psf;
micro-kdl = pkgs.my.micro-kdl;
micro-nordcolors = pkgs.my.micro-nordcolors;
micro-everforest = pkgs.my.micro-everforest;
Expand Down
8 changes: 6 additions & 2 deletions nixos/console.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
earlySetup = true;
# The font should have PSF formats. Do not specify TTF and OTF
# You can list current glyphs with `showconsolefont`
font = "${pkgs.my.cozette}/share/consolefonts/cozette_hidpi.psf";
#
# Candidates:
#
# font = "${pkgs.my.cozette}/share/consolefonts/cozette_hidpi.psf";
font = "${pkgs.my.inconsolata-psf}/share/consolefonts/Inconsolata-32r.psf";

packages = with pkgs.my; [ cozette ];
packages = with pkgs.my; [ inconsolata-psf ];
keyMap = "us";

# Applying iceberg for 16(0-15) console colors
Expand Down
1 change: 1 addition & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

beedii = pkgs.callPackage ./beedii { };
cozette = pkgs.callPackage ./cozette { };
inconsolata-psf = pkgs.callPackage ./inconsolata-psf { };

posix_shared_functions = pkgs.callPackage ./posix_shared_functions { };

Expand Down
37 changes: 37 additions & 0 deletions pkgs/inconsolata-psf/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:

# Patched because of nixpkgs does not include psf
# https://github.com/NixOS/nixpkgs/blob/41d21a82c38e226e234e16f4ff213b3fcf85e6e9/pkgs/data/fonts/cozette/default.nix#L1C1-L33C2
stdenvNoCC.mkDerivation {
pname = "inconsolata-psf";
version = "unstable-2016-05-02";

src = fetchFromGitHub {
owner = "xeechou";
repo = "Inconsolata-psf";
rev = "75778a3d5b0a05cb492d51120b055e91672b3bf8";
sha256 = "sha256-kth0ExRdO3dhCd4AnIGh6MGLL3Msfq5+msk9ALs2yCk=";
};

installPhase = ''
runHook preInstall
install -Dm644 *.psf -t $out/share/consolefonts
runHook postInstall
'';

meta = with lib; {
description = "Transforming Inconsolata font to psf format for Linux console";
homepage = "https://github.com/xeechou/Inconsolata-psf";
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [
kachick
];
};
}

0 comments on commit 9d519e1

Please sign in to comment.