Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
51 lines
1.3 KiB
Nix
51 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
fontc,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "googlesans-code";
|
|
version = "6.001";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "googlefonts";
|
|
repo = "googlesans-code";
|
|
tag = "v${version}";
|
|
hash = "sha256-ScFx+uty9x+VTWxw7NJm3M7AYr0C00bdSnJJmFW3Jy0=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
fontc
|
|
];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
mkdir -p fonts/variable
|
|
fontc sources/GoogleSansCode.glyphspackage --flatten-components --decompose-transformed-components --output-file "fonts/variable/GoogleSansCode[wght].ttf"
|
|
fontc sources/GoogleSansCode-Italic.glyphspackage --flatten-components --decompose-transformed-components --output-file "fonts/variable/GoogleSansCode-Italic[wght].ttf"
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/share/fonts/googlesans-code
|
|
cp fonts/variable/* $out/share/fonts/googlesans-code/
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Google Sans Code font family";
|
|
homepage = "https://github.com/googlefonts/googlesans-code";
|
|
changelog = "https://github.com/googlefonts/googlesans-code/blob/${src.tag}/CHANGELOG.md";
|
|
license = lib.licenses.ofl;
|
|
maintainers = with lib.maintainers; [ shiphan ];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
}
|