xconsole: refactor and move to pkgs/by-name from xorg namespace

This commit is contained in:
quantenzitrone
2025-08-23 00:45:44 +02:00
parent 8e04e5ddf4
commit 4cd91610a4
5 changed files with 63 additions and 48 deletions

View File

@@ -0,0 +1,59 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
wrapWithXFileSearchPathHook,
xorgproto,
libx11,
libxaw,
libxmu,
libxt,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xconsole";
version = "1.1.0";
src = fetchurl {
url = "mirror://xorg/individual/app/xconsole-${finalAttrs.version}.tar.xz";
hash = "sha256-DHdZeMrN2nbfyLWpcULxRaF30mIg3TB4ZtndYuc5EYk=";
};
strictDeps = true;
nativeBuildInputs = [
pkg-config
wrapWithXFileSearchPathHook
];
buildInputs = [
xorgproto
libx11
libxaw
libxmu
libxt
];
installFlags = [ "appdefaultdir=$(out)/share/X11/app-defaults" ];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname ${finalAttrs.pname} \
--url https://xorg.freedesktop.org/releases/individual/app/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "Displays /dev/console messages in an X window";
homepage = "https://gitlab.freedesktop.org/xorg/app/xconsole";
license = lib.licenses.mitOpenGroup;
mainProgram = "xconsole";
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -55,6 +55,7 @@
xbitmaps,
xcb-proto,
xcmsdb,
xconsole,
xcursorgen,
xcursor-themes,
xdriinfo,
@@ -99,6 +100,7 @@ self: with self; {
transset
xbitmaps
xcmsdb
xconsole
xcursorgen
xdriinfo
xev
@@ -2830,52 +2832,6 @@ self: with self; {
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
xconsole = callPackage (
{
stdenv,
pkg-config,
fetchurl,
libX11,
libXaw,
libXmu,
xorgproto,
libXt,
wrapWithXFileSearchPathHook,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xconsole";
version = "1.1.0";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/app/xconsole-1.1.0.tar.xz";
sha256 = "128i77kn5pfrcrw31p90cb97g8a5y5173admr3gpdnndr9w5jxqc";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [
pkg-config
wrapWithXFileSearchPathHook
];
buildInputs = [
libX11
libXaw
libXmu
xorgproto
libXt
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ ];
platforms = lib.platforms.unix;
};
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
xdm = callPackage (
{

View File

@@ -371,6 +371,7 @@ print OUT <<EOF;
xbitmaps,
xcb-proto,
xcmsdb,
xconsole,
xcursorgen,
xcursor-themes,
xdriinfo,
@@ -415,6 +416,7 @@ self: with self; {
transset
xbitmaps
xcmsdb
xconsole
xcursorgen
xdriinfo
xev

View File

@@ -877,7 +877,6 @@ self: super:
xbacklight = addMainProgram super.xbacklight { };
xclock = addMainProgram super.xclock { };
xcompmgr = addMainProgram super.xcompmgr { };
xconsole = addMainProgram super.xconsole { };
xinit =
(super.xinit.override {

View File

@@ -15,7 +15,6 @@ mirror://xorg/individual/app/xbacklight-1.2.4.tar.xz
mirror://xorg/individual/app/xcalc-1.1.2.tar.xz
mirror://xorg/individual/app/xclock-1.1.1.tar.xz
mirror://xorg/individual/app/xcompmgr-1.1.10.tar.xz
mirror://xorg/individual/app/xconsole-1.1.0.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/xeyes-1.3.0.tar.xz