summary refs log tree commit diff
path: root/gnu/packages/debug.scm
diff options
context:
space:
mode:
authorDaniel Ziltener <dziltener@lyrion.ch>2024-04-16 00:26:36 +0800
committerZheng Junjie <zhengjunjie@iscas.ac.cn>2024-04-23 16:45:34 +0800
commit2d19e505f6f9f82aebc9ba8c74ba223818acd9bc (patch)
tree0166a0e8fdcb8024e0ed36eba4620ccd21020f71 /gnu/packages/debug.scm
parent837016fe33e11c6252ec24c423d1b6ae0cd7efd3 (diff)
downloadguix-2d19e505f6f9f82aebc9ba8c74ba223818acd9bc.tar.gz
gnu: Add cppdap.
* gnu/packages/debug.scm (cppdap): New variable.
* gnu/packages/patches/cppdap-add-CPPDAP_USE_EXTERNAL_GTEST_PACKAGE.patch: New
patch.
* gnu/local.mk (dist_patch_DATA): Register it.

Signed-off-by: Zheng Junjie <zhengjunjie@iscas.ac.cn>
Change-Id: I328ca0c01787defcc9d18f4ccd7762c86412cca7
Signed-off-by: Zheng Junjie <zhengjunjie@iscas.ac.cn>
Diffstat (limited to 'gnu/packages/debug.scm')
-rw-r--r--gnu/packages/debug.scm51
1 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 6d4567acc4..612533b03d 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -46,6 +46,7 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages c)
+  #:use-module (gnu packages cpp)
   #:use-module (gnu packages check)
   #:use-module (gnu packages code)
   #:use-module (gnu packages compression)
@@ -185,6 +186,56 @@ intended for use by people who discover and report bugs in compilers and other
 tools that process C/C++ code.")
     (license license:ncsa)))
 
+(define-public cppdap
+  (package
+    (name "cppdap")
+    (version "1.58.0-a")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/google/cppdap")
+         (commit (string-append "dap-" version))))
+       (modules '((guix build utils)))
+       (snippet
+        '(delete-file-recursively "third_party"))
+       (patches (search-patches
+                 "cppdap-add-CPPDAP_USE_EXTERNAL_GTEST_PACKAGE.patch"))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0fq2w35fw1lb5wya1nny45pk3a13b689k48calk1cmqmqpbcjn2b"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags
+      #~(list
+         "-DCPPDAP_BUILD_TESTS=ON"
+         "-DCPPDAP_USE_EXTERNAL_GTEST_PACKAGE=ON"
+         ;; Only one of the following three can be enabled at the same time
+         ;; "-DCPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE=ON"
+         ;; "-DCPPDAP_USE_EXTERNAL_JSONCPP_PACKAGE=ON"
+         "-DCPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE=ON")))
+    (native-inputs
+     (list googletest))
+    ;; see lib/cmake/cppdap/cppdapConfig.cmake
+    ;; cmake file require propagate this.
+    (propagated-inputs
+     (list
+      ;; Only one of the following three can be enabled at the same time
+      ;; rapidjson
+      ;; jsoncpp
+      nlohmann-json))
+    (home-page "https://github.com/google/cppdap")
+    (synopsis "C++ library for the Debug Adapter Protocol")
+    (description
+     "cppdap is a C++11 library (\"SDK\") implementation of the Debug Adapter
+Protocol, providing an API for implementing a DAP client or server.  cppdap
+provides C++ type-safe structures for the full DAP specification, and provides a
+simple way to add custom protocol messages.")
+    (license license:expat)))
+
 (define-public c-vise
   (package
     (name "c-vise")