depot/third_party/nixpkgs/pkgs/by-name/ub/ubuntu-sans-mono/package.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

43 lines
1.2 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
lib,
stdenvNoCC,
fetchFromGitHub,
gitUpdater,
rename,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "ubuntu-sans-mono";
version = "1.006";
src = fetchFromGitHub {
owner = "canonical";
repo = "Ubuntu-Sans-Mono-fonts";
rev = "v${finalAttrs.version}";
hash = "sha256-EFZZnMZTQHo2Tr9/rtb7C5gAlQ/0uYT+MQ1gKkqQ5hE=";
};
installPhase = ''
runHook preInstall
install -m444 -Dt $out/share/fonts/truetype/ubuntu-sans fonts/variable/*
${rename}/bin/rename 's/\[.*\]//' $out/share/fonts/truetype/ubuntu-sans/*
runHook postInstall
'';
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
meta = with lib; {
description = "Ubuntu Font Family (Mono)";
longDescription = "The Ubuntu Font Family are a set of matching libre/open fonts.
The fonts were originally developed in 20102011,
further expanded and improved in 2015,
and expanded again in 20222023 when variable fonts were added.";
homepage = "https://design.ubuntu.com/font";
changelog = "https://github.com/canonical/Ubuntu-Sans-Mono-fonts/blob/${finalAttrs.src.rev}/FONTLOG.txt";
license = licenses.ufl;
platforms = platforms.all;
maintainers = with maintainers; [ jopejoe1 ];
};
})