guix-commits
[Top][All Lists]
Advanced

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

03/04: gnu: libcxxabi: Use G-expressions.


From: guix-commits
Subject: 03/04: gnu: 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 1bb3a3ea4efb607b48988bed2b2b949406e12623
Author: Zhu Zihao <all_but_last@163.com>
AuthorDate: Thu Oct 27 16:33:29 2022 +0800

    gnu: libcxxabi: Use G-expressions.
    
    * gnu/packages/llvm.scm (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 | 69 +++++++++++++++++++++++++++------------------------
 1 file changed, 37 insertions(+), 32 deletions(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 405ff0b0d8..17c51ea6bb 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -1625,38 +1625,43 @@ use with Clang, targeting C++11, C++14 and above.")
          "0ki6796b5z08kh3a3rbysr5wwb2dkl6wal5dzd03i4li5xfkvx1g"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:configure-flags
-       (list (string-append "-DLIBCXXABI_LIBCXX_INCLUDES="
-                            (assoc-ref %build-inputs "libcxx")
-                            "/include")
-             "-DCMAKE_C_COMPILER=clang"
-             "-DCMAKE_CXX_COMPILER=clang++")
-       #:phases
-       (modify-phases (@ (guix build cmake-build-system) %standard-phases)
-         (add-after 'unpack 'chdir
-           (lambda _ (chdir "libcxxabi")))
-         (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
-                        (cons (string-append
-                               (assoc-ref inputs "libcxx") "/include/c++/v1")
-                              (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")))))
-         (add-after 'install 'install-headers
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((include-dir (string-append
-                                 (assoc-ref outputs "out") "/include")))
-               (install-file "../libcxxabi/include/__cxxabi_config.h" 
include-dir)
-               (install-file "../libcxxabi/include/cxxabi.h" include-dir)))))))
+     (list
+      #:configure-flags
+      #~(list (string-append "-DLIBCXXABI_LIBCXX_INCLUDES="
+                             #$(this-package-native-input "libcxx")
+                             "/include")
+              "-DCMAKE_C_COMPILER=clang"
+              "-DCMAKE_CXX_COMPILER=clang++")
+      #:phases
+      #~(modify-phases (@ (guix build cmake-build-system) %standard-phases)
+          (add-after 'unpack 'chdir
+            (lambda _ (chdir "libcxxabi")))
+          (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
+                         (cons (string-append
+                                (assoc-ref inputs "libcxx") "/include/c++/v1")
+                               (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")))))
+          (add-after 'install 'install-headers
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let ((include-dir (string-append
+                                  (assoc-ref outputs "out") "/include")))
+                (install-file "../libcxxabi/include/__cxxabi_config.h"
+                              include-dir)
+                (install-file "../libcxxabi/include/cxxabi.h"
+                              include-dir)))))))
     (native-inputs
      (list clang-6 llvm-6 libcxx-6))
     (home-page "https://libcxxabi.llvm.org";)



reply via email to

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