xwd: refactor & move to pkgs/by-name from xorg namespace

relevant changes:
- switch to GitLab source instead of release tarball
This commit is contained in:
quantenzitrone
2026-01-10 02:27:05 +01:00
parent 8d84a60eb7
commit 1fbcad65f1
5 changed files with 57 additions and 52 deletions
+53
View File
@@ -0,0 +1,53 @@
{
lib,
stdenv,
fetchFromGitLab,
autoreconfHook,
pkg-config,
util-macros,
libxkbfile,
libx11,
xorgproto,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xwd";
version = "1.0.9";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
group = "xorg";
owner = "app";
repo = "xwd";
tag = "xwd-${finalAttrs.version}";
hash = "sha256-cEKm0c50qwWzGSkH1sdovNfN3dW1hmnaEDwuJKwxGdo=";
};
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
pkg-config
util-macros
];
buildInputs = [
libxkbfile
libx11
xorgproto
];
passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=xwd-(.*)" ]; };
meta = {
description = "Utility to dump an image of an X window in XWD format";
homepage = "https://gitlab.freedesktop.org/xorg/app/xwd";
license = with lib.licenses; [
mitOpenGroup
hpndSellVariant
];
mainProgram = "xwd";
maintainers = [ ];
platforms = lib.platforms.unix;
};
})
+2 -38
View File
@@ -166,6 +166,7 @@
xtrans,
xvfb,
xvinfo,
xwd,
xwininfo,
xwud,
}:
@@ -250,6 +251,7 @@ self: with self; {
xtrans
xvfb
xvinfo
xwd
xwininfo
xwud
;
@@ -2204,42 +2206,4 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
xwd = callPackage (
{
stdenv,
pkg-config,
fetchurl,
libxkbfile,
libX11,
xorgproto,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xwd";
version = "1.0.9";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/app/xwd-1.0.9.tar.xz";
sha256 = "0gxx3y9zlh13jgwkayxljm6i58ng8jc1xzqv2g8s7d3yjj21n4nw";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libxkbfile
libX11
xorgproto
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ ];
platforms = lib.platforms.unix;
};
})
) { };
}
@@ -498,6 +498,7 @@ print OUT <<EOF;
xtrans,
xvfb,
xvinfo,
xwd,
xwininfo,
xwud,
}:
@@ -582,6 +583,7 @@ self: with self; {
xtrans
xvfb
xvinfo
xwd
xwininfo
xwud
;
-13
View File
@@ -59,17 +59,6 @@
let
inherit (stdenv.hostPlatform) isDarwin;
addMainProgram =
pkg:
{
mainProgram ? pkg.pname,
}:
pkg.overrideAttrs (attrs: {
meta = attrs.meta // {
inherit mainProgram;
};
});
brokenOnDarwin =
pkg:
pkg.overrideAttrs (attrs: {
@@ -384,8 +373,6 @@ self: super:
})
];
});
xwd = addMainProgram super.xwd { };
}
# deprecate some packages
-1
View File
@@ -1,6 +1,5 @@
mirror://xorg/individual/app/xkbcomp-1.5.0.tar.xz
mirror://xorg/individual/app/xtrap-1.0.3.tar.bz2
mirror://xorg/individual/app/xwd-1.0.9.tar.xz
mirror://xorg/individual/driver/xf86-input-evdev-2.11.0.tar.xz
mirror://xorg/individual/driver/xf86-input-joystick-1.6.4.tar.xz
mirror://xorg/individual/driver/xf86-input-keyboard-2.1.0.tar.xz