libxcb-errors: refactor, move to pkgs/by-name and rename from xorg.xcbutilerrors

relevant changes:
- remove gperf and xorgproto from buildInputs at they don't seem to be
  required (no relevant changes with diff --recursive)
This commit is contained in:
quantenzitrone
2025-08-19 15:34:10 +02:00
parent d41e8bba22
commit d051ea0c85
5 changed files with 67 additions and 54 deletions
+62
View File
@@ -0,0 +1,62 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
m4,
python3,
xcbproto,
libxcb,
writeScript,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libxcb-errors";
version = "1.0.1";
outputs = [
"out"
"dev"
];
src = fetchurl {
url = "mirror://xorg/individual/xcb/xcb-util-errors-${finalAttrs.version}.tar.xz";
hash = "sha256-VijIe5hCWa2Se6zYpClYMZw2vfSwZYh4A8nYIPuA81c=";
};
strictDeps = true;
nativeBuildInputs = [
pkg-config
m4
python3
];
buildInputs = [
xcbproto
libxcb
];
propagatedBuildInputs = [ libxcb ];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname xcb-util-errors \
--url https://xorg.freedesktop.org/releases/individual/lib/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
meta = {
description = "XCB utility library that gives human readable names to error, event & request codes";
homepage = "https://gitlab.freedesktop.org/xorg/lib/libxcb-errors";
license = lib.licenses.x11;
maintainers = [ ];
pkgConfigModules = [ "xcb-errors" ];
platforms = lib.platforms.unix;
};
})
+2 -46
View File
@@ -16,6 +16,7 @@
libx11,
libxau,
libxcb,
libxcb-errors,
libxcb-util,
libxcvt,
libxcursor,
@@ -102,6 +103,7 @@ self: with self; {
libXv = libxv;
utilmacros = util-macros;
xcbproto = xcb-proto;
xcbutilerrors = libxcb-errors;
xcbutil = libxcb-util;
xkeyboardconfig = xkeyboard-config;
xorgcffiles = xorg-cf-files;
@@ -3240,52 +3242,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
xcbutilerrors = callPackage (
{
stdenv,
pkg-config,
fetchurl,
gperf,
libxcb,
xcbproto,
xorgproto,
m4,
python3,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xcb-util-errors";
version = "1.0.1";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/xcb/xcb-util-errors-1.0.1.tar.xz";
sha256 = "0mzkh3xj1n690dw8hrdhyjykd71ib0ls9n5cgf9asna2k1xwha2n";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [
pkg-config
m4
python3
];
buildInputs = [
gperf
libxcb
xcbproto
xorgproto
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ "xcb-errors" ];
platforms = lib.platforms.unix;
};
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
xcbutilimage = callPackage (
{
@@ -48,6 +48,7 @@ $pcMap{"xau"} = "libXau";
$pcMap{"xbitmaps"} = "xbitmaps";
$pcMap{"xcb-atom"} = "xcbutil";
$pcMap{"xcb-aux"} = "xcbutil";
$pcMap{"xcb-errors"} = "xcbutilerrors";
$pcMap{"xcb-event"} = "xcbutil";
$pcMap{"xcb-proto"} = "xcbproto";
$pcMap{"xcb-util"} = "xcbutil";
@@ -313,6 +314,7 @@ print OUT <<EOF;
libx11,
libxau,
libxcb,
libxcb-errors,
libxcb-util,
libxcvt,
libxcursor,
@@ -399,6 +401,7 @@ self: with self; {
libXv = libxv;
utilmacros = util-macros;
xcbproto = xcb-proto;
xcbutilerrors = libxcb-errors;
xcbutil = libxcb-util;
xkeyboardconfig = xkeyboard-config;
xorgcffiles = xorg-cf-files;
-7
View File
@@ -437,13 +437,6 @@ self: super:
xcalc = addMainProgram super.xcalc { };
xcbutilerrors = super.xcbutilerrors.overrideAttrs (attrs: {
outputs = [
"out"
"dev"
]; # mainly to get rid of propagating others
});
xcbutilcursor = super.xcbutilcursor.overrideAttrs (attrs: {
outputs = [
"out"
-1
View File
@@ -1,4 +1,3 @@
mirror://xorg/individual/xcb/xcb-util-errors-1.0.1.tar.xz
mirror://xorg/individual/xcb/xcb-util-image-0.4.1.tar.xz
mirror://xorg/individual/xcb/xcb-util-keysyms-0.4.1.tar.xz
mirror://xorg/individual/xcb/xcb-util-renderutil-0.3.10.tar.xz