diff mbox series

[bug#71897,1/3] gnu: Add cppgir.

Message ID a7ddf7ed33ca8b5fedde35a4a44eec27f98caf02.1719926171.git.i@dan.games
State New
Headers show
Series [bug#71897,1/3] gnu: Add cppgir. | expand

Commit Message

dan July 2, 2024, 1:17 p.m. UTC
* gnu/packages/glib.scm: (cppgir): New variable.

Change-Id: Ifaf3af1642bb8cb4750ee4f679967fb57c9cc7e2
---
 gnu/packages/glib.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)


base-commit: 4b3a553ca5ba5ac190739309eb5f7aa8170cf2a8

Comments

Liliana Marie Prikler July 2, 2024, 4:58 p.m. UTC | #1
Am Dienstag, dem 02.07.2024 um 21:17 +0800 schrieb dan:
> * gnu/packages/glib.scm: (cppgir): New variable.
> 
> Change-Id: Ifaf3af1642bb8cb4750ee4f679967fb57c9cc7e2
> ---
>  gnu/packages/glib.scm | 34 ++++++++++++++++++++++++++++++++++
>  1 file changed, 34 insertions(+)
> 
> diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
> index b11046f05d..77279e6ad0 100644
> --- a/gnu/packages/glib.scm
> +++ b/gnu/packages/glib.scm
> @@ -20,6 +20,7 @@
>  ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
>  ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
>  ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
> +;;; Copyright © 2024 dan <i@dan.games>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -71,6 +72,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)
> @@ -1594,3 +1596,35 @@ (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+)))
> +
> +;; This package is added as a dependency of telegram-desktop.  The
> 2.0 version
> +;; failed to compile, so we use the commit specified in telegram-
> desktop.
> +(define-public cppgir
> +  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
> +        (revision "0"))
> +    (package
> +      (name "cppgir")
> +      (version (git-version "2.0" revision commit))
Can we investigate why 2.0 fails to compile?  If telegram-desktop
requires a newer one, that's fine, we'd just name it cppgir-for-
telegram-desktop, as it's an application that likes to require special
versions.
> +      (source (origin
> +                (method git-fetch)
> +                (uri
> +                 (git-reference
> +                  (url "https://gitlab.com/mnauw/cppgir")
> +                  (commit commit)))
> +                (file-name (git-file-name name version))
> +                (sha256
> +                 (base32
> "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b"))))
> +      (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")
> +      (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.  In this
> +way, the plain C libraries and objects become available as native
> objects
> +along with @acronym{RAII, Resource Acquisition Is Initialization}
> managed
> +resource handling.")
I think "and resources are handled according to the @acronym{RAII, …}
pattern." would fit nicer, grammatically.

Cheers
diff mbox series

Patch

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index b11046f05d..77279e6ad0 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -20,6 +20,7 @@ 
 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2024 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -71,6 +72,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)
@@ -1594,3 +1596,35 @@  (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+)))
+
+;; This package is added as a dependency of telegram-desktop.  The 2.0 version
+;; failed to compile, so we use the commit specified in telegram-desktop.
+(define-public cppgir
+  (let ((commit "9c4f5820d94d62ab451501f016bfea97156518f4")
+        (revision "0"))
+    (package
+      (name "cppgir")
+      (version (git-version "2.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri
+                 (git-reference
+                  (url "https://gitlab.com/mnauw/cppgir")
+                  (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32 "1fa9nf4yljfarihaqj5kd98yysrky7q316mh6l5b1rq39ga15k9b"))))
+      (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")
+      (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.  In this
+way, the plain C libraries and objects become available as native objects
+along with @acronym{RAII, Resource Acquisition Is Initialization} managed
+resource handling.")
+      (license license:expat))))