font-adobe-75dpi: refactor, move to pkgs/by-name and rename from xorg.fontadobe75dpi

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

this also fixes one occasion i could find in nixpkgs where the font path was relevant
This commit is contained in:
Zitrone
2025-08-28 15:21:32 +02:00
committed by Alyssa Ross
parent ca6fee2e3c
commit f8136a0f82
5 changed files with 56 additions and 43 deletions
@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
font-util,
bdftopcf,
mkfontscale,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-adobe-75dpi";
version = "1.0.4";
src = fetchurl {
url = "mirror://xorg/individual/font/font-adobe-75dpi-${finalAttrs.version}.tar.xz";
hash = "sha256-EoGmLb7e0WnklcrhpbSH4fM28rTZcdkpEcWcEDmZuRE=";
};
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 75dpi pcf fonts";
homepage = "https://gitlab.freedesktop.org/xorg/font/adobe-75dpi";
license = lib.licenses.hpndSellVariant; # plus a trademark that doesn't change the license
maintainers = [ ];
platforms = lib.platforms.unix;
};
})
+1 -1
View File
@@ -29,7 +29,7 @@ let
ModulePath "${xorg.xorgserver.out}/lib/xorg/modules"
ModulePath "${xorg.xf86videodummy}/lib/xorg/modules"
XkbDir "${xkeyboard_config}/share/X11/xkb"
FontPath "${xorg.fontadobe75dpi}/lib/X11/fonts/75dpi"
FontPath "${xorg.fontadobe75dpi}/share/fonts/X11/75dpi"
FontPath "${xorg.fontadobe100dpi}/lib/X11/fonts/100dpi"
FontPath "${xorg.fontmiscmisc}/lib/X11/fonts/misc"
FontPath "${xorg.fontcursormisc}/lib/X11/fonts/misc"
+2 -41
View File
@@ -2,6 +2,7 @@
{
lib,
bdftopcf,
font-adobe-75dpi,
font-alias,
font-bh-ttf,
font-bh-type1,
@@ -117,6 +118,7 @@ self: with self; {
xwud
;
encodings = font-encodings;
fontadobe75dpi = font-adobe-75dpi;
fontalias = font-alias;
fontbhttf = font-bh-ttf;
fontbhtype1 = font-bh-type1;
@@ -333,47 +335,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
fontadobe75dpi = callPackage (
{
stdenv,
pkg-config,
fetchurl,
fontutil,
bdftopcf,
mkfontscale,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-adobe-75dpi";
version = "1.0.4";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/font/font-adobe-75dpi-1.0.4.tar.xz";
sha256 = "04drk4wi176524lxjwfrnkr3dwz1hysabqfajpj6klfypqnsd08j";
};
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!
fontadobeutopia100dpi = callPackage (
{
@@ -318,6 +318,7 @@ print OUT <<EOF;
{
lib,
bdftopcf,
font-adobe-75dpi,
font-alias,
font-bh-ttf,
font-bh-type1,
@@ -433,6 +434,7 @@ self: with self; {
xwud
;
encodings = font-encodings;
fontadobe75dpi = font-adobe-75dpi;
fontalias = font-alias;
fontbhttf = font-bh-ttf;
fontbhtype1 = font-bh-type1;
-1
View File
@@ -93,7 +93,6 @@ mirror://xorg/individual/driver/xf86-video-vesa-2.6.0.tar.xz
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-75dpi-1.0.4.tar.xz
mirror://xorg/individual/font/font-adobe-100dpi-1.0.4.tar.xz
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