98 lines
2.0 KiB
Nix
98 lines
2.0 KiB
Nix
{ pkgs
|
|
, mach-nixpkgs
|
|
, mach-nix
|
|
, system ? builtins.currentSystem
|
|
, ...
|
|
}: pkgs.stdenv.mkDerivation rec {
|
|
pname = "rec-mono-nyx";
|
|
version = "1.0.0";
|
|
|
|
src = pkgs.fetchgit {
|
|
url = "https://github.com/arrowtype/recursive-code-config.git";
|
|
rev = "c20977eb1f3cd59ca7ce03a740b4745f0d299b27";
|
|
sha256 = "sha256-OaYhOCpjOZI3cIPUNhppqGAQOrGwuQ09tl1pXCtNj5s=";
|
|
};
|
|
|
|
recConfig = builtins.toJSON {
|
|
"Family Name" = "Nyx";
|
|
Fonts = {
|
|
Regular = {
|
|
MONO = 1;
|
|
CASL = 1;
|
|
wght = 500;
|
|
slnt = 0;
|
|
CRSV = 0;
|
|
};
|
|
|
|
Italic = {
|
|
MONO = 1;
|
|
CASL = 1;
|
|
wght = 500;
|
|
slnt = -12;
|
|
CRSV = 0;
|
|
};
|
|
|
|
Bold = {
|
|
MONO = 1;
|
|
CASL = 1;
|
|
wght = 800;
|
|
slnt = 0;
|
|
CRSV = 0;
|
|
};
|
|
|
|
"Bold Italic" = {
|
|
MONO = 1;
|
|
CASL = 1;
|
|
wght = 800;
|
|
slnt = -12;
|
|
CRSV = 0;
|
|
};
|
|
};
|
|
"Code Ligatures" = false;
|
|
Features = [
|
|
"ss01"
|
|
"ss02"
|
|
"ss03"
|
|
"ss04"
|
|
"ss05"
|
|
"ss06"
|
|
"ss08"
|
|
"ss10"
|
|
"ss11"
|
|
"ss12"
|
|
];
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
(mach-nix.lib."${system}".mkPython {
|
|
requirements = builtins.readFile "${src}/requirements.txt";
|
|
_.pyyaml.doInstallCheck = false;
|
|
ignoreDataOutdated = true;
|
|
python = "python39";
|
|
})
|
|
mach-nixpkgs.python39Packages.pip
|
|
mach-nixpkgs.python39Packages.setuptools
|
|
];
|
|
|
|
outputs = [ "out" ];
|
|
phases = [ "unpackPhase" "patchPhase" "buildPhase" "installPhase" ];
|
|
|
|
buildPhase = ''
|
|
echo '${recConfig}' > config.yaml
|
|
python3 scripts/instantiate-code-fonts.py
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/share/fonts/truetype/
|
|
cp fonts/RecMonoNyx/* $out/share/fonts/truetype/
|
|
'';
|
|
|
|
meta = with pkgs.lib; {
|
|
description = "Recusrive Mono - Nyx Style";
|
|
homepage = "https://spectre.app/";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ nyxkrage ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|