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

the package output doesn't change
This commit is contained in:
quantenzitrone
2025-09-23 22:50:25 +02:00
parent b96325543a
commit e6a9281e35
4 changed files with 60 additions and 41 deletions
@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
font-util,
bdftopcf,
mkfontscale,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-bitstream-75dpi";
version = "1.0.4";
src = fetchurl {
url = "mirror://xorg/individual/font/font-bitstream-75dpi-${finalAttrs.version}.tar.xz";
hash = "sha256-qus02HQkqcKwzw6FkHBMkMtbQsajtqDvnkZ273c7+CY=";
};
strictDeps = true;
nativeBuildInputs = [
pkg-config
bdftopcf
mkfontscale
];
buildInputs = [ font-util ];
configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ];
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 = "Bitstream Charter and Terminal 75dpi pcf fonts";
homepage = "https://gitlab.freedesktop.org/xorg/font/bitstream-75dpi";
license = with lib.licenses; [
hpnd
# TODO: change this license or remove this comment when
# https://github.com/spdx/license-list-XML/issues/2824
# gets resolved
xfig
];
maintainers = [ ];
platforms = lib.platforms.unix;
};
})
+2 -40
View File
@@ -16,6 +16,7 @@
font-bh-ttf,
font-bh-type1,
font-bitstream-100dpi,
font-bitstream-75dpi,
font-cronyx-cyrillic,
font-encodings,
font-isas-misc,
@@ -199,6 +200,7 @@ self: with self; {
fontbhttf = font-bh-ttf;
fontbhtype1 = font-bh-type1;
fontbitstream100dpi = font-bitstream-100dpi;
fontbitstream75dpi = font-bitstream-75dpi;
fontcronyxcyrillic = font-cronyx-cyrillic;
fontisasmisc = font-isas-misc;
fontmicromisc = font-micro-misc;
@@ -392,46 +394,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
fontbitstream75dpi = callPackage (
{
stdenv,
pkg-config,
fetchurl,
fontutil,
bdftopcf,
mkfontscale,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-bitstream-75dpi";
version = "1.0.4";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/font/font-bitstream-75dpi-1.0.4.tar.xz";
sha256 = "09pq7dvyyxj6kvps1dm3qr15pjwh9iq9118fryqc5a94fkc39sxa";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [
pkg-config
bdftopcf
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!
fontbitstreamspeedo = callPackage (
{
@@ -339,6 +339,7 @@ print OUT <<EOF;
font-bh-ttf,
font-bh-type1,
font-bitstream-100dpi,
font-bitstream-75dpi,
font-cronyx-cyrillic,
font-encodings,
font-isas-misc,
@@ -522,6 +523,7 @@ self: with self; {
fontbhttf = font-bh-ttf;
fontbhtype1 = font-bh-type1;
fontbitstream100dpi = font-bitstream-100dpi;
fontbitstream75dpi = font-bitstream-75dpi;
fontcronyxcyrillic = font-cronyx-cyrillic;
fontisasmisc = font-isas-misc;
fontmicromisc = font-micro-misc;
-1
View File
@@ -73,7 +73,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-arabic-misc-1.0.4.tar.xz
mirror://xorg/individual/font/font-bitstream-75dpi-1.0.4.tar.xz
mirror://xorg/individual/font/font-bitstream-speedo-1.0.2.tar.gz
mirror://xorg/individual/font/font-bitstream-type1-1.0.4.tar.xz
mirror://xorg/individual/font/font-cursor-misc-1.0.4.tar.xz