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

relevant changes:
- switch to GitLab source instead of release tarball
This commit is contained in:
quantenzitrone
2026-01-10 08:17:01 +01:00
parent dbeb49919e
commit 73b7136990
5 changed files with 61 additions and 46 deletions
@@ -0,0 +1,57 @@
{
lib,
stdenv,
fetchFromGitLab,
autoreconfHook,
pkg-config,
util-macros,
xorgproto,
xorg-server,
nix-update-script,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xf86-input-joystick";
version = "1.6.4";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
group = "xorg";
owner = "driver";
repo = "xf86-input-joystick";
tag = "xf86-input-joystick-${finalAttrs.version}";
hash = "sha256-JxSnhWx5V3/pdlu3mwRNrgicdfaUK5nIwBK3reqchQs=";
};
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
pkg-config
util-macros
xorg-server # xorg-server defines autoconf macros that we need
];
buildInputs = [
util-macros # unused dependency but the build fails if pkg-config can't find it
xorgproto
xorg-server
];
configureFlags = [ "--with-sdkdir=${placeholder "out"}/include/xorg" ];
passthru = {
updateScript = nix-update-script { extraArgs = [ "--version-regex=xf86-input-joystick-(.*)" ]; };
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
meta = {
description = "Joystick input driver for the Xorg X server";
homepage = "https://gitlab.freedesktop.org/xorg/driver/xf86-input-joystick";
license = lib.licenses.hpndSellVariant;
maintainers = [ ];
pkgConfigModules = [ "xorg-joystick" ];
platforms = lib.platforms.unix;
broken = stdenv.hostPlatform.isDarwin; # never worked: https://hydra.nixos.org/job/nixpkgs/trunk/xorg.xf86inputjoystick.x86_64-darwin
};
})
+2 -36
View File
@@ -129,6 +129,7 @@
xev,
xeyes,
xf86-input-evdev,
xf86-input-joystick,
xf86-input-mouse,
xf86-input-synaptics,
xf86-input-vmmouse,
@@ -348,6 +349,7 @@ self: with self; {
xcbutilwm = libxcb-wm;
xcursorthemes = xcursor-themes;
xf86inputevdev = xf86-input-evdev;
xf86inputjoystick = xf86-input-joystick;
xf86inputmouse = xf86-input-mouse;
xf86inputsynaptics = xf86-input-synaptics;
xf86inputvmmouse = xf86-input-vmmouse;
@@ -358,42 +360,6 @@ self: with self; {
xorgserver = xorg-server;
xorgsgmldoctools = xorg-sgml-doctools;
# THIS IS A GENERATED FILE. DO NOT EDIT!
xf86inputjoystick = callPackage (
{
stdenv,
pkg-config,
fetchurl,
xorgproto,
xorgserver,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xf86-input-joystick";
version = "1.6.4";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/driver/xf86-input-joystick-1.6.4.tar.xz";
sha256 = "1lnc6cvrg81chb2hj3jphgx7crr4ab8wn60mn8f9nsdwza2w8plh";
};
hardeningDisable = [
"bindnow"
"relro"
];
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
xorgserver
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ "xorg-joystick" ];
platforms = lib.platforms.unix;
};
})
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
xf86inputkeyboard = callPackage (
{
@@ -461,6 +461,7 @@ print OUT <<EOF;
xev,
xeyes,
xf86-input-evdev,
xf86-input-joystick,
xf86-input-mouse,
xf86-input-synaptics,
xf86-input-vmmouse,
@@ -680,6 +681,7 @@ self: with self; {
xcbutilwm = libxcb-wm;
xcursorthemes = xcursor-themes;
xf86inputevdev = xf86-input-evdev;
xf86inputjoystick = xf86-input-joystick;
xf86inputmouse = xf86-input-mouse;
xf86inputsynaptics = xf86-input-synaptics;
xf86inputvmmouse = xf86-input-vmmouse;
-9
View File
@@ -71,15 +71,6 @@ self: super:
{
mkfontdir = xorg.mkfontscale;
xf86inputjoystick = super.xf86inputjoystick.overrideAttrs (attrs: {
configureFlags = [
"--with-sdkdir=${placeholder "out"}/include/xorg"
];
meta = attrs.meta // {
broken = isDarwin; # never worked: https://hydra.nixos.org/job/nixpkgs/trunk/xorg.xf86inputjoystick.x86_64-darwin
};
});
xf86inputkeyboard = super.xf86inputkeyboard.overrideAttrs (attrs: {
meta = attrs.meta // {
platforms = lib.platforms.freebsd ++ lib.platforms.netbsd ++ lib.platforms.openbsd;
-1
View File
@@ -1,4 +1,3 @@
mirror://xorg/individual/driver/xf86-input-joystick-1.6.4.tar.xz
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