From 8ae1865b52bd77162dba6fa32d48cdade697d0fd Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Wed, 19 Apr 2023 03:15:08 +0200 Subject: [PATCH] zbar: make checkPhase work, and enable it --- pkgs/tools/graphics/zbar/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkgs/tools/graphics/zbar/default.nix b/pkgs/tools/graphics/zbar/default.nix index d5dd766826c6..540baa168fcd 100644 --- a/pkgs/tools/graphics/zbar/default.nix +++ b/pkgs/tools/graphics/zbar/default.nix @@ -24,6 +24,8 @@ , libintl , libiconv , Foundation +, bash +, python3 }: stdenv.mkDerivation rec { @@ -66,6 +68,18 @@ stdenv.mkDerivation rec { qtx11extras ]; + nativeCheckInputs = [ + bash + python3 + ]; + + # Note: postConfigure instead of postPatch in order to include some + # autoconf-generated files. The template files for the autogen'd scripts are + # not chmod +x, so patchShebangs misses them. + postConfigure = '' + patchShebangs test + ''; + # Disable assertions which include -dev QtBase file paths. env.NIX_CFLAGS_COMPILE = "-DQT_NO_DEBUG"; @@ -83,6 +97,8 @@ stdenv.mkDerivation rec { "--without-qt" ]); + doCheck = !stdenv.isDarwin; + dontWrapQtApps = true; dontWrapGApps = true;