monaspace: init at 1.000

This commit is contained in:
xeals 2023-11-10 10:45:21 +11:00
parent 149270cfb1
commit ef2a2412ff
Signed by: xeals
SSH Key Fingerprint: SHA256:pRv+8swQDA+/LuZ7NHj9m006BbKexlNK62OUA01ZZBc
2 changed files with 82 additions and 0 deletions

View File

@ -0,0 +1,73 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
}:
let
mkMonaspace =
{ pname
, variants ? [ ]
}: stdenvNoCC.mkDerivation rec {
inherit pname;
version = "1.000";
src = fetchFromGitHub {
owner = "githubnext";
repo = "monaspace";
rev = "v${version}";
hash = "sha256-Zo56r0QoLwxwGQtcWP5cDlasx000G9BFeGINvvwEpQs=";
};
_variants = map (builtins.replaceStrings [ " " ] [ "" ]) variants;
installPhase = ''
local out_font=$out/share/fonts/monaspace
'' + (if variants == [ ] then ''
install -m444 -Dt $out_font fonts/otf/*.otf
install -m444 -Dt $out_font fonts/variable/*.ttf
'' else ''
for variant in $_variants; do
install -m444 -Dt $out_font fonts/otf/"$variant"-*.otf
install -m444 -Dt $out_font fonts/variable/"$variant"Var*.ttf
done
'');
meta = {
description = "An innovative superfamily of fonts for code";
homepage = "https://monaspace.githubnext.com/";
longDescription = ''
Since the earliest days of the teletype machine, code has been set in
monospaced typeletters, on a grid. Monaspace is a new type system
that advances the state of the art for the display of code on screen.
'';
license = lib.licenses.ofl;
platforms = lib.platforms.all;
};
};
in
{
monaspace = mkMonaspace {
pname = "monaspace";
};
monaspace-argon = mkMonaspace {
pname = "monaspace-argon";
variants = [ "Monaspace Argon" ];
};
monaspace-krypton = mkMonaspace {
pname = "monaspace-krypton";
variants = [ "Monaspace Krypton" ];
};
monaspace-neon = mkMonaspace {
pname = "monaspace-neon";
variants = [ "Monaspace Neon" ];
};
monaspace-radon = mkMonaspace {
pname = "monaspace-radon";
variants = [ "Monaspace Radon" ];
};
monaspace-xenon = mkMonaspace {
pname = "monaspace-xenon";
variants = [ "Monaspace Xenon" ];
};
}

View File

@ -21,6 +21,15 @@ rec {
ideaUltimateWithPlugins = ideaUltimatePlugins.jetbrainsWithPlugins;
};
monaspace-fonts = pkgs.callPackage ../data/fonts/monaspace/default.nix { };
inherit (monaspace-fonts)
monaspace
monaspace-argon
monaspace-krypton
monaspace-neon
monaspace-radon
monaspace-xenon;
mopidy-subidy = pkgs.callPackage ../applications/audio/mopidy/subidy.nix {
python3Packages = pkgs.python3Packages // python3Packages;
};