font-adobe-utopia-100dpi: refactor, move to pkgs/by-name and rename from xorg.fontadobeutopia100dpi

relevant changes:
- font is now in $out/share/fonts/X11 instead of $out/lib/X11/fonts
  i have no idea why fonts would be in lib, so lets see if this breaks
  anything
- font is now under the license adobeUtopia (recognised by SPDX) instead
  of unfreeRedistributable
This commit is contained in:
quantenzitrone
2025-08-28 15:21:32 +02:00
committed by Alyssa Ross
parent 657ebfddbb
commit e21431a165
6 changed files with 60 additions and 43 deletions
+5
View File
@@ -64,6 +64,11 @@ lib.mapAttrs mkLicense (
free = false;
};
adobeUtopia = {
fullName = "Adobe Utopia Font License";
spdxId = "Adobe-Utopia";
};
afl20 = {
spdxId = "AFL-2.0";
fullName = "Academic Free License v2.0";
@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
font-util,
bdftopcf,
mkfontscale,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-adobe-utopia-100dpi";
version = "1.0.5";
src = fetchurl {
url = "mirror://xorg/individual/font/font-adobe-utopia-100dpi-${finalAttrs.version}.tar.xz";
hash = "sha256-+4TsKXqQaXNUjKWbfG2uqtISRL7F0/sefJPfXvQ7Aks=";
};
strictDeps = true;
nativeBuildInputs = [
pkg-config
bdftopcf
font-util
mkfontscale
];
buildInputs = [ font-util ];
configureFlags = [ "--with-fontrootdir=$(out)/share/fonts/X11" ];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname ${finalAttrs.pname} \
--url https://xorg.freedesktop.org/releases/individual/font/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "Adobe Utopia 100dpi pcf fonts";
homepage = "https://gitlab.freedesktop.org/xorg/font/adobe-utopia-100dpi";
license = lib.licenses.adobeUtopia;
maintainers = [ ];
platforms = lib.platforms.unix;
};
})
+2 -41
View File
@@ -4,6 +4,7 @@
bdftopcf,
font-adobe-100dpi,
font-adobe-75dpi,
font-adobe-utopia-100dpi,
font-alias,
font-bh-ttf,
font-bh-type1,
@@ -121,6 +122,7 @@ self: with self; {
encodings = font-encodings;
fontadobe100dpi = font-adobe-100dpi;
fontadobe75dpi = font-adobe-75dpi;
fontadobeutopia100dpi = font-adobe-utopia-100dpi;
fontalias = font-alias;
fontbhttf = font-bh-ttf;
fontbhtype1 = font-bh-type1;
@@ -296,47 +298,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
fontadobeutopia100dpi = callPackage (
{
stdenv,
pkg-config,
fetchurl,
fontutil,
bdftopcf,
mkfontscale,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-adobe-utopia-100dpi";
version = "1.0.5";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/font/font-adobe-utopia-100dpi-1.0.5.tar.xz";
sha256 = "0jq27gs5xpwkghggply5pr215lmamrnpr6x5iia76schg8lyr17v";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [
pkg-config
bdftopcf
fontutil
mkfontscale
];
buildInputs = [ fontutil ];
configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ];
postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' '';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ ];
platforms = lib.platforms.unix;
};
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
fontadobeutopia75dpi = callPackage (
{
@@ -320,6 +320,7 @@ print OUT <<EOF;
bdftopcf,
font-adobe-100dpi,
font-adobe-75dpi,
font-adobe-utopia-100dpi,
font-alias,
font-bh-ttf,
font-bh-type1,
@@ -437,6 +438,7 @@ self: with self; {
encodings = font-encodings;
fontadobe100dpi = font-adobe-100dpi;
fontadobe75dpi = font-adobe-75dpi;
fontadobeutopia100dpi = font-adobe-utopia-100dpi;
fontalias = font-alias;
fontbhttf = font-bh-ttf;
fontbhtype1 = font-bh-type1;
-1
View File
@@ -1020,7 +1020,6 @@ self: super:
# unfree but redistributable
redist = [
"fontadobeutopiatype1"
"fontadobeutopia100dpi"
"fontadobeutopia75dpi"
"fontibmtype1"
"fontbh100dpi"
-1
View File
@@ -94,7 +94,6 @@ mirror://xorg/individual/driver/xf86-video-vmware-13.4.0.tar.xz
mirror://xorg/individual/driver/xf86-video-voodoo-1.2.6.tar.xz
mirror://xorg/individual/driver/xf86-video-wsfb-0.4.0.tar.bz2
mirror://xorg/individual/font/font-adobe-utopia-75dpi-1.0.5.tar.xz
mirror://xorg/individual/font/font-adobe-utopia-100dpi-1.0.5.tar.xz
mirror://xorg/individual/font/font-adobe-utopia-type1-1.0.5.tar.xz
mirror://xorg/individual/font/font-arabic-misc-1.0.4.tar.xz
mirror://xorg/individual/font/font-bh-75dpi-1.0.4.tar.xz