mirror of
https://git.kb-one.de/kb01/aux-config.git
synced 2025-12-06 10:40:48 +00:00
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
fontforge,
|
|
nerd-font-patcher,
|
|
stdenvNoCC,
|
|
fetchurl,
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
name = "poly-nerdfont";
|
|
|
|
regular = fetchurl {
|
|
# Finally a mirror that has a sha256 that doesn't change.
|
|
url = "https://googlefontdirectory.googlecode.com/hg-history/d7441308e589c9fa577f920fc4152fa32477a267/poly/src/Poly-Regular.otf";
|
|
sha256 = "1mxp2lvki6b1h7r9xcj1ld0g4z5y3dmsal85xam4yr764zpjzaiw";
|
|
};
|
|
|
|
italic = fetchurl {
|
|
# Finally a mirror that has a sha256 that doesn't change.
|
|
url = "https://googlefontdirectory.googlecode.com/hg-history/d7441308e589c9fa577f920fc4152fa32477a267/poly/src/Poly-Italic.otf";
|
|
sha256 = "1chzcy3kyi7wpr4iq4aj1v24fq1wwph1v5z96dimlqcrnvm66h2l";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
fontforge
|
|
nerd-font-patcher
|
|
];
|
|
|
|
sourceRoot = ".";
|
|
|
|
dontUnpack = true;
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
nerd-font-patcher -c ${regular}
|
|
nerd-font-patcher -c ${italic}
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm444 PolyNerdFont*.otf -t $out/share/fonts/opentype
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "http://www.fontsquirrel.com/fonts/poly";
|
|
description = "Nerdfont patched Poly Font";
|
|
license = licenses.ofl;
|
|
platforms = platforms.all;
|
|
};
|
|
}
|