From 2fa8f417f169dc2b9a441d44c18dffe4e5710f9b Mon Sep 17 00:00:00 2001 From: Zitrone Date: Sat, 26 Apr 2025 23:26:19 +0200 Subject: [PATCH 1/4] font-encodings: refactor, move to pkgs/by-name and rename from xorg.encodings relevant changes: - remove some unneeded dependencies --- pkgs/by-name/fo/font-encodings/package.nix | 38 +++++++++++++++++++ pkgs/servers/x11/xorg/default.nix | 37 +----------------- .../x11/xorg/generate-expr-from-tarballs.pl | 2 + pkgs/servers/x11/xorg/tarballs.list | 1 - 4 files changed, 42 insertions(+), 36 deletions(-) create mode 100644 pkgs/by-name/fo/font-encodings/package.nix diff --git a/pkgs/by-name/fo/font-encodings/package.nix b/pkgs/by-name/fo/font-encodings/package.nix new file mode 100644 index 000000000000..9b60deb6337a --- /dev/null +++ b/pkgs/by-name/fo/font-encodings/package.nix @@ -0,0 +1,38 @@ +{ + lib, + stdenv, + fetchurl, + mkfontscale, + writeScript, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "font-encodings"; + version = "1.1.0"; + + src = fetchurl { + url = "mirror://xorg/individual/font/encodings-${finalAttrs.version}.tar.xz"; + hash = "sha256-n/E8YhdWz6EulfMrpIpbI4Oej1d9AEi+2mbGfatN6XU="; + }; + + 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 encodings \ + --url https://xorg.freedesktop.org/releases/individual/font/ \ + | sort -V | tail -n1)" + update-source-version ${finalAttrs.pname} "$version" + ''; + }; + + meta = { + description = "Font encoding tables for libfontenc"; + homepage = "https://gitlab.freedesktop.org/xorg/font/encodings"; + license = lib.licenses.publicDomain; + maintainers = [ ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index ab48f6f94e2c..c8fe23bc9e1b 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -3,6 +3,7 @@ lib, bdftopcf, font-alias, + font-encodings, font-util, gccmakedep, ico, @@ -85,6 +86,7 @@ self: with self; { xwininfo xwud ; + encodings = font-encodings; fontalias = font-alias; fontutil = font-util; libAppleWM = libapplewm; @@ -240,41 +242,6 @@ self: with self; { }) ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! - encodings = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - mkfontscale, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "encodings"; - version = "1.1.0"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/font/encodings-1.1.0.tar.xz"; - sha256 = "0xg99nmpvik6vaz4h03xay7rx0r3bf5a8azkjlpa3ksn2xi3rwcz"; - }; - hardeningDisable = [ - "bindnow" - "relro" - ]; - strictDeps = true; - nativeBuildInputs = [ - pkg-config - mkfontscale - ]; - buildInputs = [ ]; - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - meta = { - pkgConfigModules = [ ]; - platforms = lib.platforms.unix; - }; - }) - ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! fontadobe100dpi = callPackage ( { diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index 9ea02810f2e6..ae509cd39ed0 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -296,6 +296,7 @@ print OUT < Date: Wed, 20 Aug 2025 19:35:15 +0200 Subject: [PATCH 2/4] font-bh-ttf: refactor, move to pkgs/by-name and rename from xorg.fontbhttf 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 --- pkgs/by-name/fo/font-bh-ttf/package.nix | 38 ++++++++++++++++++ pkgs/servers/x11/xorg/default.nix | 40 +------------------ .../x11/xorg/generate-expr-from-tarballs.pl | 2 + pkgs/servers/x11/xorg/overrides.nix | 1 - pkgs/servers/x11/xorg/tarballs.list | 1 - 5 files changed, 42 insertions(+), 40 deletions(-) create mode 100644 pkgs/by-name/fo/font-bh-ttf/package.nix diff --git a/pkgs/by-name/fo/font-bh-ttf/package.nix b/pkgs/by-name/fo/font-bh-ttf/package.nix new file mode 100644 index 000000000000..384996e99917 --- /dev/null +++ b/pkgs/by-name/fo/font-bh-ttf/package.nix @@ -0,0 +1,38 @@ +{ + lib, + stdenv, + fetchurl, + mkfontscale, + writeScript, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "font-bh-ttf"; + version = "1.0.4"; + + src = fetchurl { + url = "mirror://xorg/individual/font/font-bh-ttf-${finalAttrs.version}.tar.xz"; + hash = "sha256-haX5DQDEjCsG/RJeqK28i47pdCnjB1CByHEJJu/sOlY="; + }; + + 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 TrueType fonts"; + homepage = "https://gitlab.freedesktop.org/xorg/font/bh-ttf"; + license = lib.licenses.unfreeRedistributable; + maintainers = [ ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index c8fe23bc9e1b..a8a2227e1cda 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -3,6 +3,7 @@ lib, bdftopcf, font-alias, + font-bh-ttf, font-encodings, font-util, gccmakedep, @@ -88,6 +89,7 @@ self: with self; { ; encodings = font-encodings; fontalias = font-alias; + fontbhttf = font-bh-ttf; fontutil = font-util; libAppleWM = libapplewm; libFS = libfs; @@ -648,44 +650,6 @@ self: with self; { }) ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! - fontbhttf = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - fontutil, - mkfontscale, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "font-bh-ttf"; - version = "1.0.4"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/font/font-bh-ttf-1.0.4.tar.xz"; - sha256 = "0misxkpjc2bir20m01z355sfk3lbpjnshphjzl32p364006zk9c5"; - }; - 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! fontbhtype1 = callPackage ( { diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index ae509cd39ed0..2a8bb3ff6731 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -296,6 +296,7 @@ print OUT < Date: Thu, 21 Aug 2025 00:29:10 +0200 Subject: [PATCH 3/4] 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 --- pkgs/by-name/fo/font-bh-type1/package.nix | 38 ++++++++++++++++++ pkgs/servers/x11/xorg/default.nix | 40 +------------------ .../x11/xorg/generate-expr-from-tarballs.pl | 2 + pkgs/servers/x11/xorg/overrides.nix | 1 - pkgs/servers/x11/xorg/tarballs.list | 1 - 5 files changed, 42 insertions(+), 40 deletions(-) create mode 100644 pkgs/by-name/fo/font-bh-type1/package.nix diff --git a/pkgs/by-name/fo/font-bh-type1/package.nix b/pkgs/by-name/fo/font-bh-type1/package.nix new file mode 100644 index 000000000000..6685aa085356 --- /dev/null +++ b/pkgs/by-name/fo/font-bh-type1/package.nix @@ -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; + }; +}) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index a8a2227e1cda..4b9beec3c5ea 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -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 ( { diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index 2a8bb3ff6731..923b5519255a 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -297,6 +297,7 @@ print OUT < Date: Thu, 21 Aug 2025 01:15:53 +0200 Subject: [PATCH 4/4] font-mutt-misc: refactor, move to pkgs/by-name and rename from xorg.fontmuttmisc 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 --- pkgs/by-name/fo/font-mutt-misc/package.nix | 42 +++++++++++++++++++ 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, 46 insertions(+), 41 deletions(-) create mode 100644 pkgs/by-name/fo/font-mutt-misc/package.nix diff --git a/pkgs/by-name/fo/font-mutt-misc/package.nix b/pkgs/by-name/fo/font-mutt-misc/package.nix new file mode 100644 index 000000000000..7f49a552d17b --- /dev/null +++ b/pkgs/by-name/fo/font-mutt-misc/package.nix @@ -0,0 +1,42 @@ +{ + lib, + stdenv, + fetchurl, + bdftopcf, + mkfontscale, + writeScript, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "font-mutt-misc"; + version = "1.0.4"; + + src = fetchurl { + url = "mirror://xorg/individual/font/font-mutt-misc-${finalAttrs.version}.tar.xz"; + hash = "sha256-sSNZ9OEsI7z8tEi5GCl+l1+pG+9Sk9iNPCU0PMdouyQ="; + }; + + strictDeps = true; + nativeBuildInputs = [ + bdftopcf + 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 = "ClearU pcf fonts"; + homepage = "https://gitlab.freedesktop.org/xorg/font/mutt-misc"; + license = lib.licenses.mit; + maintainers = [ ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 4b9beec3c5ea..a35d19314269 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -6,6 +6,7 @@ font-bh-ttf, font-bh-type1, font-encodings, + font-mutt-misc, font-util, gccmakedep, ico, @@ -92,6 +93,7 @@ self: with self; { fontalias = font-alias; fontbhttf = font-bh-ttf; fontbhtype1 = font-bh-type1; + fontmuttmisc = font-mutt-misc; fontutil = font-util; libAppleWM = libapplewm; libFS = libfs; @@ -1283,46 +1285,6 @@ self: with self; { }) ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! - fontmuttmisc = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - fontutil, - bdftopcf, - mkfontscale, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "font-mutt-misc"; - version = "1.0.4"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/font/font-mutt-misc-1.0.4.tar.xz"; - sha256 = "095vd33kqd157j6xi4sjxwdsjpwpgqliifa8nkybq8rcw7s5j8xi"; - }; - 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! fontschumachermisc = callPackage ( { diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index 923b5519255a..0f13681e4bdd 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -299,6 +299,7 @@ print OUT <