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

relevant changes:
- use gitlab source instead of release tarball
This commit is contained in:
quantenzitrone
2025-12-13 15:20:40 +01:00
parent bbcc034521
commit 6bd877d2fd
5 changed files with 90 additions and 80 deletions
+86
View File
@@ -0,0 +1,86 @@
{
lib,
stdenv,
fetchFromGitLab,
pkg-config,
util-macros,
autoreconfHook,
wrapWithXFileSearchPathHook,
libx11,
libxau,
libxaw,
libxcrypt,
libxdmcp,
libxext,
libxft,
libxinerama,
libxmu,
libxpm,
libxrender,
libxt,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xdm";
version = "1.1.17";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "xorg";
repo = "app/xdm";
tag = "xdm-${finalAttrs.version}";
hash = "sha256-PhMctvL+Vp9uNmTtowMHzkoekieVCgNZCfUZ1XpjpyY=";
};
strictDeps = true;
nativeBuildInputs = [
pkg-config
util-macros
autoreconfHook
wrapWithXFileSearchPathHook
];
buildInputs = [
libx11
libxau
libxaw
libxcrypt
libxdmcp
libxext
libxft
libxinerama
libxmu
libxpm
libxrender
libxt
];
configureFlags = [
"ac_cv_path_RAWCPP=${stdenv.cc.targetPrefix}cpp"
]
# checking for /dev/urandom... configure: error: cannot check for file existence when cross compiling
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"ac_cv_file__dev_urandom=true"
"ac_cv_file__dev_random=true"
];
installFlags = [ "appdefaultdir=$(out)/share/X11/app-defaults" ];
passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=xdm-(.*)" ]; };
meta = {
description = "X Display Manager with support for XDMCP, host chooser";
homepage = "https://gitlab.freedesktop.org/xorg/app/xdm";
license = with lib.licenses; [
mit
mitOpenGroup
x11
bsd3ClauseTso
bsd2
];
mainProgram = "xdm";
maintainers = [ ];
platforms = lib.platforms.unix;
};
})
+2 -60
View File
@@ -121,6 +121,7 @@
xconsole,
xcursorgen,
xcursor-themes,
xdm,
xdriinfo,
xev,
xeyes,
@@ -196,6 +197,7 @@ self: with self; {
xcompmgr
xconsole
xcursorgen
xdm
xdriinfo
xev
xeyes
@@ -406,66 +408,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
xdm = callPackage (
{
stdenv,
pkg-config,
fetchurl,
libX11,
libXau,
libXaw,
libXdmcp,
libXext,
libXft,
libXinerama,
libXmu,
libXpm,
xorgproto,
libXrender,
libXt,
wrapWithXFileSearchPathHook,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xdm";
version = "1.1.17";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/app/xdm-1.1.17.tar.xz";
sha256 = "0spbxjxxrnfxf8gqncd7bry3z7dvr74ba987cx9iq0qsj7qax54l";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [
pkg-config
wrapWithXFileSearchPathHook
];
buildInputs = [
libX11
libXau
libXaw
libXdmcp
libXext
libXft
libXinerama
libXmu
libXpm
xorgproto
libXrender
libXt
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ ];
platforms = lib.platforms.unix;
};
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
xdpyinfo = callPackage (
{
@@ -452,6 +452,7 @@ print OUT <<EOF;
xconsole,
xcursorgen,
xcursor-themes,
xdm,
xdriinfo,
xev,
xeyes,
@@ -527,6 +528,7 @@ self: with self; {
xcompmgr
xconsole
xcursorgen
xdm
xdriinfo
xev
xeyes
-19
View File
@@ -128,25 +128,6 @@ self: super:
};
});
xdm = super.xdm.overrideAttrs (attrs: {
buildInputs = attrs.buildInputs ++ [ libxcrypt ];
configureFlags =
attrs.configureFlags or [ ]
++ [
"ac_cv_path_RAWCPP=${stdenv.cc.targetPrefix}cpp"
]
++
lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform)
# checking for /dev/urandom... configure: error: cannot check for file existence when cross compiling
[
"ac_cv_file__dev_urandom=true"
"ac_cv_file__dev_random=true"
];
meta = attrs.meta // {
mainProgram = "xdm";
};
});
xf86inputevdev = super.xf86inputevdev.overrideAttrs (attrs: {
outputs = [
"out"
-1
View File
@@ -1,5 +1,4 @@
mirror://xorg/individual/app/xclock-1.1.1.tar.xz
mirror://xorg/individual/app/xdm-1.1.17.tar.xz
mirror://xorg/individual/app/xdpyinfo-1.3.4.tar.xz
mirror://xorg/individual/app/xfd-1.1.4.tar.xz
mirror://xorg/individual/app/xfs-1.2.2.tar.xz