libxdamage: refactor, move to pkgs/by-name and rename from xorg.libXdamage

This commit is contained in:
quantenzitrone
2025-08-27 00:57:28 +02:00
parent d3e3c7aaf4
commit 9e7b4cc477
5 changed files with 63 additions and 46 deletions
+58
View File
@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
xorgproto,
libx11,
libxfixes,
writeScript,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libxdamage";
version = "1.1.6";
outputs = [
"out"
"dev"
];
src = fetchurl {
url = "mirror://xorg/individual/lib/libXdamage-${finalAttrs.version}.tar.xz";
hash = "sha256-UnM8H1Ji/KNfZOfVBgxvzYGogLqOHmXJYhzwcnr7XRE=";
};
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
libx11
libxfixes
];
propagatedBuildInputs = [ xorgproto ];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname libXdamage \
--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 = "X Damage Extension library";
homepage = "https://gitlab.freedesktop.org/xorg/lib/libxdamage";
license = lib.licenses.hpndSellVariant;
maintainers = [ ];
pkgConfigModules = [ "xdamage" ];
platforms = lib.platforms.unix;
};
})
+2 -38
View File
@@ -32,6 +32,7 @@
libxcomposite,
libxcursor,
libxcvt,
libxdamage,
libxdmcp,
libxext,
libxfixes,
@@ -133,6 +134,7 @@ self: with self; {
libXaw = libxaw;
libXcomposite = libxcomposite;
libXcursor = libxcursor;
libXdamage = libxdamage;
libXdmcp = libxdmcp;
libXext = libxext;
libXfixes = libxfixes;
@@ -1760,44 +1762,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
libXdamage = callPackage (
{
stdenv,
pkg-config,
fetchurl,
xorgproto,
libX11,
libXfixes,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libXdamage";
version = "1.1.6";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/lib/libXdamage-1.1.6.tar.xz";
sha256 = "04axzdx75w0wcb4na7lfpa0ai0fddw60dmg7cigs7z32a8gkqwsj";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
libX11
libXfixes
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ "xdamage" ];
platforms = lib.platforms.unix;
};
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
libXfont = callPackage (
{
@@ -63,6 +63,7 @@ $pcMap{"xcb-renderutil"} = "xcbutilrenderutil";
$pcMap{"xcb-util"} = "xcbutil";
$pcMap{"xcomposite"} = "libXcomposite";
$pcMap{"xcursor"} = "libXcursor";
$pcMap{"xdamage"} = "libXdamage";
$pcMap{"xdmcp"} = "libXdmcp";
$pcMap{"xext"} = "libXext";
$pcMap{"xfixes"} = "libXfixes";
@@ -349,6 +350,7 @@ print OUT <<EOF;
libxcomposite,
libxcursor,
libxcvt,
libxdamage,
libxdmcp,
libxext,
libxfixes,
@@ -450,6 +452,7 @@ self: with self; {
libXaw = libxaw;
libXcomposite = libxcomposite;
libXcursor = libxcursor;
libXdamage = libxdamage;
libXdmcp = libxdmcp;
libXext = libxext;
libXfixes = libxfixes;
-7
View File
@@ -204,13 +204,6 @@ self: super:
};
});
libXdamage = super.libXdamage.overrideAttrs (attrs: {
outputs = [
"out"
"dev"
];
});
libXft = super.libXft.overrideAttrs (attrs: {
outputs = [
"out"
-1
View File
@@ -126,7 +126,6 @@ mirror://xorg/individual/font/font-sun-misc-1.0.4.tar.xz
mirror://xorg/individual/font/font-winitzki-cyrillic-1.0.4.tar.xz
mirror://xorg/individual/font/font-xfree86-type1-1.0.5.tar.xz
mirror://xorg/individual/lib/libWindowsWM-1.0.1.tar.bz2
mirror://xorg/individual/lib/libXdamage-1.1.6.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