nixpkgs/pkgs/by-name/in/inter-nerdfont/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1003 B
Nix
Raw Normal View History

2024-07-29 00:28:41 +00:00
{
lib,
fontforge,
nerd-font-patcher,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "inter-nerdfont";
2024-11-16 02:53:03 +00:00
version = "4.1";
2024-07-29 00:28:41 +00:00
src = fetchzip {
url = "https://github.com/rsms/inter/releases/download/v${finalAttrs.version}/Inter-${finalAttrs.version}.zip";
stripRoot = false;
2024-11-16 02:53:03 +00:00
hash = "sha256-5vdKKvHAeZi6igrfpbOdhZlDX2/5+UvzlnCQV6DdqoQ=";
2024-07-29 00:28:41 +00:00
};
nativeBuildInputs = [
fontforge
nerd-font-patcher
];
buildPhase = ''
runHook preBuild
nerd-font-patcher Inter.ttc
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm444 'Inter Nerd Font.ttc' $out/share/fonts/truetype/InterNerdFont.ttc
cp *.ttf $out/share/fonts/truetype
runHook postInstall
'';
meta = {
homepage = "https://gitlab.com/mid_os/inter-nerdfont";
description = "NerdFont patch of the Inter font";
license = lib.licenses.ofl;
platforms = lib.platforms.all;
maintainers = [ lib.maintainers.midirhee12 ];
};
})