Subject: [bug#71897] [PATCH v8 3/8] gnu: Add cppgir.

From: Maxim Cournoyer <[email-masked]>
Date: Sun, 22 Sep 2024 12:04:08 +0900

Hi,

dan <[email-masked]> writes:

> * gnu/packages/glib.scm (cppgir): New variable.
>
> Change-Id: Ic4510be6d05b7b3977aa457c6a7fec382c1d3a88
> ---
>  gnu/packages/glib.scm | 31 ++++++++++++++++++++++++++++++-
>  1 file changed, 30 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
> index d6275ea63e..f695d065b3 100644
> --- a/gnu/packages/glib.scm
> +++ b/gnu/packages/glib.scm
> @@ -1,5 +1,5 @@
>  ;;; GNU Guix --- Functional package management for GNU
> -;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2021 Ludovic Courtès <[email-masked]>
> +;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2021, 2024 Ludovic Courtès <[email-masked]>

Is this a mistake?  Else I'd expect to see the 'Co-authored-by:' git
trailer at the bottom of the commit message.

>  ;;; Copyright © 2013, 2015 Andreas Enge <[email-masked]>
>  ;;; Copyright © 2013 Nikita Karetnikov <[email-masked]>
>  ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2021 Mark H Weaver <[email-masked]>
> @@ -21,6 +21,7 @@
>  ;;; Copyright © 2023 Saku Laesvuori <[email-masked]>
>  ;;; Copyright © 2024 Zheng Junjie <[email-masked]>
>  ;;; Copyright © 2024 Remco van 't Veer <[email-masked]>
> +;;; Copyright © 2024 dan <[email-masked]>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -72,6 +73,7 @@ (define-module (gnu packages glib)
>    #:use-module (gnu packages perl-check)
>    #:use-module (gnu packages popt)
>    #:use-module (gnu packages pkg-config)
> +  #:use-module (gnu packages pretty-print)
>    #:use-module (gnu packages python)
>    #:use-module (gnu packages python-xyz)
>    #:use-module (gnu packages sqlite)
> @@ -1592,3 +1594,30 @@ (define-public libdex
>  Dex also provides Fibers which allow writing synchronous looking code in C
>  that uses asynchronous and future-based APIs.")
>      (license license:lgpl2.1+)))
> +
> +(define-public cppgir
> +  (package
> +    (name "cppgir")
> +    (version "2.0")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri
> +        (git-reference
> +         (url "https://gitlab.com/mnauw/cppgir")
> +         (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "0cj4myqzb28hgb7zlxlba9y8n4ysxkvv2y9wy6f7ps58mr18h7bl"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     (list
> +      #:configure-flags
> +      #~(list "-DINTERNAL_EXPECTED=OFF")))
> +    (inputs (list boost fmt expected-lite))
> +    (home-page "https://gitlab.com/mnauw/cppgir")
> +    (synopsis "GObject introspection C++ binding wrapper generator")

Perhaps 'bindings' plural?  Perhaps drop 'wrapper', as it doesn't bring
much.  It generates C++ bindings to use GOboject introspection, right?

I think I'd word it like:

"C++ bindings generator for GObject introspection"

> +    (description "cppgir processes .gir files derived from GObject
> +introspection annotations into a set of C++ files defining suitable
> +namespaces, classes and other types that together form a C++ binding.")
> +    (license license:expat)))

Is 'guix lint' happy with the above?  I remember it used to complained
when the first character of the description wasn't capitalized.  You
could use @file{.gir} for extra decoration.

Otherwise, LGTM.

-- 
Thanks,
Maxim