From a1eed9f1ff661db7d7f2092341e6eb3b67b3a182 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Wed, 19 Apr 2023 02:34:07 +0200 Subject: [PATCH 1/3] zbar: 0.23.90 -> 0.23.92 --- pkgs/tools/graphics/zbar/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/graphics/zbar/default.nix b/pkgs/tools/graphics/zbar/default.nix index 3542c06ac09b..d5dd766826c6 100644 --- a/pkgs/tools/graphics/zbar/default.nix +++ b/pkgs/tools/graphics/zbar/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { pname = "zbar"; - version = "0.23.90"; + version = "0.23.92"; outputs = [ "out" "lib" "dev" "doc" "man" ]; @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { owner = "mchehab"; repo = "zbar"; rev = version; - sha256 = "sha256-FvV7TMc4JbOiRjWLka0IhtpGGqGm5fis7h870OmJw2U="; + sha256 = "sha256-VhVrngAX7pXZp+szqv95R6RGAJojp3svdbaRKigGb0w="; }; nativeBuildInputs = [ From 8ae1865b52bd77162dba6fa32d48cdade697d0fd Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Wed, 19 Apr 2023 03:15:08 +0200 Subject: [PATCH 2/3] 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; From fdd4f77e5c1e604b831a50df60945052bb720163 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Wed, 26 Apr 2023 14:35:55 +0200 Subject: [PATCH 3/3] zbar: enable checkPhase on Darwin --- pkgs/tools/graphics/zbar/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/graphics/zbar/default.nix b/pkgs/tools/graphics/zbar/default.nix index 540baa168fcd..31fd9742d236 100644 --- a/pkgs/tools/graphics/zbar/default.nix +++ b/pkgs/tools/graphics/zbar/default.nix @@ -26,6 +26,7 @@ , Foundation , bash , python3 +, argp-standalone }: stdenv.mkDerivation rec { @@ -73,6 +74,10 @@ stdenv.mkDerivation rec { python3 ]; + checkInputs = lib.optionals stdenv.isDarwin [ + argp-standalone + ]; + # 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. @@ -97,7 +102,11 @@ stdenv.mkDerivation rec { "--without-qt" ]); - doCheck = !stdenv.isDarwin; + doCheck = true; + + preCheck = lib.optionalString stdenv.isDarwin '' + export NIX_LDFLAGS="$NIX_LDFLAGS -largp" + ''; dontWrapQtApps = true; dontWrapGApps = true;