From 42fca86f89f37ee92f2c8bf8a8bed221f1404c0d Mon Sep 17 00:00:00 2001 From: quantenzitrone Date: Sat, 15 Nov 2025 23:52:58 +0100 Subject: [PATCH] font-jis-misc: refactor, move to pkgs/by-name and rename from xorg.fontjismisc the output doesn't change --- pkgs/by-name/fo/font-jis-misc/package.nix | 53 +++++++++++++++++++ pkgs/servers/x11/xorg/default.nix | 42 +-------------- .../x11/xorg/generate-expr-from-tarballs.pl | 2 + pkgs/servers/x11/xorg/overrides.nix | 23 -------- pkgs/servers/x11/xorg/tarballs.list | 1 - 5 files changed, 57 insertions(+), 64 deletions(-) create mode 100644 pkgs/by-name/fo/font-jis-misc/package.nix diff --git a/pkgs/by-name/fo/font-jis-misc/package.nix b/pkgs/by-name/fo/font-jis-misc/package.nix new file mode 100644 index 000000000000..bf1705c536c7 --- /dev/null +++ b/pkgs/by-name/fo/font-jis-misc/package.nix @@ -0,0 +1,53 @@ +{ + lib, + stdenv, + fetchurl, + pkg-config, + fontutil, + bdftopcf, + mkfontscale, + writeScript, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "font-jis-misc"; + version = "1.0.4"; + + src = fetchurl { + url = "mirror://xorg/individual/font/font-jis-misc-${finalAttrs.version}.tar.xz"; + hash = "sha256-eNHv9sRx96poAqJtYszPUdjlGFWGQG2bbh7mkbC/+tA="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + pkg-config + bdftopcf + mkfontscale + ]; + + buildInputs = [ fontutil ]; + + 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 = "JIS X 9051: 1984 pcf font"; + homepage = "https://gitlab.freedesktop.org/xorg/font/jis-misc"; + # licensing is unclear: + # - COPYING just says "permission to use" + # - The industial standard (JIS X 9051: 1984) this is from, is paid. + license = lib.licenses.unfree; + maintainers = [ ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 692bb119dab8..8d5d3d0e2688 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -26,6 +26,7 @@ font-encodings, font-ibm-type1, font-isas-misc, + font-jis-misc, font-micro-misc, font-misc-cyrillic, font-misc-ethiopic, @@ -234,6 +235,7 @@ self: with self; { fontdecmisc = font-dec-misc; fontibmtype1 = font-ibm-type1; fontisasmisc = font-isas-misc; + fontjismisc = font-jis-misc; fontmicromisc = font-micro-misc; fontmisccyrillic = font-misc-cyrillic; fontmiscethiopic = font-misc-ethiopic; @@ -392,46 +394,6 @@ self: with self; { }) ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! - fontjismisc = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - fontutil, - bdftopcf, - mkfontscale, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "font-jis-misc"; - version = "1.0.4"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/font/font-jis-misc-1.0.4.tar.xz"; - sha256 = "1l7spyq93rhydsdnsh46alcfbn2irz664vd209lamxviqkvfzlbq"; - }; - 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! fontmiscmeltho = callPackage ( { diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index 317cfff13415..e83973e25d3d 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -357,6 +357,7 @@ print OUT <