2021-09-26 12:46:18 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, glib
|
|
|
|
, pkg-config
|
|
|
|
, udev
|
2024-01-13 08:15:51 +00:00
|
|
|
, libevdev
|
2021-09-26 12:46:18 +00:00
|
|
|
, libgudev
|
2024-01-13 08:15:51 +00:00
|
|
|
, libxml2
|
2021-09-26 12:46:18 +00:00
|
|
|
, python3
|
2023-03-15 16:39:30 +00:00
|
|
|
, valgrind
|
2021-09-26 12:46:18 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libwacom";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.11.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxwacom";
|
|
|
|
repo = "libwacom";
|
|
|
|
rev = "libwacom-${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-TQOe954Zos3VpAG5M/O5je9dr8d4gOXIwy4xl3o+e1g=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs test/check-files-in-git.sh
|
|
|
|
'';
|
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
python3
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
udev
|
2024-01-13 08:15:51 +00:00
|
|
|
libevdev
|
2021-09-26 12:46:18 +00:00
|
|
|
libgudev
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
doCheck = stdenv.hostPlatform == stdenv.buildPlatform
|
|
|
|
&& lib.meta.availableOn stdenv.hostPlatform valgrind
|
|
|
|
&& !stdenv.hostPlatform.isPower # one test times out
|
|
|
|
;
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
mesonFlags = [
|
2023-03-15 16:39:30 +00:00
|
|
|
"-Dtests=${if doCheck then "enabled" else "disabled"}"
|
2021-09-26 12:46:18 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
checkInputs = [
|
|
|
|
libxml2
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
valgrind
|
2024-01-13 08:15:51 +00:00
|
|
|
(python3.withPackages (ps: with ps; [
|
|
|
|
ps.libevdev
|
|
|
|
pytest
|
|
|
|
pyudev
|
|
|
|
]))
|
|
|
|
];
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
homepage = "https://linuxwacom.github.io/";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/linuxwacom/libwacom/blob/${src.rev}/NEWS";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Libraries, configuration, and diagnostic tools for Wacom tablets running under Linux";
|
|
|
|
maintainers = teams.freedesktop.members;
|
2024-01-13 08:15:51 +00:00
|
|
|
license = licenses.hpnd;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|