python312Packages.llama-index: 0.12.9 -> 0.12.9.post1 (#371957)
[NixPkgs.git] / pkgs / by-name / li / libwacom / package.nix
bloba07feef39bb72a0970c792dc860149d5f26c3217
2   stdenv,
3   lib,
4   fetchFromGitHub,
5   meson,
6   ninja,
7   glib,
8   pkg-config,
9   udev,
10   libevdev,
11   libgudev,
12   python3,
13   valgrind,
16 stdenv.mkDerivation (finalAttrs: {
17   pname = "libwacom";
18   version = "2.14.0";
20   outputs = [
21     "out"
22     "dev"
23   ];
25   src = fetchFromGitHub {
26     owner = "linuxwacom";
27     repo = "libwacom";
28     rev = "libwacom-${finalAttrs.version}";
29     hash = "sha256-tJwLcHXXg4tFk7qKQyt+6dcDo8Qykqjn13MfXMoGvKc=";
30   };
32   postPatch = ''
33     patchShebangs test/check-files-in-git.sh
34   '';
36   nativeBuildInputs = [
37     pkg-config
38     meson
39     ninja
40     python3
41   ];
43   buildInputs = [
44     glib
45     udev
46     libevdev
47     libgudev
48   ];
50   mesonFlags = [
51     (lib.mesonEnable "tests" finalAttrs.doCheck)
52     (lib.mesonOption "sysconfdir" "/etc")
53   ];
55   # Tests are in the `tests` pass-through derivation because one of them is flaky, frequently causing build failures.
56   # See https://github.com/NixOS/nixpkgs/issues/328140
57   doCheck = false;
59   nativeCheckInputs = [
60     valgrind
61     (python3.withPackages (ps: [
62       ps.libevdev
63       ps.pytest
64       ps.pyudev
65     ]))
66   ];
68   passthru = {
69     tests = finalAttrs.finalPackage.overrideAttrs { doCheck = true; };
70   };
72   meta = {
73     platforms = lib.platforms.linux;
74     homepage = "https://linuxwacom.github.io/";
75     changelog = "https://github.com/linuxwacom/libwacom/blob/${finalAttrs.src.rev}/NEWS";
76     description = "Libraries, configuration, and diagnostic tools for Wacom tablets running under Linux";
77     maintainers = lib.teams.freedesktop.members;
78     license = lib.licenses.hpnd;
79   };