[bug#74517,v4,05/10] gnu: Add zbar-minimal.

Message ID 20250107223336.4083-5-ngraves@ngraves.fr
State New
Headers
Series [bug#74517,v4,01/10] gnu: Add v4l-utils-minimal. |

Commit Message

Nicolas Graves Jan. 7, 2025, 10:33 p.m. UTC
  * gnu/packages/aidc.scm (zbar-minimal): New variable.
---
 gnu/packages/aidc.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
  

Comments

Liliana Marie Prikler Jan. 8, 2025, 5:13 a.m. UTC | #1
Am Dienstag, dem 07.01.2025 um 23:33 +0100 schrieb Nicolas Graves:
> * gnu/packages/aidc.scm (zbar-minimal): New variable.
> ---
>  gnu/packages/aidc.scm | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/gnu/packages/aidc.scm b/gnu/packages/aidc.scm
> index cf18801aec..e4ebf72f41 100644
> --- a/gnu/packages/aidc.scm
> +++ b/gnu/packages/aidc.scm
> @@ -231,6 +231,20 @@ (define-public zbar
>      (home-page "https://github.com/mchehab/zbar")
>      (license license:lgpl2.1+)))
>  
> +(define-public zbar-minimal
> +  (package/inherit zbar
> +    (name "zbar-minimal")
> +    (build-system gnu-build-system)
> +    (arguments
> +     (substitute-keyword-arguments (package-arguments zbar)
> +       ((#:configure-flags flags)
> +        #~(cons* "--with-gtk=no" (delete "--with-gtk=auto"
> #$flags)))
> +       ((#:disallowed-references _)
> +        (list qtbase gtk+))))
I think this might not have an effect if disallowed-references aren't
provided in zbar (which IIUC they're not).  You can add '() as a third
parameter to always have this code live.
> +    (propagated-inputs
> +     (modify-inputs (package-propagated-inputs zbar)
> +       (delete "gtk+")))))
> +
>  (define-public qrcodegen-cpp
>    (package
>      (name "qrcodegen-cpp")
Cheers
  

Patch

diff --git a/gnu/packages/aidc.scm b/gnu/packages/aidc.scm
index cf18801aec..e4ebf72f41 100644
--- a/gnu/packages/aidc.scm
+++ b/gnu/packages/aidc.scm
@@ -231,6 +231,20 @@  (define-public zbar
     (home-page "https://github.com/mchehab/zbar")
     (license license:lgpl2.1+)))
 
+(define-public zbar-minimal
+  (package/inherit zbar
+    (name "zbar-minimal")
+    (build-system gnu-build-system)
+    (arguments
+     (substitute-keyword-arguments (package-arguments zbar)
+       ((#:configure-flags flags)
+        #~(cons* "--with-gtk=no" (delete "--with-gtk=auto" #$flags)))
+       ((#:disallowed-references _)
+        (list qtbase gtk+))))
+    (propagated-inputs
+     (modify-inputs (package-propagated-inputs zbar)
+       (delete "gtk+")))))
+
 (define-public qrcodegen-cpp
   (package
     (name "qrcodegen-cpp")