libx{v,fixes,render,cursor,randr}: refactor, migrate to pkgs/by-name and rename from xorg namespace (#415049)

This commit is contained in:
jopejoe1
2025-08-18 08:33:40 +02:00
committed by GitHub
9 changed files with 329 additions and 237 deletions
+58
View File
@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
xorgproto,
libx11,
libxfixes,
libxrender,
writeScript,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libxcursor";
version = "1.2.3";
outputs = [
"out"
"dev"
];
src = fetchurl {
url = "mirror://xorg/individual/lib/libXcursor-${finalAttrs.version}.tar.xz";
hash = "sha256-/elALdTP552nHi2Wu5gK/F5v9Pin10wVnhlmr7KywsA=";
};
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
libx11
libxfixes
libxrender
];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname libXcursor \
--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 = "X11 Cursor management library";
homepage = "https://gitlab.freedesktop.org/xorg/lib/libxcursor";
license = lib.licenses.hpndSellVariant;
maintainers = [ ];
pkgConfigModules = [ "xcursor" ];
platforms = lib.platforms.unix;
};
})
+57
View File
@@ -0,0 +1,57 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
xorgproto,
libX11,
writeScript,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libxfixes";
version = "6.0.1";
outputs = [
"out"
"dev"
];
src = fetchurl {
url = "mirror://xorg/individual/lib/libXfixes-${finalAttrs.version}.tar.xz";
hash = "sha256-tpX5PNJJlCGrAtInREWOZQzMiMHUyBMNYCACE6vALVg=";
};
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
libX11
];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname libXfixes \
--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 = "Xlib-based library for the XFIXES Extension";
homepage = "https://gitlab.freedesktop.org/xorg/lib/libxfixes";
license = with lib.licenses; [
hpndSellVariant
mit
];
maintainers = [ ];
pkgConfigModules = [ "xfixes" ];
platforms = lib.platforms.unix;
};
})
+64
View File
@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
xorgproto,
libx11,
libxext,
libxrender,
writeScript,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libxrandr";
version = "1.5.4";
outputs = [
"out"
"dev"
];
src = fetchurl {
url = "mirror://xorg/individual/lib/libXrandr-${finalAttrs.version}.tar.xz";
hash = "sha256-GtWwZTdfSoWRWqYGEcxkB8BgSSohTX+dryFL51LDtNM=";
};
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
libx11
libxext
libxrender
];
propagatedBuildInputs = [ libxrender ];
configureFlags = lib.optional (
stdenv.hostPlatform != stdenv.buildPlatform
) "--enable-malloc0returnsnull";
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname libXrandr \
--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 = "Xlib Resize, Rotate and Reflection (RandR) extension library";
homepage = "https://gitlab.freedesktop.org/xorg/lib/libxrandr";
license = lib.licenses.hpndSellVariant;
maintainers = [ ];
pkgConfigModules = [ "xrandr" ];
platforms = lib.platforms.unix;
};
})
+61
View File
@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
xorgproto,
libx11,
writeScript,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libxrender";
version = "0.9.12";
outputs = [
"out"
"dev"
"doc"
];
src = fetchurl {
url = "mirror://xorg/individual/lib/libXrender-${finalAttrs.version}.tar.xz";
hash = "sha256-uDISjaSLOcjWCCJEgXQ0A60Wkb9OVU5L6cF03xcdG5c=";
};
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
libx11
];
propagatedBuildInputs = [ xorgproto ];
configureFlags = lib.optional (
stdenv.hostPlatform != stdenv.buildPlatform
) "--enable-malloc0returnsnull";
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname libXrender \
--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 = "Xlib library for the Render Extension to the X11 protocol";
homepage = "https://gitlab.freedesktop.org/xorg/lib/libxrender";
license = lib.licenses.hpndSellVariant;
maintainers = [ ];
pkgConfigModules = [ "xrender" ];
platforms = lib.platforms.unix;
};
})
+64
View File
@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
xorgproto,
libX11,
libXext,
writeScript,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libxv";
version = "1.0.13";
outputs = [
"out"
"dev"
"devdoc"
];
src = fetchurl {
url = "mirror://xorg/individual/lib/libXv-${finalAttrs.version}.tar.xz";
hash = "sha256-fTSRCVjhwfjRk9go/qG32hkilygKNUN68GkvADugN1U=";
};
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
libX11
libXext
];
configureFlags = lib.optional (
stdenv.hostPlatform != stdenv.buildPlatform
) "--enable-malloc0returnsnull";
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname libXv \
--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 = "Xlib-based library for the X Video (Xv) extension to the X Window System";
homepage = "https://gitlab.freedesktop.org/xorg/lib/libxv";
license = with lib.licenses; [
hpnd
hpndSellVariant
];
maintainers = [ ];
pkgConfigModules = [ "xv" ];
platforms = lib.platforms.unix;
};
})
+10 -190
View File
@@ -17,8 +17,13 @@
libxau,
libxcb,
libxcvt,
libxcursor,
libxdmcp,
libxext,
libxfixes,
libxrandr,
libxrender,
libxv,
lndir,
luit,
makedepend,
@@ -65,8 +70,13 @@ self: with self; {
libpthreadstubs = libpthread-stubs;
libX11 = libx11;
libXau = libxau;
libXcursor = libxcursor;
libXdmcp = libxdmcp;
libXext = libxext;
libXfixes = libxfixes;
libXrandr = libxrandr;
libXrender = libxrender;
libXv = libxv;
utilmacros = util-macros;
xcbproto = xcb-proto;
xkeyboardconfig = xkeyboard-config;
@@ -1984,46 +1994,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
libXcursor = callPackage (
{
stdenv,
pkg-config,
fetchurl,
xorgproto,
libX11,
libXfixes,
libXrender,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libXcursor";
version = "1.2.3";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/lib/libXcursor-1.2.3.tar.xz";
sha256 = "1h62narayrhrkqalrmx7z3s6yppw1acbp5id3skrvrygshnl1sgx";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
libX11
libXfixes
libXrender
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ "xcursor" ];
platforms = lib.platforms.unix;
};
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
libXdamage = callPackage (
{
@@ -2062,42 +2032,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
libXfixes = callPackage (
{
stdenv,
pkg-config,
fetchurl,
xorgproto,
libX11,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libXfixes";
version = "6.0.1";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/lib/libXfixes-6.0.1.tar.xz";
sha256 = "0n1dq2mi60i0c06i7j6lq64cq335ir2l89yj0amj3529s8ygk5dn";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
libX11
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ "xfixes" ];
platforms = lib.platforms.unix;
};
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
libXfont = callPackage (
{
@@ -2471,82 +2405,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
libXrandr = callPackage (
{
stdenv,
pkg-config,
fetchurl,
xorgproto,
libX11,
libXext,
libXrender,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libXrandr";
version = "1.5.4";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/lib/libXrandr-1.5.4.tar.xz";
sha256 = "1lxlqd9ffjr1myfpyk91594n1h07ck6121m6ba8qajjz6xjv1m8s";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
libX11
libXext
libXrender
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ "xrandr" ];
platforms = lib.platforms.unix;
};
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
libXrender = callPackage (
{
stdenv,
pkg-config,
fetchurl,
xorgproto,
libX11,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libXrender";
version = "0.9.12";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/lib/libXrender-0.9.12.tar.xz";
sha256 = "15qv3lbxyx61x55lwmafpy8idb836is82i1213bchfcblj6i4cmq";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
libX11
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ "xrender" ];
platforms = lib.platforms.unix;
};
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
libXres = callPackage (
{
@@ -2665,44 +2523,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
libXv = callPackage (
{
stdenv,
pkg-config,
fetchurl,
xorgproto,
libX11,
libXext,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libXv";
version = "1.0.13";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/lib/libXv-1.0.13.tar.xz";
sha256 = "0m9pl0xh0bv9y1x46d8a52bj46fsnyhzwa6qjg8zihg1b04r2d3x";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
libX11
libXext
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ "xv" ];
platforms = lib.platforms.unix;
};
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
libXvMC = callPackage (
{
@@ -47,9 +47,14 @@ $pcMap{"x11-xcb"} = "libX11";
$pcMap{"xau"} = "libXau";
$pcMap{"xbitmaps"} = "xbitmaps";
$pcMap{"xcb-proto"} = "xcbproto";
$pcMap{"xcursor"} = "libXcursor";
$pcMap{"xdmcp"} = "libXdmcp";
$pcMap{"xext"} = "libXext";
$pcMap{"xfixes"} = "libXfixes";
$pcMap{"xrandr"} = "libXrandr";
$pcMap{"xrender"} = "libXrender";
$pcMap{"xtrans"} = "xtrans";
$pcMap{"xv"} = "libXv";
$pcMap{"\$PIXMAN"} = "pixman";
$pcMap{"\$RENDERPROTO"} = "xorgproto";
$pcMap{"\$DRI3PROTO"} = "xorgproto";
@@ -305,8 +310,13 @@ print OUT <<EOF;
libxau,
libxcb,
libxcvt,
libxcursor,
libxdmcp,
libxext,
libxfixes,
libxrandr,
libxrender,
libxv,
lndir,
luit,
makedepend,
@@ -353,8 +363,13 @@ self: with self; {
libpthreadstubs = libpthread-stubs;
libX11 = libx11;
libXau = libxau;
libXcursor = libxcursor;
libXdmcp = libxdmcp;
libXext = libxext;
libXfixes = libxfixes;
libXrandr = libxrandr;
libXrender = libxrender;
libXv = libxv;
utilmacros = util-macros;
xcbproto = xcb-proto;
xkeyboardconfig = xkeyboard-config;
-42
View File
@@ -264,13 +264,6 @@ self: super:
propagatedBuildInputs = attrs.propagatedBuildInputs or [ ] ++ [ xorg.libXmu ];
});
libXcursor = super.libXcursor.overrideAttrs (attrs: {
outputs = [
"out"
"dev"
];
});
libXdamage = super.libXdamage.overrideAttrs (attrs: {
outputs = [
"out"
@@ -299,13 +292,6 @@ self: super:
};
});
libXfixes = super.libXfixes.overrideAttrs (attrs: {
outputs = [
"out"
"dev"
];
});
libXi = super.libXi.overrideAttrs (attrs: {
outputs = [
"out"
@@ -341,15 +327,6 @@ self: super:
buildFlags = [ "BITMAP_DEFINES='-DBITMAPDIR=\"/no-such-path\"'" ];
});
libXrandr = super.libXrandr.overrideAttrs (attrs: {
outputs = [
"out"
"dev"
];
configureFlags = attrs.configureFlags or [ ] ++ malloc0ReturnsNullCrossFlag;
propagatedBuildInputs = attrs.propagatedBuildInputs or [ ] ++ [ xorg.libXrender ];
});
libSM = super.libSM.overrideAttrs (attrs: {
outputs = [
"out"
@@ -362,16 +339,6 @@ self: super:
];
});
libXrender = super.libXrender.overrideAttrs (attrs: {
outputs = [
"out"
"dev"
"doc"
];
configureFlags = attrs.configureFlags or [ ] ++ malloc0ReturnsNullCrossFlag;
propagatedBuildInputs = attrs.propagatedBuildInputs or [ ] ++ [ xorg.xorgproto ];
});
libXres = super.libXres.overrideAttrs (attrs: {
outputs = [
"out"
@@ -387,15 +354,6 @@ self: super:
configureFlags = attrs.configureFlags or [ ] ++ malloc0ReturnsNullCrossFlag;
});
libXv = super.libXv.overrideAttrs (attrs: {
outputs = [
"out"
"dev"
"devdoc"
];
configureFlags = attrs.configureFlags or [ ] ++ malloc0ReturnsNullCrossFlag;
});
libXvMC = super.libXvMC.overrideAttrs (attrs: {
outputs = [
"out"
-5
View File
@@ -157,9 +157,7 @@ mirror://xorg/individual/lib/libSM-1.2.6.tar.xz
mirror://xorg/individual/lib/libWindowsWM-1.0.1.tar.bz2
mirror://xorg/individual/lib/libXaw-1.0.16.tar.xz
mirror://xorg/individual/lib/libXcomposite-0.4.6.tar.xz
mirror://xorg/individual/lib/libXcursor-1.2.3.tar.xz
mirror://xorg/individual/lib/libXdamage-1.1.6.tar.xz
mirror://xorg/individual/lib/libXfixes-6.0.1.tar.xz
mirror://xorg/individual/lib/libXfont-1.5.4.tar.bz2
mirror://xorg/individual/lib/libXfont2-2.0.7.tar.xz
mirror://xorg/individual/lib/libXft-2.3.9.tar.xz
@@ -170,15 +168,12 @@ mirror://xorg/individual/lib/libXmu-1.2.1.tar.xz
mirror://xorg/individual/lib/libXp-1.0.4.tar.xz
mirror://xorg/individual/lib/libXpm-3.5.17.tar.xz
mirror://xorg/individual/lib/libXpresent-1.0.1.tar.xz
mirror://xorg/individual/lib/libXrandr-1.5.4.tar.xz
mirror://xorg/individual/lib/libXrender-0.9.12.tar.xz
mirror://xorg/individual/lib/libXres-1.2.2.tar.xz
mirror://xorg/individual/lib/libXScrnSaver-1.2.4.tar.xz
mirror://xorg/individual/lib/libxshmfence-1.3.3.tar.xz
mirror://xorg/individual/lib/libXTrap-1.0.1.tar.bz2
mirror://xorg/individual/lib/libXt-1.3.1.tar.xz
mirror://xorg/individual/lib/libXtst-1.2.5.tar.xz
mirror://xorg/individual/lib/libXv-1.0.13.tar.xz
mirror://xorg/individual/lib/libXvMC-1.0.14.tar.xz
mirror://xorg/individual/lib/libXxf86dga-1.1.6.tar.xz
mirror://xorg/individual/lib/libXxf86misc-1.0.4.tar.bz2