Add monaspace font

This commit is contained in:
Erwin Boskma 2023-11-10 16:45:17 +01:00
parent 0a03308525
commit 53a90c0490
Signed by: erwin
SSH key fingerprint: SHA256:3F6Cm6I3erRqlBwEghZWAQl6eS5WrGTX1Vs/Evec1lQ
3 changed files with 36 additions and 2 deletions

View file

@ -27,14 +27,14 @@ in
fontDir.enable = true;
packages = with pkgs; [
(nerdfonts.override { fonts = [ "CascadiaCode" "DroidSansMono" "FiraCode" "Inconsolata" "Iosevka" "Monoid" "Meslo" "Noto" "SourceCodePro" ]; })
(nerdfonts.override { fonts = [ "Iosevka" "Meslo" "Noto" ]; })
corefonts
dejavu_fonts
google-fonts
kochi-substitute
material-icons
monaspace
noto-fonts-emoji
recursive
ttf_bitstream_vera
twitter-color-emoji
] ++ lib.optional cfg.iosevka-aile iosevka-aile;

View file

@ -21,4 +21,6 @@ _final: prev: {
ddccontrol-db = prev.ddccontrol-db.overrideAttrs (_finalAttrs: prevAttrs: {
patches = (prevAttrs.patches or [ ]) ++ [ ./ddccontrol-db/0001-add-del41d9.patch ];
});
monaspace = prev.pkgs.callPackage ../pkgs/monaspace { };
}

View file

@ -0,0 +1,32 @@
{ lib, stdenvNoCC, fetchzip }:
stdenvNoCC.mkDerivation rec {
pname = "monaspace";
version = "1.000";
src = fetchzip {
url = "https://github.com/githubnext/monaspace/releases/download/v${version}/monaspace-v${version}.zip";
hash = "sha256-H8NOS+pVkrY9DofuJhPR2OlzkF4fMdmP2zfDBfrk83A=";
stripRoot = false;
};
outputs = [ "out" ];
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/monaspace
mkdir -p $out/share/fonts/monaspace-variable
cp monaspace-v${version}/fonts/otf/*.otf $out/share/fonts/monaspace
cp monaspace-v${version}/fonts/variable/*.ttf $out/share/fonts/monaspace-variable
runHook postInstall
'';
meta = with lib; {
description = "Monaspace";
longDescription = "An innovative superfamily of fonts for code.";
homepage = "https://monaspace.githubnext.com/";
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [ AndersonTorres ];
};
}