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

the package output doesn't change
This commit is contained in:
quantenzitrone
2025-09-23 22:50:24 +02:00
parent a8a78723a4
commit b96325543a
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-100dpi";
version = "1.0.4";
src = fetchurl {
url = "mirror://xorg/individual/font/font-bitstream-100dpi-${finalAttrs.version}.tar.xz";
hash = "sha256-LRzGgu/k9+vfX72Ilh2MoysnKZaHKGM96iChYnaQwac=";
};
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 100dpi pcf fonts";
homepage = "https://gitlab.freedesktop.org/xorg/font/bitstream-100dpi";
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
@@ -15,6 +15,7 @@
font-bh-lucidatypewriter-75dpi,
font-bh-ttf,
font-bh-type1,
font-bitstream-100dpi,
font-cronyx-cyrillic,
font-encodings,
font-isas-misc,
@@ -197,6 +198,7 @@ self: with self; {
fontbhlucidatypewriter75dpi = font-bh-lucidatypewriter-75dpi;
fontbhttf = font-bh-ttf;
fontbhtype1 = font-bh-type1;
fontbitstream100dpi = font-bitstream-100dpi;
fontcronyxcyrillic = font-cronyx-cyrillic;
fontisasmisc = font-isas-misc;
fontmicromisc = font-micro-misc;
@@ -390,46 +392,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
fontbitstream100dpi = callPackage (
{
stdenv,
pkg-config,
fetchurl,
fontutil,
bdftopcf,
mkfontscale,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-bitstream-100dpi";
version = "1.0.4";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/font/font-bitstream-100dpi-1.0.4.tar.xz";
sha256 = "19y1j1v65890x8yn6a47jqljfax3ihfrd25xbzgypxz4xy1cc71d";
};
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!
fontbitstream75dpi = callPackage (
{
@@ -338,6 +338,7 @@ print OUT <<EOF;
font-bh-lucidatypewriter-75dpi,
font-bh-ttf,
font-bh-type1,
font-bitstream-100dpi,
font-cronyx-cyrillic,
font-encodings,
font-isas-misc,
@@ -520,6 +521,7 @@ self: with self; {
fontbhlucidatypewriter75dpi = font-bh-lucidatypewriter-75dpi;
fontbhttf = font-bh-ttf;
fontbhtype1 = font-bh-type1;
fontbitstream100dpi = font-bitstream-100dpi;
fontcronyxcyrillic = font-cronyx-cyrillic;
fontisasmisc = font-isas-misc;
fontmicromisc = font-micro-misc;
-1
View File
@@ -74,7 +74,6 @@ 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-100dpi-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