Files
nixpkgs/pkgs/by-name/li/libwacom/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

92 lines
1.8 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
meson,
ninja,
glib,
pkg-config,
udev,
udevCheckHook,
libevdev,
libgudev,
python3,
valgrind,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libwacom";
version = "2.16.1";
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "linuxwacom";
repo = "libwacom";
rev = "libwacom-${finalAttrs.version}";
hash = "sha256-YP6z+2HyIRmIAJIdJMbVTQA0rf3EXBZvlCdM4jrmHXM=";
};
postPatch = ''
patchShebangs test/check-files-in-git.sh
'';
nativeBuildInputs = [
pkg-config
meson
ninja
python3
udevCheckHook
];
buildInputs = [
glib
udev
libevdev
libgudev
(python3.withPackages (pp: [
pp.libevdev
pp.pyudev
]))
];
mesonFlags = [
(lib.mesonEnable "tests" finalAttrs.finalPackage.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;
doInstallCheck = true;
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";
teams = [ lib.teams.freedesktop ];
license = lib.licenses.hpnd;
badPlatforms = [
# Mandatory shared library.
lib.systems.inspect.platformPatterns.isStatic
];
};
})