Merge pull request #290014 from jopejoe1/ubuntu-font

ubuntu-sans{,-mono}: rename from ubuntu_font_family, 0.83 -> 1.004
This commit is contained in:
Johannes Jöns
2024-07-17 18:46:36 +00:00
committed by GitHub
9 changed files with 132 additions and 38 deletions
@@ -224,7 +224,7 @@ in
# Default Fonts
fonts.packages = with pkgs; [
dejavu_fonts # Default monospace font in LMDE 6+
ubuntu_font_family # required for default theme
ubuntu-classic # required for default theme
];
})
@@ -92,7 +92,7 @@ in
environment.etc."X11/xkb".source = xcfg.xkb.dir;
fonts.packages = [ pkgs.dejavu_fonts pkgs.ubuntu_font_family ];
fonts.packages = [ pkgs.dejavu_fonts ];
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
@@ -71,8 +71,8 @@ in
font = {
package = mkOption {
type = types.package;
default = pkgs.ubuntu_font_family;
defaultText = literalExpression "pkgs.ubuntu_font_family";
default = pkgs.ubuntu-classic;
defaultText = literalExpression "pkgs.ubuntu-classic";
description = ''
The package path that contains the font given in the name option.
'';
@@ -0,0 +1,41 @@
{
lib,
stdenvNoCC,
fetchgit,
gitUpdater,
rename,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "ubuntu-classic";
version = "0.83-6ubuntu2";
src = fetchgit {
url = "https://git.launchpad.net/ubuntu/+source/fonts-ubuntu-classic";
rev = "import/${finalAttrs.version}";
hash = "sha256-GrpBVgisVu7NklFYqkEqYi0hui/pCHlsM3Ky4mEUq90=";
};
installPhase = ''
runHook preInstall
install -m444 -Dt $out/share/fonts/truetype/ubuntu *.ttf
runHook postInstall
'';
passthru.updateScript = gitUpdater { rev-prefix = "import/"; };
meta = with lib; {
description = "Ubuntu Classic font";
longDescription = "The Ubuntu typeface has been specially
created to complement the Ubuntu tone of voice. It has a
contemporary style and contains characteristics unique to
the Ubuntu brand that convey a precise, reliable and free attitude.";
homepage = "https://design.ubuntu.com/font";
changelog = "https://git.launchpad.net/ubuntu/+source/fonts-ubuntu-classic/tree/FONTLOG.txt?h=${finalAttrs.src.rev}";
license = licenses.ufl;
platforms = platforms.all;
maintainers = with maintainers; [ bobby285271 ];
};
})
@@ -0,0 +1,43 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
gitUpdater,
rename,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "ubuntu-sans-mono";
version = "1.004";
src = fetchFromGitHub {
owner = "canonical";
repo = "Ubuntu-Sans-Mono-fonts";
rev = "v${finalAttrs.version}";
hash = "sha256-IjfjFsXRYK2l6i4Q/LoYuwu5t18TmVXXJQDSsW45qNc=";
};
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 ];
};
})
+43
View File
@@ -0,0 +1,43 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
gitUpdater,
rename,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "ubuntu-sans";
version = "1.004";
src = fetchFromGitHub {
owner = "canonical";
repo = "Ubuntu-Sans-fonts";
rev = "v${finalAttrs.version}";
hash = "sha256-TJHhRGBPDrYOAmOKyMaLcL2ugr4Bw2J6ErovglNx648=";
};
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";
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-fonts/blob/${finalAttrs.src.rev}/FONTLOG.txt";
license = licenses.ufl;
platforms = platforms.all;
maintainers = with maintainers; [ jopejoe1 ];
};
})
@@ -1,32 +0,0 @@
{ lib, stdenvNoCC, fetchzip }:
stdenvNoCC.mkDerivation rec {
pname = "ubuntu-font-family";
version = "0.83";
src = fetchzip {
url = "https://assets.ubuntu.com/v1/fad7939b-ubuntu-font-family-${version}.zip";
hash = "sha256-FAg1xn8Gcbwmuvqtg9SquSet4oTT9nqE+Izeq7ZMVcA=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/ubuntu
mv *.ttf $out/share/fonts/ubuntu
runHook postInstall
'';
meta = with lib; {
description = "Ubuntu Font Family";
longDescription = "The Ubuntu typeface has been specially
created to complement the Ubuntu tone of voice. It has a
contemporary style and contains characteristics unique to
the Ubuntu brand that convey a precise, reliable and free attitude.";
homepage = "http://font.ubuntu.com/";
license = licenses.ufl;
platforms = platforms.all;
maintainers = [ maintainers.antono ];
};
}
+1
View File
@@ -1405,6 +1405,7 @@ mapAliases ({
uade123 = uade; # Added 2022-07-30
uberwriter = apostrophe; # Added 2020-04-23
ubootBeagleboneBlack = ubootAmx335xEVM; # Added 2020-01-21
ubuntu_font_family = ubuntu-classic; # Added 2024-02-19
ue4 = throw "ue4 has been removed, because the package was broken for years"; # Added 2023-11-22
uefi-firmware-parser = throw "The uefi-firmware-parser package was dropped since it was unmaintained."; # Added 2024-06-21
uhd3_5 = throw "uhd3_5 has been removed, because it was no longer needed"; # Added 2023-10-07
-2
View File
@@ -28981,8 +28981,6 @@ with pkgs;
ubuntu-themes = callPackage ../data/themes/ubuntu-themes { };
ubuntu_font_family = callPackage ../data/fonts/ubuntu-font-family { };
ucs-fonts = callPackage ../data/fonts/ucs-fonts { };
bront_fonts = callPackage ../data/fonts/bront { };