guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/04: gnu: libcxx+libcxxabi: Use G-expressions.


From: guix-commits
Subject: 04/04: gnu: libcxx+libcxxabi: Use G-expressions.
Date: Sat, 5 Nov 2022 19:37:33 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit a60dc46c2bb5de196858594b72b00d5f86ca7e98
Author: Zhu Zihao <all_but_last@163.com>
AuthorDate: Thu Oct 27 16:33:30 2022 +0800

    gnu: libcxx+libcxxabi: Use G-expressions.
    
    * gnu/packages/llvm.scm (libcxx+libcxxabi-6)[arguments]: Use G-expressions.
    <#:configure-flags>: Use "this-package-native-input".
    
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 gnu/packages/llvm.scm | 44 +++++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 17c51ea6bb..324149116b 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -1677,27 +1677,29 @@ standard C++ library.")
     (name "libcxx+libcxxabi")
     (version (package-version libcxx-6))
     (arguments
-     `(#:configure-flags
-       (list "-DLIBCXX_CXX_ABI=libcxxabi"
-             (string-append "-DLIBCXX_CXX_ABI_INCLUDE_PATHS="
-                            (assoc-ref %build-inputs "libcxxabi")
-                            "/include"))
-       #:phases
-       (modify-phases (@ (guix build cmake-build-system) %standard-phases)
-         (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((gcc (assoc-ref inputs  "gcc")))
-               ;; Hide GCC's C++ headers so that they do not interfere with
-               ;; the ones we are attempting to build.
-               (setenv "CPLUS_INCLUDE_PATH"
-                       (string-join
-                        (delete (string-append gcc "/include/c++")
-                                (string-split (getenv "CPLUS_INCLUDE_PATH")
-                                              #\:))
-                        ":"))
-               (format #true
-                       "environment variable `CPLUS_INCLUDE_PATH' changed to 
~a~%"
-                       (getenv "CPLUS_INCLUDE_PATH"))))))))
+     (list
+      #:configure-flags
+      #~(list "-DLIBCXX_CXX_ABI=libcxxabi"
+              (string-append "-DLIBCXX_CXX_ABI_INCLUDE_PATHS="
+                             #$(this-package-native-input "libcxxabi")
+                             "/include"))
+      #:phases
+      #~(modify-phases (@ (guix build cmake-build-system) %standard-phases)
+          (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((gcc (assoc-ref inputs  "gcc")))
+                ;; Hide GCC's C++ headers so that they do not interfere with
+                ;; the ones we are attempting to build.
+                (setenv "CPLUS_INCLUDE_PATH"
+                        (string-join
+                         (delete (string-append gcc "/include/c++")
+                                 (string-split (getenv "CPLUS_INCLUDE_PATH")
+                                               #\:))
+                         ":"))
+                (format
+                 #true
+                 "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+                 (getenv "CPLUS_INCLUDE_PATH"))))))))
     (native-inputs
      (list clang-6 llvm-6 libcxxabi-6))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]