diff options
| author | Ada Stevenson <adanskana@gmail.com> | 2025-07-15 15:19:03 +0800 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-07-27 10:08:15 +0100 |
| commit | 63cd2324ddb26c13246c1575fc141d10e9c36145 (patch) | |
| tree | e6c2621ea54bb064dd1b9d6ecac96cbb97d24ee3 /gnu/packages/code.scm | |
| parent | 9b912bb666de116d3a807176a7239b73ecb39790 (diff) | |
gnu: Add sourcetrail.
* gnu/packages/code.scm: Add sourcetrail. Update imports.
* gnu/packages/patches/sourcetrail-fix-cmakelists-and-paths.patch: Add patch.
* gnu/local.mk: Register it.
Change-Id: Ib074d392452a527552074e5329e8153a858979c9
Reviewed-by: Noé Lopez <noelopez@free.fr>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/code.scm')
| -rw-r--r-- | gnu/packages/code.scm | 101 |
1 files changed, 100 insertions, 1 deletions
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index c4c423c8466..ebd50309d56 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | ;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com> | 23 | ;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com> |
| 24 | ;;; Copyright © 2024 Jordan Moore <lockbox@struct.foo> | 24 | ;;; Copyright © 2024 Jordan Moore <lockbox@struct.foo> |
| 25 | ;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr> | 25 | ;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr> |
| 26 | ;;; Copyright © 2025 Ada Stevenson <adanskana@gmail.com> | ||
| 26 | ;;; | 27 | ;;; |
| 27 | ;;; This file is part of GNU Guix. | 28 | ;;; This file is part of GNU Guix. |
| 28 | ;;; | 29 | ;;; |
| @@ -88,7 +89,15 @@ | |||
| 88 | #:use-module (gnu packages texinfo) | 89 | #:use-module (gnu packages texinfo) |
| 89 | #:use-module (gnu packages tls) | 90 | #:use-module (gnu packages tls) |
| 90 | #:use-module (gnu packages web) | 91 | #:use-module (gnu packages web) |
| 91 | #:use-module (gnu packages xml)) | 92 | #:use-module (gnu packages xml) |
| 93 | #:use-module (gnu packages boost) | ||
| 94 | #:use-module (gnu packages pretty-print) | ||
| 95 | #:use-module (gnu packages qt) | ||
| 96 | #:use-module (gnu packages regex) | ||
| 97 | #:use-module (gnu packages logging) | ||
| 98 | #:use-module (gnu packages check) | ||
| 99 | #:use-module (gnu packages cpp) | ||
| 100 | #:use-module (srfi srfi-1)) | ||
| 92 | 101 | ||
| 93 | ;;; Tools to deal with source code: metrics, cross-references, etc. | 102 | ;;; Tools to deal with source code: metrics, cross-references, etc. |
| 94 | 103 | ||
| @@ -1079,6 +1088,96 @@ also be used for C++ code. | |||
| 1079 | Using cscope, you can easily search for where symbols are used and defined.") | 1088 | Using cscope, you can easily search for where symbols are used and defined.") |
| 1080 | (license license:bsd-3))) | 1089 | (license license:bsd-3))) |
| 1081 | 1090 | ||
| 1091 | (define-public sourcetrail | ||
| 1092 | (package | ||
| 1093 | (name "sourcetrail") | ||
| 1094 | (version "2.0.0") | ||
| 1095 | (source | ||
| 1096 | (origin | ||
| 1097 | (method git-fetch) | ||
| 1098 | (uri (git-reference | ||
| 1099 | (url "https://github.com/OpenSourceSourceTrail/Sourcetrail") | ||
| 1100 | (commit version) | ||
| 1101 | (recursive? #t))) | ||
| 1102 | (patches (search-patches "sourcetrail-fix-cmakelists-and-paths.patch")) | ||
| 1103 | (file-name (git-file-name name version)) | ||
| 1104 | (sha256 | ||
| 1105 | "06rp9ba9lkzwm8m7agzajg550h632kqb57bs9srvbgv411bkvgdd") | ||
| 1106 | (modules '((guix build utils))) | ||
| 1107 | (snippet #~(begin | ||
| 1108 | (for-each delete-file-recursively | ||
| 1109 | '(".conan" ".devcontainer" | ||
| 1110 | ".github" | ||
| 1111 | "conanfile.txt" | ||
| 1112 | "scripts" | ||
| 1113 | "bin/app/data/install" | ||
| 1114 | "bin/app/user/log")))))) | ||
| 1115 | (build-system cmake-build-system) | ||
| 1116 | (arguments | ||
| 1117 | (let* ((split-version (string-split version | ||
| 1118 | (lambda (c) | ||
| 1119 | (or (eqv? c #\.) | ||
| 1120 | (eqv? c #\-))))) | ||
| 1121 | (major-version (first split-version)) | ||
| 1122 | (minor-version (second split-version)) | ||
| 1123 | (version-patch (third split-version))) | ||
| 1124 | (list #:configure-flags #~(list "-DENABLE_UNIT_TEST=true" | ||
| 1125 | "-DENABLE_GUI_TEST=true" | ||
| 1126 | "-DENABLE_INTERGRATION_TEST=true" | ||
| 1127 | (string-append "-DVERSION_MAJOR=" | ||
| 1128 | #$major-version) | ||
| 1129 | (string-append "-DVERSION_MINOR=" | ||
| 1130 | #$minor-version) | ||
| 1131 | (string-append "-DVERSION_PATCH=" | ||
| 1132 | #$version-patch) | ||
| 1133 | "-DLLVM_ENABLE_PROJECTS:STRING=clang" | ||
| 1134 | "-DLLVM_ENABLE_RTTI:BOOL=ON" | ||
| 1135 | "-DCLANG_LINK_CLANG_DYLIB:BOOL=ON" | ||
| 1136 | "-DLLVM_LINK_LLVM_DYLIB:BOOL=ON" | ||
| 1137 | "-DLLVM_TARGETS_TO_BUILD=host" | ||
| 1138 | "-DBUILD_CXX_LANGUAGE_PACKAGE=ON" | ||
| 1139 | (string-append "-DClang_DIR=" | ||
| 1140 | #$clang-19 | ||
| 1141 | "/lib/cmake/clang")) | ||
| 1142 | #:phases #~(modify-phases %standard-phases | ||
| 1143 | (add-after 'unpack 'fix-paths | ||
| 1144 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 1145 | (substitute* "src/lib_gui/tests/utilityAppTestSuite.cpp" | ||
| 1146 | (("/usr/bin/bash") | ||
| 1147 | (search-input-file inputs "/bin/bash"))) | ||
| 1148 | (substitute* "CMakeLists.txt" | ||
| 1149 | (("@OUTPUT_DIR@") | ||
| 1150 | #$output)))) | ||
| 1151 | (add-after 'install 'install-projects | ||
| 1152 | (lambda _ | ||
| 1153 | (let ((src (string-append #$output | ||
| 1154 | "/share/sourcetrail/user/projects")) | ||
| 1155 | (dst (string-append #$output:projects | ||
| 1156 | "/share/sourcetrail/user/projects"))) | ||
| 1157 | (copy-recursively src dst) | ||
| 1158 | (delete-file-recursively src)))))))) | ||
| 1159 | (inputs (list boost | ||
| 1160 | clang-19 | ||
| 1161 | expected-lite | ||
| 1162 | qt5compat | ||
| 1163 | qtbase | ||
| 1164 | qtnetworkauth | ||
| 1165 | qtsvg | ||
| 1166 | qtwayland | ||
| 1167 | range-v3 | ||
| 1168 | spdlog-1.13 | ||
| 1169 | sqlite | ||
| 1170 | tinyxml)) | ||
| 1171 | (native-inputs (list googletest)) | ||
| 1172 | (home-page "https://github.com/OpenSourceSourceTrail/Sourcetrail") | ||
| 1173 | (synopsis "Graphical cross-platform source code browser for C/C++") | ||
| 1174 | (description | ||
| 1175 | "Sourcetrail is a free and open-source cross-platform source explorer | ||
| 1176 | that helps you get productive on unfamiliar source code. It includes support | ||
| 1177 | for C/C++, providing a graphical means for discovering symbols and their place | ||
| 1178 | in a project.") | ||
| 1179 | (license license:gpl3))) | ||
| 1180 | |||
| 1082 | (define-public xenon | 1181 | (define-public xenon |
| 1083 | (package | 1182 | (package |
| 1084 | (name "xenon") | 1183 | (name "xenon") |
