e7ec2969af
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
77 lines
1.4 KiB
Nix
77 lines
1.4 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, meson
|
|
, ninja
|
|
, glib
|
|
, pkg-config
|
|
, udev
|
|
, libevdev
|
|
, libgudev
|
|
, libxml2
|
|
, python3
|
|
, valgrind
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libwacom";
|
|
version = "2.9.0";
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "linuxwacom";
|
|
repo = "libwacom";
|
|
rev = "libwacom-${version}";
|
|
hash = "sha256-oM3dd22hQaAXdNoO2Q2JvO2lJCkmfw8f0NWxYcVT3lA=";
|
|
};
|
|
|
|
postPatch = ''
|
|
patchShebangs test/check-files-in-git.sh
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
meson
|
|
ninja
|
|
python3
|
|
];
|
|
|
|
buildInputs = [
|
|
glib
|
|
udev
|
|
libevdev
|
|
libgudev
|
|
];
|
|
|
|
doCheck = stdenv.hostPlatform == stdenv.buildPlatform
|
|
&& lib.meta.availableOn stdenv.hostPlatform valgrind
|
|
&& !stdenv.hostPlatform.isPower # one test times out
|
|
;
|
|
|
|
mesonFlags = [
|
|
"-Dtests=${if doCheck then "enabled" else "disabled"}"
|
|
];
|
|
|
|
checkInputs = [
|
|
libxml2
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
valgrind
|
|
(python3.withPackages (ps: with ps; [
|
|
ps.libevdev
|
|
pytest
|
|
pyudev
|
|
]))
|
|
];
|
|
|
|
meta = with lib; {
|
|
platforms = platforms.linux;
|
|
homepage = "https://linuxwacom.github.io/";
|
|
changelog = "https://github.com/linuxwacom/libwacom/blob/${src.rev}/NEWS";
|
|
description = "Libraries, configuration, and diagnostic tools for Wacom tablets running under Linux";
|
|
maintainers = teams.freedesktop.members;
|
|
license = licenses.hpnd;
|
|
};
|
|
}
|