From db23a88b9a80583c22dba7c2b4b45866f1dd23ca Mon Sep 17 00:00:00 2001 From: quantenzitrone Date: Sat, 15 Nov 2025 23:01:50 +0100 Subject: [PATCH] font-dec-misc: refactor, move to pkgs/by-name and rename from xorg.fontdecmisc the output doesn't change --- pkgs/by-name/fo/font-dec-misc/package.nix | 50 +++++++++++++++++++ pkgs/servers/x11/xorg/default.nix | 42 +--------------- .../x11/xorg/generate-expr-from-tarballs.pl | 2 + pkgs/servers/x11/xorg/tarballs.list | 1 - 4 files changed, 54 insertions(+), 41 deletions(-) create mode 100644 pkgs/by-name/fo/font-dec-misc/package.nix diff --git a/pkgs/by-name/fo/font-dec-misc/package.nix b/pkgs/by-name/fo/font-dec-misc/package.nix new file mode 100644 index 000000000000..d01519a7dc9e --- /dev/null +++ b/pkgs/by-name/fo/font-dec-misc/package.nix @@ -0,0 +1,50 @@ +{ + lib, + stdenv, + fetchurl, + pkg-config, + fontutil, + bdftopcf, + mkfontscale, + writeScript, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "font-dec-misc"; + version = "1.0.4"; + + src = fetchurl { + url = "mirror://xorg/individual/font/font-dec-misc-${finalAttrs.version}.tar.xz"; + hash = "sha256-gtloIB2P+L7A5R3M14G7TU6/F+EQBJRCeb3AIB4WGvc="; + }; + + 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 = "DEC cursors in pcf font format"; + homepage = "https://gitlab.freedesktop.org/xorg/font/dec-misc"; + license = lib.licenses.hpnd; + maintainers = [ ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 657b8cdc206c..0edc2598824f 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -22,6 +22,7 @@ font-cronyx-cyrillic, font-cursor-misc, font-daewoo-misc, + font-dec-misc, font-encodings, font-isas-misc, font-micro-misc, @@ -229,6 +230,7 @@ self: with self; { fontcronyxcyrillic = font-cronyx-cyrillic; fontcursormisc = font-cursor-misc; fontdaewoomisc = font-daewoo-misc; + fontdecmisc = font-dec-misc; fontisasmisc = font-isas-misc; fontmicromisc = font-micro-misc; fontmisccyrillic = font-misc-cyrillic; @@ -388,46 +390,6 @@ self: with self; { }) ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! - fontdecmisc = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - fontutil, - bdftopcf, - mkfontscale, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "font-dec-misc"; - version = "1.0.4"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/font/font-dec-misc-1.0.4.tar.xz"; - sha256 = "1xqs2qg21h5xg519810hw4bvykjdpf0xgk0xwp0bxy4g3lh6inc2"; - }; - 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! fontibmtype1 = callPackage ( { diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index 4528e042dbca..dae1a1e55376 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -353,6 +353,7 @@ print OUT <