xf86-input-keyboard: refactor, move to pkgs/by-name & rename from xorg.xf86inputkeyboard

relevant changes:
- switch to GitLab source instead of release tarball

the package is strictly non-linux only so i tested the build of
pkgsCross.x86_64-freebsd on x86_64-linux
This commit is contained in:
quantenzitrone
2026-01-10 08:17:02 +01:00
parent 73b7136990
commit 3f073a759a
5 changed files with 60 additions and 43 deletions
@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchFromGitLab,
autoreconfHook,
pkg-config,
util-macros,
xorgproto,
xorg-server,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xf86-input-keyboard";
version = "2.1.0";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
group = "xorg";
owner = "driver";
repo = "xf86-input-keyboard";
tag = "xf86-input-keyboard-${finalAttrs.version}";
hash = "sha256-M0D6oTAhnADI7pgWKt4ueHGbdMVDTVOXy3w07DGcCSg=";
};
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
pkg-config
util-macros
];
buildInputs = [
xorgproto
xorg-server
];
passthru = {
updateScript = nix-update-script { extraArgs = [ "--version-regex=xf86-input-keyboard-(.*)" ]; };
};
meta = {
description = "Keyboard input driver for non-Linux platforms for the Xorg X server";
homepage = "https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard";
license = [
lib.licenses.x11
lib.licenses.hpndSellVariant
]
# only solaris part is MIT
++ lib.optional stdenv.hostPlatform.isSunOS lib.licenses.mit;
maintainers = [ ];
# platforms according to the readme:
# BSD, GNU Hurd, illumos & Solaris
platforms = with lib.platforms; freebsd ++ netbsd ++ openbsd ++ illumos;
};
})
+2 -36
View File
@@ -130,6 +130,7 @@
xeyes,
xf86-input-evdev,
xf86-input-joystick,
xf86-input-keyboard,
xf86-input-mouse,
xf86-input-synaptics,
xf86-input-vmmouse,
@@ -350,6 +351,7 @@ self: with self; {
xcursorthemes = xcursor-themes;
xf86inputevdev = xf86-input-evdev;
xf86inputjoystick = xf86-input-joystick;
xf86inputkeyboard = xf86-input-keyboard;
xf86inputmouse = xf86-input-mouse;
xf86inputsynaptics = xf86-input-synaptics;
xf86inputvmmouse = xf86-input-vmmouse;
@@ -360,42 +362,6 @@ self: with self; {
xorgserver = xorg-server;
xorgsgmldoctools = xorg-sgml-doctools;
# THIS IS A GENERATED FILE. DO NOT EDIT!
xf86inputkeyboard = callPackage (
{
stdenv,
pkg-config,
fetchurl,
xorgproto,
xorgserver,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xf86-input-keyboard";
version = "2.1.0";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/driver/xf86-input-keyboard-2.1.0.tar.xz";
sha256 = "0mvwxrnkq0lzhjr894p420zxffdn34nc2scinmp7qd1hikr51kkp";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
xorgserver
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ ];
platforms = lib.platforms.unix;
};
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
xf86inputlibinput = callPackage (
{
@@ -462,6 +462,7 @@ print OUT <<EOF;
xeyes,
xf86-input-evdev,
xf86-input-joystick,
xf86-input-keyboard,
xf86-input-mouse,
xf86-input-synaptics,
xf86-input-vmmouse,
@@ -682,6 +683,7 @@ self: with self; {
xcursorthemes = xcursor-themes;
xf86inputevdev = xf86-input-evdev;
xf86inputjoystick = xf86-input-joystick;
xf86inputkeyboard = xf86-input-keyboard;
xf86inputmouse = xf86-input-mouse;
xf86inputsynaptics = xf86-input-synaptics;
xf86inputvmmouse = xf86-input-vmmouse;
-6
View File
@@ -71,12 +71,6 @@ self: super:
{
mkfontdir = xorg.mkfontscale;
xf86inputkeyboard = super.xf86inputkeyboard.overrideAttrs (attrs: {
meta = attrs.meta // {
platforms = lib.platforms.freebsd ++ lib.platforms.netbsd ++ lib.platforms.openbsd;
};
});
xf86inputlibinput = super.xf86inputlibinput.overrideAttrs (attrs: {
outputs = [
"out"
-1
View File
@@ -1,4 +1,3 @@
mirror://xorg/individual/driver/xf86-input-keyboard-2.1.0.tar.xz
mirror://xorg/individual/driver/xf86-input-libinput-1.5.0.tar.xz
mirror://xorg/individual/driver/xf86-video-amdgpu-23.0.0.tar.xz
mirror://xorg/individual/driver/xf86-video-apm-1.3.0.tar.bz2