summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/code.scm272
1 files changed, 136 insertions, 136 deletions
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index ce88080a6bc..9ab21880c86 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -103,6 +103,51 @@
103 103
104;;; Tools to deal with source code: metrics, cross-references, etc. 104;;; Tools to deal with source code: metrics, cross-references, etc.
105 105
106(define-public amalgamate
107 (let* ((commit "c91f07eea1133aa184f652b8f1398eaf03586208")
108 (revision "0")
109 (version (git-version "1.1.1" revision commit)))
110 (package
111 (name "amalgamate")
112 (version version)
113 (home-page "https://github.com/edlund/amalgamate")
114 (source
115 (origin
116 (method git-fetch)
117 (uri (git-reference
118 (url home-page)
119 (commit commit)))
120 (sha256
121 (base32
122 "0cllaraw8mxs8q2nr28nhgzkb417gj2wcklqg59w84f4lc78k3yb"))
123 (file-name (git-file-name name version))
124 (modules '((guix build utils)))
125 (snippet
126 '(substitute* "test.sh"
127 (("test_command \"cc -Wall -Wextra -o source.out source.c\"" all)
128 "test_command \"gcc -Wall -Wextra -o source.out source.c\"")))))
129 (build-system gnu-build-system)
130 (inputs (list python-wrapper))
131 (arguments
132 `(#:phases
133 (modify-phases %standard-phases
134 (delete 'configure)
135 (delete 'build)
136 (replace 'install
137 (lambda* (#:key outputs #:allow-other-keys)
138 (let* ((out (assoc-ref outputs "out"))
139 (bin (string-append out "/bin")))
140 (install-file "amalgamate.py" bin))))
141 (replace 'check
142 (lambda _
143 (invoke "./test.sh"))))))
144 (synopsis "Tool for amalgamating C source and header files")
145 ;; The package is indeed a script file, and the term "amalgamate.py" is
146 ;; used by upstream.
147 (description "amalgamate.py aims to make it easy to use SQLite-style C
148source and header amalgamation in projects.")
149 (license license:bsd-3))))
150
106(define-public automatic-component-toolkit 151(define-public automatic-component-toolkit
107 (package 152 (package
108 (name "automatic-component-toolkit") 153 (name "automatic-component-toolkit")
@@ -202,6 +247,35 @@ may help in learning or reviewing unfamiliar code or perhaps
202highlighting your own code that seemed comprehensible when you wrote it.") 247highlighting your own code that seemed comprehensible when you wrote it.")
203 (license license:gpl3+))) 248 (license license:gpl3+)))
204 249
250(define-public cscope
251 (package
252 (name "cscope")
253 (version "15.9")
254 (source
255 (origin
256 (method url-fetch)
257 (uri (string-append "mirror://sourceforge/cscope/cscope/"
258 "v" version "/cscope-" version ".tar.gz"))
259 (sha256
260 (base32 "0ngiv4aj3rr35k3q3wjx0y19gh7i1ydqa0cqip6sjwd8fph5ll65"))))
261 (build-system gnu-build-system)
262 (inputs (list ncurses))
263 (arguments
264 `(#:configure-flags
265 ;; Specify the correct ncurses directory to prevent incorrect fallback
266 ;; on SysV curses.
267 (list (string-append "--with-ncurses="
268 (assoc-ref %build-inputs "ncurses")))))
269 (home-page "https://cscope.sourceforge.net")
270 (synopsis "Tool for browsing source code")
271 (description
272 "Cscope is a text screen based source browsing tool. Although it is
273primarily designed to search C code (including lex and yacc files), it can
274also be used for C++ code.
275
276Using cscope, you can easily search for where symbols are used and defined.")
277 (license license:bsd-3)))
278
205(define-public global ; a global variable 279(define-public global ; a global variable
206 (package 280 (package
207 (name "global") 281 (name "global")
@@ -491,68 +565,6 @@ features that are not supported by the standard @code{stdio} implementation.")
491 (license (license:non-copyleft 565 (license (license:non-copyleft
492 "http://sourceforge.net/p/ctrio/git/ci/master/tree/README")))) 566 "http://sourceforge.net/p/ctrio/git/ci/master/tree/README"))))
493 567
494(define-public universal-ctags
495 (package
496 (name "universal-ctags")
497 (version "6.1.20250525.0")
498 (source
499 (origin
500 (method git-fetch)
501 (uri (git-reference
502 (url "https://github.com/universal-ctags/ctags")
503 (commit (string-append "p" version))))
504 (file-name (git-file-name name version))
505 (sha256
506 (base32
507 "0nxhmpzkxixb303bsihd5j7n0d29ak2lgnqff920q3dm33y965sy"))
508 (modules '((guix build utils)))
509 (snippet
510 '(begin
511 ;; Remove the bundled PackCC and associated build rules.
512 (substitute* "Makefile.am"
513 (("^PACKCC = .*")
514 "PACKCC = packcc\n")
515 (("\\$\\(PACKCC_FILES\\)")
516 "")
517 (("\\$\\(PEG_SRCS\\) \\$\\(PEG_HEADS\\): \\$\\(PACKCC\\)")
518 "$(PEG_SRCS) $(PEG_HEADS):"))
519 (delete-file-recursively "misc/packcc")))))
520 (build-system gnu-build-system)
521 (arguments
522 '(;; Don't use the build-time TMPDIR (/tmp/guix-build-...) at runtime.
523 #:configure-flags '("--enable-tmpdir=/tmp")
524 #:test-target "units"
525 #:phases (modify-phases %standard-phases
526 (add-after 'unpack 'make-files-writable
527 (lambda _
528 (for-each make-file-writable (find-files "."))))
529 (add-before 'bootstrap 'patch-misc
530 (lambda _
531 ;; The autogen.sh script calls out to these scripts, so
532 ;; we cannot wait for the patch-source-shebangs phase.
533 (for-each patch-shebang (find-files "misc"))))
534 (add-before 'check 'patch-tests
535 (lambda _
536 (substitute* "misc/units"
537 (("SHELL=/bin/sh")
538 (string-append "SHELL=" (which "sh"))))
539 (substitute* "Tmain/utils.sh"
540 (("/bin/echo") (which "echo"))))))))
541 (native-inputs
542 (list autoconf automake packcc perl pkg-config python-docutils))
543 (inputs
544 (list jansson libseccomp libxml2 libyaml pcre2))
545 (home-page "https://ctags.io/")
546 (synopsis "Generate tag files for source code")
547 (description
548 "Universal Ctags generates an index (or tag) file of language objects
549found in source files for many popular programming languages. This index
550makes it easy for text editors and other tools to locate the indexed items.
551Universal Ctags improves on traditional ctags because of its multilanguage
552support, its ability for the user to define new languages searched by regular
553expressions, and its ability to generate emacs-style TAGS files.")
554 (license license:gpl2+)))
555
556(define-public lcov 568(define-public lcov
557 (package 569 (package
558 (name "lcov") 570 (name "lcov")
@@ -939,51 +951,6 @@ extensions over the standard utility.")
939 (properties '((lint-hidden-cves . ("CVE-2023-40305" 951 (properties '((lint-hidden-cves . ("CVE-2023-40305"
940 "CVE-2024-0911"))))))) 952 "CVE-2024-0911")))))))
941 953
942(define-public amalgamate
943 (let* ((commit "c91f07eea1133aa184f652b8f1398eaf03586208")
944 (revision "0")
945 (version (git-version "1.1.1" revision commit)))
946 (package
947 (name "amalgamate")
948 (version version)
949 (home-page "https://github.com/edlund/amalgamate")
950 (source
951 (origin
952 (method git-fetch)
953 (uri (git-reference
954 (url home-page)
955 (commit commit)))
956 (sha256
957 (base32
958 "0cllaraw8mxs8q2nr28nhgzkb417gj2wcklqg59w84f4lc78k3yb"))
959 (file-name (git-file-name name version))
960 (modules '((guix build utils)))
961 (snippet
962 '(substitute* "test.sh"
963 (("test_command \"cc -Wall -Wextra -o source.out source.c\"" all)
964 "test_command \"gcc -Wall -Wextra -o source.out source.c\"")))))
965 (build-system gnu-build-system)
966 (inputs (list python-wrapper))
967 (arguments
968 `(#:phases
969 (modify-phases %standard-phases
970 (delete 'configure)
971 (delete 'build)
972 (replace 'install
973 (lambda* (#:key outputs #:allow-other-keys)
974 (let* ((out (assoc-ref outputs "out"))
975 (bin (string-append out "/bin")))
976 (install-file "amalgamate.py" bin))))
977 (replace 'check
978 (lambda _
979 (invoke "./test.sh"))))))
980 (synopsis "Tool for amalgamating C source and header files")
981 ;; The package is indeed a script file, and the term "amalgamate.py" is
982 ;; used by upstream.
983 (description "amalgamate.py aims to make it easy to use SQLite-style C
984source and header amalgamation in projects.")
985 (license license:bsd-3))))
986
987(define-public cdecl 954(define-public cdecl
988 (package 955 (package
989 (name "cdecl") 956 (name "cdecl")
@@ -1066,35 +1033,6 @@ type casts and C++. It has command-line editing and history with the GNU
1066Readline library.") 1033Readline library.")
1067 (license license:public-domain))) 1034 (license license:public-domain)))
1068 1035
1069(define-public cscope
1070 (package
1071 (name "cscope")
1072 (version "15.9")
1073 (source
1074 (origin
1075 (method url-fetch)
1076 (uri (string-append "mirror://sourceforge/cscope/cscope/"
1077 "v" version "/cscope-" version ".tar.gz"))
1078 (sha256
1079 (base32 "0ngiv4aj3rr35k3q3wjx0y19gh7i1ydqa0cqip6sjwd8fph5ll65"))))
1080 (build-system gnu-build-system)
1081 (inputs (list ncurses))
1082 (arguments
1083 `(#:configure-flags
1084 ;; Specify the correct ncurses directory to prevent incorrect fallback
1085 ;; on SysV curses.
1086 (list (string-append "--with-ncurses="
1087 (assoc-ref %build-inputs "ncurses")))))
1088 (home-page "https://cscope.sourceforge.net")
1089 (synopsis "Tool for browsing source code")
1090 (description
1091 "Cscope is a text screen based source browsing tool. Although it is
1092primarily designed to search C code (including lex and yacc files), it can
1093also be used for C++ code.
1094
1095Using cscope, you can easily search for where symbols are used and defined.")
1096 (license license:bsd-3)))
1097
1098(define-public sourcetrail 1036(define-public sourcetrail
1099 (package 1037 (package
1100 (name "sourcetrail") 1038 (name "sourcetrail")
@@ -1185,6 +1123,68 @@ for C/C++, providing a graphical means for discovering symbols and their place
1185in a project.") 1123in a project.")
1186 (license license:gpl3))) 1124 (license license:gpl3)))
1187 1125
1126(define-public universal-ctags
1127 (package
1128 (name "universal-ctags")
1129 (version "6.1.20250525.0")
1130 (source
1131 (origin
1132 (method git-fetch)
1133 (uri (git-reference
1134 (url "https://github.com/universal-ctags/ctags")
1135 (commit (string-append "p" version))))
1136 (file-name (git-file-name name version))
1137 (sha256
1138 (base32
1139 "0nxhmpzkxixb303bsihd5j7n0d29ak2lgnqff920q3dm33y965sy"))
1140 (modules '((guix build utils)))
1141 (snippet
1142 '(begin
1143 ;; Remove the bundled PackCC and associated build rules.
1144 (substitute* "Makefile.am"
1145 (("^PACKCC = .*")
1146 "PACKCC = packcc\n")
1147 (("\\$\\(PACKCC_FILES\\)")
1148 "")
1149 (("\\$\\(PEG_SRCS\\) \\$\\(PEG_HEADS\\): \\$\\(PACKCC\\)")
1150 "$(PEG_SRCS) $(PEG_HEADS):"))
1151 (delete-file-recursively "misc/packcc")))))
1152 (build-system gnu-build-system)
1153 (arguments
1154 '(;; Don't use the build-time TMPDIR (/tmp/guix-build-...) at runtime.
1155 #:configure-flags '("--enable-tmpdir=/tmp")
1156 #:test-target "units"
1157 #:phases (modify-phases %standard-phases
1158 (add-after 'unpack 'make-files-writable
1159 (lambda _
1160 (for-each make-file-writable (find-files "."))))
1161 (add-before 'bootstrap 'patch-misc
1162 (lambda _
1163 ;; The autogen.sh script calls out to these scripts, so
1164 ;; we cannot wait for the patch-source-shebangs phase.
1165 (for-each patch-shebang (find-files "misc"))))
1166 (add-before 'check 'patch-tests
1167 (lambda _
1168 (substitute* "misc/units"
1169 (("SHELL=/bin/sh")
1170 (string-append "SHELL=" (which "sh"))))
1171 (substitute* "Tmain/utils.sh"
1172 (("/bin/echo") (which "echo"))))))))
1173 (native-inputs
1174 (list autoconf automake packcc perl pkg-config python-docutils))
1175 (inputs
1176 (list jansson libseccomp libxml2 libyaml pcre2))
1177 (home-page "https://ctags.io/")
1178 (synopsis "Generate tag files for source code")
1179 (description
1180 "Universal Ctags generates an index (or tag) file of language objects
1181found in source files for many popular programming languages. This index
1182makes it easy for text editors and other tools to locate the indexed items.
1183Universal Ctags improves on traditional ctags because of its multilanguage
1184support, its ability for the user to define new languages searched by regular
1185expressions, and its ability to generate emacs-style TAGS files.")
1186 (license license:gpl2+)))
1187
1188(define-public xenon 1188(define-public xenon
1189 (package 1189 (package
1190 (name "xenon") 1190 (name "xenon")