2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
meson,
|
|
|
|
ninja,
|
|
|
|
glib,
|
|
|
|
pkg-config,
|
|
|
|
udev,
|
|
|
|
libevdev,
|
|
|
|
libgudev,
|
|
|
|
python3,
|
|
|
|
valgrind,
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "libwacom";
|
2024-10-11 05:15:48 +00:00
|
|
|
version = "2.13.0";
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxwacom";
|
|
|
|
repo = "libwacom";
|
|
|
|
rev = "libwacom-${finalAttrs.version}";
|
2024-10-11 05:15:48 +00:00
|
|
|
hash = "sha256-OJQe0GdndgpvW4aJdgSKWw+u3ng1pn3FgdcA81jfmkQ=";
|
2024-09-19 14:19:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs test/check-files-in-git.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
python3
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
udev
|
|
|
|
libevdev
|
|
|
|
libgudev
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
(lib.mesonEnable "tests" finalAttrs.doCheck)
|
|
|
|
(lib.mesonOption "sysconfdir" "/etc")
|
|
|
|
];
|
|
|
|
|
|
|
|
# Tests are in the `tests` pass-through derivation because one of them is flaky, frequently causing build failures.
|
|
|
|
# See https://github.com/NixOS/nixpkgs/issues/328140
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
valgrind
|
|
|
|
(python3.withPackages (ps: [
|
|
|
|
ps.libevdev
|
|
|
|
ps.pytest
|
|
|
|
ps.pyudev
|
|
|
|
]))
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
tests = finalAttrs.finalPackage.overrideAttrs { doCheck = true; };
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
homepage = "https://linuxwacom.github.io/";
|
|
|
|
changelog = "https://github.com/linuxwacom/libwacom/blob/${finalAttrs.src.rev}/NEWS";
|
|
|
|
description = "Libraries, configuration, and diagnostic tools for Wacom tablets running under Linux";
|
|
|
|
maintainers = lib.teams.freedesktop.members;
|
|
|
|
license = lib.licenses.hpnd;
|
|
|
|
};
|
|
|
|
})
|