Skip to content

Commit

Permalink
Fix bug with the inconsolata font
Browse files Browse the repository at this point in the history
Underlying bug:

googlefonts/Inconsolata#42

As yet unmerged fix:

NixOS/nixpkgs#136647

This PR can be reverted once this fixed is merged upstream.
  • Loading branch information
malloc47 committed Sep 26, 2021
1 parent 17150f3 commit e697082
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ with pkgs.lib;
programs.kitty = {
enable = true;
font = {
package = pkgs.inconsolata;
package = pkgs.inconsolata-unstable;
name = "${config.settings.fontName}";
};
settings = {
Expand Down
2 changes: 1 addition & 1 deletion nixos/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ in
fonts.fonts = with pkgs; [
corefonts
geosanslight
inconsolata
inconsolata-unstable
libertine
libre-baskerville
];
Expand Down
1 change: 1 addition & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(
self: super: {
geosanslight = super.callPackage geosanslight/default.nix {};
inconsolata-unstable = super.callPackage inconsolata-unstable/default.nix {};
aws-okta = super.callPackage aws-okta/default.nix {};
}
)
25 changes: 25 additions & 0 deletions pkgs/inconsolata-unstable/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ lib, stdenv, fetchFromGitHub }:

stdenv.mkDerivation {
pname = "inconsolata-unstable";
version = "unstable-2021-01-19";

src = fetchFromGitHub {
owner = "google";
repo = "fonts";
rev = "f113126dc4b9b1473d9354a86129c9d7b837aa1a";
sha256 = "0safw5prpa63mqcyfw3gr3a535w4c9hg5ayw5pkppiwil7n3pyxs";
};

installPhase = ''
install -m644 --target $out/share/fonts/truetype/inconsolata -D $src/ofl/inconsolata/*.ttf
'';

meta = with lib; {
homepage = "https://www.levien.com/type/myfonts/inconsolata.html";
description = "A monospace font for both screen and print";
maintainers = with maintainers; [ mikoim raskin ];
license = licenses.ofl;
platforms = platforms.all;
};
}

0 comments on commit e697082

Please sign in to comment.