xrdb: 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
2025-12-13 15:35:09 +01:00
parent ac96806db1
commit 077d6f4d86
5 changed files with 62 additions and 46 deletions
+58
View File
@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchFromGitLab,
autoreconfHook,
pkg-config,
util-macros,
xorgproto,
libx11,
libxmu,
mcpp,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xrdb";
version = "1.2.2";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
group = "xorg";
owner = "app";
repo = "xrdb";
tag = "xrdb-${finalAttrs.version}";
hash = "sha256-XCi/E6tVaLYGRsMWJalCl1J8VIT4xV6KFuo+K//LQGY=";
};
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
pkg-config
util-macros
];
buildInputs = [
xorgproto
libx11
libxmu
];
# replace gcc with mcpp as preprocessor to reduce the closure size
# see https://github.com/NixOS/nixpkgs/issues/9480
configureFlags = [ "--with-cpp=${lib.getExe mcpp}" ];
passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=xrdb-(.*)" ]; };
meta = {
description = "X resource database utility";
homepage = "https://gitlab.freedesktop.org/xorg/app/xrdb";
license = with lib.licenses; [
hpndDec
mitOpenGroup
];
mainProgram = "xrdb";
maintainers = [ ];
platforms = lib.platforms.unix;
};
})
+2 -38
View File
@@ -147,6 +147,7 @@
xorg-sgml-doctools,
xprop,
xrandr,
xrdb,
xrefresh,
xset,
xsetroot,
@@ -220,6 +221,7 @@ self: with self; {
xorgproto
xprop
xrandr
xrdb
xrefresh
xset
xsetroot
@@ -2584,44 +2586,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
xrdb = callPackage (
{
stdenv,
pkg-config,
fetchurl,
libX11,
libXmu,
xorgproto,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xrdb";
version = "1.2.2";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/app/xrdb-1.2.2.tar.xz";
sha256 = "1x1ka0zbcw66a06jvsy92bvnsj9vxbvnq1hbn1az4f0v4fmzrx9i";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libX11
libXmu
xorgproto
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ ];
platforms = lib.platforms.unix;
};
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
xtrap = callPackage (
{
@@ -478,6 +478,7 @@ print OUT <<EOF;
xorg-sgml-doctools,
xprop,
xrandr,
xrdb,
xrefresh,
xset,
xsetroot,
@@ -551,6 +552,7 @@ self: with self; {
xorgproto
xprop
xrandr
xrdb
xrefresh
xset
xsetroot
-7
View File
@@ -674,13 +674,6 @@ self: super:
xpr = addMainProgram super.xpr { };
xrdb = super.xrdb.overrideAttrs (attrs: {
configureFlags = [ "--with-cpp=${mcpp}/bin/mcpp" ];
meta = attrs.meta // {
mainProgram = "xrdb";
};
});
xwd = addMainProgram super.xwd { };
}
-1
View File
@@ -8,7 +8,6 @@ mirror://xorg/individual/app/xkbevd-1.1.6.tar.xz
mirror://xorg/individual/app/xkbprint-1.0.7.tar.xz
mirror://xorg/individual/app/xload-1.2.0.tar.xz
mirror://xorg/individual/app/xpr-1.2.0.tar.xz
mirror://xorg/individual/app/xrdb-1.2.2.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