Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to use inconsolata-psf #965

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
];
};
}