font-bh-type1: refactor, move to pkgs/by-name and rename from xorg.fontbhtype1

relevant changes:
- remove some dependencies that don't seem to be needed
- 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 commit is contained in:
quantenzitrone
2025-08-26 15:38:10 +02:00
parent 0fec3fb91c
commit 472fb3da5a
5 changed files with 42 additions and 40 deletions
+38
View File
@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchurl,
mkfontscale,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-bh-type1";
version = "1.0.4";
src = fetchurl {
url = "mirror://xorg/individual/font/font-bh-type1-${finalAttrs.version}.tar.xz";
hash = "sha256-Gd7D7Aar3mvt0QCUV56Si+Dw/DvbT76T9MaczkBtcqY=";
};
strictDeps = true;
nativeBuildInputs = [ mkfontscale ];
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 = "Luxi PostScript Type 1 fonts";
homepage = "https://gitlab.freedesktop.org/xorg/font/bh-type1";
license = lib.licenses.unfreeRedistributable;
maintainers = [ ];
platforms = lib.platforms.unix;
};
})
+2 -38
View File
@@ -4,6 +4,7 @@
bdftopcf,
font-alias,
font-bh-ttf,
font-bh-type1,
font-encodings,
font-util,
gccmakedep,
@@ -90,6 +91,7 @@ self: with self; {
encodings = font-encodings;
fontalias = font-alias;
fontbhttf = font-bh-ttf;
fontbhtype1 = font-bh-type1;
fontutil = font-util;
libAppleWM = libapplewm;
libFS = libfs;
@@ -650,44 +652,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
fontbhtype1 = callPackage (
{
stdenv,
pkg-config,
fetchurl,
fontutil,
mkfontscale,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-bh-type1";
version = "1.0.4";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/font/font-bh-type1-1.0.4.tar.xz";
sha256 = "19kjdm0cx766yj9vwkyv7gyg1q4bjag5g500s7nnppmb0vnc7phr";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [
pkg-config
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!
fontbitstream100dpi = callPackage (
{
@@ -297,6 +297,7 @@ print OUT <<EOF;
bdftopcf,
font-alias,
font-bh-ttf,
font-bh-type1,
font-encodings,
font-util,
gccmakedep,
@@ -383,6 +384,7 @@ self: with self; {
encodings = font-encodings;
fontalias = font-alias;
fontbhttf = font-bh-ttf;
fontbhtype1 = font-bh-type1;
fontutil = font-util;
libAppleWM = libapplewm;
libFS = libfs;
-1
View File
@@ -1187,7 +1187,6 @@ self: super:
"fontadobeutopiatype1"
"fontadobeutopia100dpi"
"fontadobeutopia75dpi"
"fontbhtype1"
"fontibmtype1"
"fontbh100dpi"
"fontbh75dpi"
-1
View File
@@ -115,7 +115,6 @@ mirror://xorg/individual/font/font-bh-75dpi-1.0.4.tar.xz
mirror://xorg/individual/font/font-bh-100dpi-1.0.4.tar.xz
mirror://xorg/individual/font/font-bh-lucidatypewriter-75dpi-1.0.4.tar.xz
mirror://xorg/individual/font/font-bh-lucidatypewriter-100dpi-1.0.4.tar.xz
mirror://xorg/individual/font/font-bh-type1-1.0.4.tar.xz
mirror://xorg/individual/font/font-bitstream-75dpi-1.0.4.tar.xz
mirror://xorg/individual/font/font-bitstream-100dpi-1.0.4.tar.xz
mirror://xorg/individual/font/font-bitstream-speedo-1.0.2.tar.gz