summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2026-05-03 22:25:25 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2026-05-24 10:19:24 +0100
commitd21bd2ae79daf873bb8faa1fc2bb5ca9c245f043 (patch)
tree14dab4c8b53904d80a2bc4ad6017bdf246caa4be
parentf62495b5c2e93ec75ceb60f8ec4746612560c2ec (diff)
gnu: c-vise: Update to 2.8.0.
* gnu/packages/debug.scm (c-vise): Update to 2.8.0. [native-inputs]: Relocate field, add python-pytest-flake8. [inputs]: Relocate field, improve style. [arguments]<#:phases>: Run guix style -S arguments. In phase 'wrap, filter out native-input paths. In phase 'hardcode-paths, use explicit "all" and "blank". Fixes: guix/guix#8233 Change-Id: I1d3bb7c07c648f1bff731b94acc4d51559935303 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
-rw-r--r--gnu/packages/debug.scm72
1 files changed, 44 insertions, 28 deletions
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 7001f5bdcb4..ead7aff7b83 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -263,7 +263,7 @@ simple way to add custom protocol messages.")
263(define-public c-vise 263(define-public c-vise
264 (package 264 (package
265 (name "c-vise") 265 (name "c-vise")
266 (version "2.4.0") 266 (version "2.8.0")
267 (source 267 (source
268 (origin 268 (origin
269 (method git-fetch) 269 (method git-fetch)
@@ -271,37 +271,53 @@ simple way to add custom protocol messages.")
271 (url "https://github.com/marxin/cvise") 271 (url "https://github.com/marxin/cvise")
272 (commit (string-append "v" version)))) 272 (commit (string-append "v" version))))
273 (sha256 273 (sha256
274 (base32 "1i2z5q2pcwh1gpdqc24x1a2q5vzwhblzzq021nzwf304di7m18vl")) 274 (base32 "1ynhm1d56r25apgvv0wqbdrhjbwigkwrgw92g2czz4nfx77rjxz2"))
275 (file-name (git-file-name name version)))) 275 (file-name (git-file-name name version))))
276 (build-system cmake-build-system) 276 (build-system cmake-build-system)
277 (arguments
278 (list
279 #:phases
280 #~(modify-phases %standard-phases
281 (add-after 'unpack 'fix-linkage
282 (lambda _
283 (substitute* "clang_delta/CMakeLists.txt"
284 (("\\$\\{LLVM_LINK_LLVM_DYLIB\\}")
285 "True")
286 ((" LLVM")
287 " LLVMSupport"))))
288 (add-before 'build 'hardcode-paths
289 (lambda _
290 (substitute* "cvise.py"
291 (("/bin/bash")
292 (which "bash"))
293 (("(.*)# Special case for clang-format" all blank)
294 (format #f "~a# Special case for unifdef
295~aprograms['unifdef'] = ~s
296~a"
297 blank blank (which "unifdef") all)))))
298 (add-after 'install 'wrap
299 (lambda _
300 (let ((python-path (getenv "GUIX_PYTHONPATH")))
301 (wrap-program (string-append #$output "/bin/cvise")
302 `("PYTHONPATH" ":" prefix
303 (,(string-join
304 (filter (lambda (cand)
305 (not (string-contains cand "pytest")))
306 (string-split python-path #\:))
307 ":"))))))))))
277 (native-inputs 308 (native-inputs
278 (list flex python-pytest)) 309 (list flex
310 python-pytest
311 python-pytest-flake8))
279 (inputs 312 (inputs
280 (list bash-minimal clang llvm unifdef 313 (list bash-minimal
281 python python-pebble python-psutil python-chardet)) 314 clang
282 (arguments 315 llvm
283 `(#:phases 316 unifdef
284 (modify-phases %standard-phases 317 python
285 (add-after 'unpack 'fix-linkage 318 python-pebble
286 (lambda _ 319 python-psutil
287 (substitute* "clang_delta/CMakeLists.txt" 320 python-chardet))
288 (("\\$\\{LLVM_LINK_LLVM_DYLIB\\}") "True")
289 ((" LLVM") " LLVMSupport"))))
290 (add-before 'build 'hardcode-paths
291 (lambda _
292 (substitute* "cvise.py"
293 (("/bin/bash") (which "bash"))
294 (("(.*)# Special case for clang-format" & >)
295 (string-append > "# Special case for unifdef\n"
296 > "programs['unifdef'] = '" (which "unifdef") "'\n"
297 &)))))
298 (add-after 'install 'wrap
299 (lambda* (#:key outputs #:allow-other-keys)
300 (let ((out (assoc-ref outputs "out"))
301 (python-path (getenv "GUIX_PYTHONPATH")))
302 (wrap-program (string-append out "/bin/cvise")
303 `("PYTHONPATH" ":" prefix (,python-path)))
304 #t))))))
305 (home-page "https://github.com/marxin/cvise") 321 (home-page "https://github.com/marxin/cvise")
306 (synopsis "Reducer for interesting code") 322 (synopsis "Reducer for interesting code")
307 (description 323 (description