diff mbox series

[bug#57675,v3,3/7] gnu: Add abseil-cpp-cxxstd17.

Message ID y76edwi8bki.wl-hako@ultrarare.space
State New
Headers show
Series gnu: telegram-desktop: Update to 4.1.1. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Hilton Chain Sept. 11, 2022, 10:11 a.m. UTC
* gnu/packages/telegram.scm (abseil-cpp-cxxstd17): New variable.
---
 gnu/packages/telegram.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

--
2.37.3

Comments

Liliana Marie Prikler Sept. 11, 2022, 11:13 a.m. UTC | #1
Am Sonntag, dem 11.09.2022 um 18:11 +0800 schrieb Hilton Chain:
> 
> * gnu/packages/telegram.scm (abseil-cpp-cxxstd17): New variable.
> ---
>  gnu/packages/telegram.scm | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
> index 6e7fa4a2ec..3b0444025c 100644
> --- a/gnu/packages/telegram.scm
> +++ b/gnu/packages/telegram.scm
> @@ -62,6 +62,7 @@ (define-module (gnu packages telegram)
>    #:use-module (gnu packages xorg)
>    #:use-module ((guix licenses) #:prefix license:)
>    #:use-module (guix packages)
> +  #:use-module (guix utils)
>    #:use-module (guix git-download)
>    #:use-module (guix build-system cmake)
>    #:use-module (guix build-system copy)
> @@ -71,6 +72,18 @@ (define-module (gnu packages telegram)
>    #:use-module (guix build-system python)
>    #:use-module (guix build-system qt))
> 
> +(define-public abseil-cpp-cxxstd17
> +  (let ((base abseil-cpp))
> +    ;; Abseil built with pre C++17 standards enforcing would cause a
> linking
> +    ;; issue when building Telegram Destop. (Currently it's by
> default 11, and
> +    ;; has changed to 14 upstream.)
> +    (hidden-package
> +     (package/inherit base
> +       (arguments
> +        (substitute-keyword-arguments (package-arguments base)
> +          ((#:configure-flags flags)
> +           `(cons* "-DCMAKE_CXX_STANDARD=17" ,flags))))))))
> +
For the record, this ought to be placed near abseil-cpp, because the
semantics of inheritance can screw you over cross-module.

Cheers
diff mbox series

Patch

diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 6e7fa4a2ec..3b0444025c 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -62,6 +62,7 @@  (define-module (gnu packages telegram)
   #:use-module (gnu packages xorg)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (guix utils)
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system copy)
@@ -71,6 +72,18 @@  (define-module (gnu packages telegram)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt))

+(define-public abseil-cpp-cxxstd17
+  (let ((base abseil-cpp))
+    ;; Abseil built with pre C++17 standards enforcing would cause a linking
+    ;; issue when building Telegram Destop. (Currently it's by default 11, and
+    ;; has changed to 14 upstream.)
+    (hidden-package
+     (package/inherit base
+       (arguments
+        (substitute-keyword-arguments (package-arguments base)
+          ((#:configure-flags flags)
+           `(cons* "-DCMAKE_CXX_STANDARD=17" ,flags))))))))
+
 (define-public webrtc-for-telegram-desktop
   (let ((commit "91d836dc84a16584c6ac52b36c04c0de504d9c34")
         (revision "166"))