From b9a585ebd33104f5eb4cf186a8b6d81e1430cc9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 21 Feb 2023 17:13:30 -0800 Subject: [PATCH] libwacom: run tests --- pkgs/development/libraries/libwacom/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libwacom/default.nix b/pkgs/development/libraries/libwacom/default.nix index dbc5008a1a49..725f8c38269b 100644 --- a/pkgs/development/libraries/libwacom/default.nix +++ b/pkgs/development/libraries/libwacom/default.nix @@ -8,6 +8,7 @@ , udev , libgudev , python3 +, valgrind }: stdenv.mkDerivation rec { @@ -23,6 +24,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-9zqW6zPrFcxv/yAAtFgdVavKVMXeDBoMP3E/XriUcT0="; }; + postPatch = '' + patchShebangs test/check-files-in-git.sh + ''; + nativeBuildInputs = [ pkg-config meson @@ -36,10 +41,20 @@ stdenv.mkDerivation rec { libgudev ]; + doCheck = stdenv.hostPlatform == stdenv.buildPlatform; + mesonFlags = [ - "-Dtests=disabled" + "-Dtests=${if doCheck then "enabled" else "disabled"}" ]; + nativeCheckInputs = [ + valgrind + ] ++ (with python3.pkgs; [ + libevdev + pytest + pyudev + ]); + meta = with lib; { platforms = platforms.linux; homepage = "https://linuxwacom.github.io/";