| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 |
|
| 35 | (define-module (gnu packages debug)
|
| 36 | #:use-module (guix packages)
|
| 37 | #:use-module ((guix licenses) #:prefix license:)
|
| 38 | #:use-module (guix download)
|
| 39 | #:use-module (guix git-download)
|
| 40 | #:use-module (guix utils)
|
| 41 | #:use-module (guix build-system gnu)
|
| 42 | #:use-module (guix build-system cmake)
|
| 43 | #:use-module (guix build-system go)
|
| 44 | #:use-module (guix build-system linux-module)
|
| 45 | #:use-module (guix build-system pyproject)
|
| 46 | #:use-module (guix build-system qt)
|
| 47 | #:use-module (guix gexp)
|
| 48 | #:use-module (gnu packages)
|
| 49 | #:use-module (gnu packages attr)
|
| 50 | #:use-module (gnu packages autotools)
|
| 51 | #:use-module (gnu packages base)
|
| 52 | #:use-module (gnu packages bash)
|
| 53 | #:use-module (gnu packages bison)
|
| 54 | #:use-module (gnu packages c)
|
| 55 | #:use-module (gnu packages cpp)
|
| 56 | #:use-module (gnu packages check)
|
| 57 | #:use-module (gnu packages code)
|
| 58 | #:use-module (gnu packages compression)
|
| 59 | #:use-module (gnu packages flex)
|
| 60 | #:use-module (gnu packages fontutils)
|
| 61 | #:use-module (gnu packages gcc)
|
| 62 | #:use-module (gnu packages gdb)
|
| 63 | #:use-module (gnu packages glib)
|
| 64 | #:use-module (gnu packages gtk)
|
| 65 | #:use-module (gnu packages golang)
|
| 66 | #:use-module (gnu packages golang-build)
|
| 67 | #:use-module (gnu packages golang-web)
|
| 68 | #:use-module (gnu packages golang-xyz)
|
| 69 | #:use-module (gnu packages image)
|
| 70 | #:use-module (gnu packages lesstif)
|
| 71 | #:use-module (gnu packages libusb)
|
| 72 | #:use-module (gnu packages linux)
|
| 73 | #:use-module (gnu packages llvm)
|
| 74 | #:use-module (gnu packages multiprecision)
|
| 75 | #:use-module (gnu packages ncurses)
|
| 76 | #:use-module (gnu packages ninja)
|
| 77 | #:use-module (gnu packages perl)
|
| 78 | #:use-module (gnu packages pkg-config)
|
| 79 | #:use-module (gnu packages pretty-print)
|
| 80 | #:use-module (gnu packages python)
|
| 81 | #:use-module (gnu packages python-build)
|
| 82 | #:use-module (gnu packages python-check)
|
| 83 | #:use-module (gnu packages python-xyz)
|
| 84 | #:use-module (gnu packages qt)
|
| 85 | #:use-module (gnu packages readline)
|
| 86 | #:use-module (gnu packages serialization)
|
| 87 | #:use-module (gnu packages texinfo)
|
| 88 | #:use-module (gnu packages virtualization)
|
| 89 | #:use-module (gnu packages xdisorg)
|
| 90 | #:use-module (gnu packages xorg)
|
| 91 | #:use-module (ice-9 match)
|
| 92 | #:use-module (srfi srfi-1))
|
| 93 |
|
| 94 | (define-public delta
|
| 95 | (package
|
| 96 | (name "delta")
|
| 97 | (version "2006.08.03")
|
| 98 | (source
|
| 99 | (origin
|
| 100 | (method url-fetch)
|
| 101 | (uri (list
|
| 102 | (string-append "mirror://debian/pool/main/d/delta/"
|
| 103 | "delta_" version ".orig.tar.gz")))
|
| 104 | (sha256
|
| 105 | (base32
|
| 106 | "184wh35pf2ddx97319s6sgkzpz48xxkbwzcjpycv009bm53lh61q"))))
|
| 107 | (build-system gnu-build-system)
|
| 108 | (inputs |
| 109 | (list perl))
|
| 110 | (arguments
|
| 111 | `(#:phases
|
| 112 | (modify-phases %standard-phases
|
| 113 | (replace 'install
|
| 114 | (lambda* (#:key outputs #:allow-other-keys)
|
| 115 | |
| 116 | (let* ((out (assoc-ref outputs "out"))
|
| 117 | (bin (string-append out "/bin"))
|
| 118 | (doc (string-append out "/share/doc/delta-" ,version)))
|
| 119 | (begin
|
| 120 | (for-each (lambda (h)
|
| 121 | (install-file h doc))
|
| 122 | `("License.txt" ,@(find-files "www" ".*\\.html")))
|
| 123 | (for-each (lambda (b)
|
| 124 | (install-file b bin))
|
| 125 | `("delta" "multidelta" "topformflat"))))
|
| 126 | #t))
|
| 127 | (delete 'configure)))) |
| 128 | (home-page
|
| 129 | "https://web.archive.org/web/20200701152100/http://delta.tigris.org/")
|
| 130 | (synopsis "Heuristical file minimizer")
|
| 131 | (description
|
| 132 | "Delta assists you in minimizing \"interesting\" files subject to a test
|
| 133 | of their interestingness. A common such situation is when attempting to
|
| 134 | isolate a small failure-inducing substring of a large input that causes your
|
| 135 | program to exhibit a bug.")
|
| 136 | |
| 137 | |
| 138 | (license license:bsd-3)))
|
| 139 |
|
| 140 | (define-public c-reduce
|
| 141 | (let ((commit "31e855e290970cba0286e5032971509c0e7c0a80")
|
| 142 | (revision "0"))
|
| 143 | (package
|
| 144 | (name "c-reduce")
|
| 145 | (version (git-version "2.10.0" revision commit))
|
| 146 | (source
|
| 147 | (origin
|
| 148 | (method git-fetch)
|
| 149 | (uri (git-reference
|
| 150 | (url "https://github.com/csmith-project/creduce")
|
| 151 | (commit commit)))
|
| 152 | (file-name (git-file-name name version))
|
| 153 | (sha256
|
| 154 | (base32 "1yd3wvnkj7qgn2jj5byp58p3qq04w5d6agagrkgi5z5gb6z4qyqk"))))
|
| 155 | (build-system gnu-build-system)
|
| 156 | (arguments
|
| 157 | (list
|
| 158 | #:phases
|
| 159 | #~(modify-phases %standard-phases
|
| 160 | (replace 'check
|
| 161 | (lambda _
|
| 162 | (with-directory-excursion "tests"
|
| 163 | |
| 164 | |
| 165 | (invoke "./run_tests" "1"))))
|
| 166 | (add-after 'install 'set-load-paths
|
| 167 | (lambda _
|
| 168 | |
| 169 | (wrap-program (string-append #$output "/bin/creduce")
|
| 170 | `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))))))
|
| 171 | (native-inputs (list flex))
|
| 172 | (inputs (list astyle
|
| 173 | bash-minimal |
| 174 | llvm-18
|
| 175 | clang-18
|
| 176 | indent
|
| 177 | perl
|
| 178 | perl-exporter-lite
|
| 179 | perl-file-which
|
| 180 | perl-getopt-tabular
|
| 181 | perl-regexp-common
|
| 182 | perl-term-readkey))
|
| 183 | (home-page "https://embed.cs.utah.edu/creduce")
|
| 184 | (synopsis "Reducer for interesting code")
|
| 185 | (description
|
| 186 | "C-Reduce is a tool that takes a large C or C++ program that has a
|
| 187 | property of interest (such as triggering a compiler bug) and automatically
|
| 188 | produces a much smaller C/C++ program that has the same property. It is
|
| 189 | intended for use by people who discover and report bugs in compilers and other
|
| 190 | tools that process C/C++ code.")
|
| 191 | (license license:ncsa))))
|
| 192 |
|
| 193 | (define-public cppdap
|
| 194 | (package
|
| 195 | (name "cppdap")
|
| 196 | (version "1.58.0-a")
|
| 197 | (source
|
| 198 | (origin
|
| 199 | (method git-fetch)
|
| 200 | (uri
|
| 201 | (git-reference
|
| 202 | (url "https://github.com/google/cppdap")
|
| 203 | (commit (string-append "dap-" version))))
|
| 204 | (modules '((guix build utils)))
|
| 205 | (snippet
|
| 206 | '(delete-file-recursively "third_party"))
|
| 207 | (patches (search-patches
|
| 208 | "cppdap-add-CPPDAP_USE_EXTERNAL_GTEST_PACKAGE.patch"))
|
| 209 | (file-name (git-file-name name version))
|
| 210 | (sha256
|
| 211 | (base32
|
| 212 | "0fq2w35fw1lb5wya1nny45pk3a13b689k48calk1cmqmqpbcjn2b"))))
|
| 213 | (build-system cmake-build-system)
|
| 214 | (arguments
|
| 215 | (list
|
| 216 | #:configure-flags
|
| 217 | #~(list
|
| 218 | "-DCPPDAP_BUILD_TESTS=ON"
|
| 219 | "-DCPPDAP_USE_EXTERNAL_GTEST_PACKAGE=ON"
|
| 220 | |
| 221 | |
| 222 | |
| 223 | "-DCPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE=ON")
|
| 224 | #:phases
|
| 225 | (if (target-riscv64?)
|
| 226 | #~(modify-phases %standard-phases
|
| 227 | |
| 228 | |
| 229 | (add-after 'unpack 'link-with-libatomic
|
| 230 | (lambda _
|
| 231 | (substitute* "CMakeLists.txt"
|
| 232 | (("cppdap_set_target_options\\(cppdap\\)" all)
|
| 233 | (string-append
|
| 234 | all "\n\n"
|
| 235 | "target_link_libraries(cppdap PRIVATE atomic)"))))))
|
| 236 | #~%standard-phases)))
|
| 237 | (native-inputs
|
| 238 | (list googletest))
|
| 239 | |
| 240 | |
| 241 | (propagated-inputs
|
| 242 | (list
|
| 243 | |
| 244 | |
| 245 | |
| 246 | nlohmann-json))
|
| 247 | (home-page "https://github.com/google/cppdap")
|
| 248 | (synopsis "C++ library for the Debug Adapter Protocol")
|
| 249 | (description
|
| 250 | "cppdap is a C++11 library (\"SDK\") implementation of the Debug Adapter
|
| 251 | Protocol, providing an API for implementing a DAP client or server. cppdap
|
| 252 | provides C++ type-safe structures for the full DAP specification, and provides a
|
| 253 | simple way to add custom protocol messages.")
|
| 254 | (license license:expat)))
|
| 255 |
|
| 256 | (define-public c-vise
|
| 257 | (package
|
| 258 | (name "c-vise")
|
| 259 | (version "2.4.0")
|
| 260 | (source
|
| 261 | (origin
|
| 262 | (method git-fetch)
|
| 263 | (uri (git-reference
|
| 264 | (url "https://github.com/marxin/cvise")
|
| 265 | (commit (string-append "v" version))))
|
| 266 | (sha256
|
| 267 | (base32 "1i2z5q2pcwh1gpdqc24x1a2q5vzwhblzzq021nzwf304di7m18vl"))
|
| 268 | (file-name (git-file-name name version))))
|
| 269 | (build-system cmake-build-system)
|
| 270 | (native-inputs
|
| 271 | (list flex python-pytest python-pytest-flake8))
|
| 272 | (inputs
|
| 273 | (list bash-minimal clang llvm unifdef
|
| 274 | python python-pebble python-psutil python-chardet))
|
| 275 | (arguments
|
| 276 | `(#:phases
|
| 277 | (modify-phases %standard-phases
|
| 278 | (add-after 'unpack 'fix-linkage
|
| 279 | (lambda _
|
| 280 | (substitute* "clang_delta/CMakeLists.txt"
|
| 281 | (("\\$\\{LLVM_LINK_LLVM_DYLIB\\}") "True")
|
| 282 | ((" LLVM") " LLVMSupport"))))
|
| 283 | (add-before 'build 'hardcode-paths
|
| 284 | (lambda _
|
| 285 | (substitute* "cvise.py"
|
| 286 | (("/bin/bash") (which "bash"))
|
| 287 | (("(.*)# Special case for clang-format" & >)
|
| 288 | (string-append > "# Special case for unifdef\n"
|
| 289 | > "programs['unifdef'] = '" (which "unifdef") "'\n"
|
| 290 | &)))))
|
| 291 | (add-after 'install 'wrap
|
| 292 | (lambda* (#:key outputs #:allow-other-keys)
|
| 293 | (let ((out (assoc-ref outputs "out"))
|
| 294 | (python-path (getenv "GUIX_PYTHONPATH")))
|
| 295 | (wrap-program (string-append out "/bin/cvise")
|
| 296 | `("PYTHONPATH" ":" prefix (,python-path)))
|
| 297 | #t))))))
|
| 298 | (home-page "https://github.com/marxin/cvise")
|
| 299 | (synopsis "Reducer for interesting code")
|
| 300 | (description
|
| 301 | "C-Vise is a Python port of the C-Reduce tool that is fully compatible
|
| 302 | and uses the same efficient LLVM-based C/C++ @code{clang_delta} reduction
|
| 303 | tool.")
|
| 304 | (license license:ncsa)))
|
| 305 |
|
| 306 | (define-public american-fuzzy-lop
|
| 307 | (let ((machine (match (or (%current-target-system)
|
| 308 | (%current-system))
|
| 309 | ("x86_64-linux" "x86_64")
|
| 310 | ("i686-linux" "i386")
|
| 311 | ("aarch64-linux" "aarch64")
|
| 312 | ("armhf-linux" "arm")
|
| 313 | ("mips64el-linux" "mips64el")
|
| 314 | ("powerpc-linux" "ppc")
|
| 315 | |
| 316 | |
| 317 | (_ "UNSUPPORTED"))))
|
| 318 | (package
|
| 319 | (name "american-fuzzy-lop")
|
| 320 | (version "2.57b") |
| 321 | (source
|
| 322 | (origin
|
| 323 | (method git-fetch)
|
| 324 | (uri (git-reference
|
| 325 | (url "https://github.com/google/AFL")
|
| 326 | (commit (string-append "v" version))))
|
| 327 | (sha256
|
| 328 | (base32 "0ks0s8iizp7mpc9mlpv126rsny0dkljfsw68689g9jiisjz2z530"))
|
| 329 | (file-name (git-file-name name version))))
|
| 330 | (build-system gnu-build-system)
|
| 331 | (inputs
|
| 332 | (list qemu-for-american-fuzzy-lop))
|
| 333 | (arguments
|
| 334 | `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
|
| 335 | (string-append "DOC_PATH=$(PREFIX)/share/doc/"
|
| 336 | ,name "-" ,version)
|
| 337 | "CC=gcc")
|
| 338 | #:phases (modify-phases %standard-phases
|
| 339 | (add-after 'unpack 'make-git-checkout-writable
|
| 340 | (lambda _
|
| 341 | (for-each make-file-writable (find-files "."))
|
| 342 | #t))
|
| 343 | (delete 'configure)
|
| 344 | ,@(if (string=? (%current-system) (or "x86_64-linux"
|
| 345 | "i686-linux"))
|
| 346 | '()
|
| 347 | '((add-before 'build 'set-afl-flag
|
| 348 | (lambda _ (setenv "AFL_NO_X86" "1") #t))
|
| 349 | (add-after 'install 'remove-x86-programs
|
| 350 | (lambda* (#:key outputs #:allow-other-keys)
|
| 351 | (let* ((out (assoc-ref outputs "out"))
|
| 352 | (bin (string-append out "/bin/")))
|
| 353 | (delete-file (string-append bin "afl-gcc"))
|
| 354 | (delete-file (string-append bin "afl-g++"))
|
| 355 | (delete-file (string-append bin "afl-clang"))
|
| 356 | (delete-file (string-append bin "afl-clang++")))
|
| 357 | #t))))
|
| 358 | (add-after
|
| 359 | |
| 360 | 'install 'install-qemu
|
| 361 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 362 | (let ((qemu (assoc-ref inputs "qemu"))
|
| 363 | (out (assoc-ref outputs "out")))
|
| 364 | (symlink (string-append qemu "/bin/qemu-" ,machine)
|
| 365 | (string-append out "/bin/afl-qemu-trace"))
|
| 366 | #t)))
|
| 367 | (delete 'check)))) |
| 368 | (home-page "https://lcamtuf.coredump.cx/afl/")
|
| 369 | (synopsis "Security-oriented fuzzer")
|
| 370 | (description
|
| 371 | "American fuzzy lop is a security-oriented fuzzer that employs a novel
|
| 372 | type of compile-time instrumentation and genetic algorithms to automatically
|
| 373 | discover clean, interesting test cases that trigger new internal states in the
|
| 374 | targeted binary. This substantially improves the functional coverage for the
|
| 375 | fuzzed code. The compact synthesized corpora produced by the tool are also
|
| 376 | useful for seeding other, more labor- or resource-intensive testing regimes
|
| 377 | down the road.")
|
| 378 | (license license:asl2.0))))
|
| 379 |
|
| 380 | (define-public qemu-for-american-fuzzy-lop
|
| 381 | |
| 382 | |
| 383 | (let ((machine (match (or (%current-target-system)
|
| 384 | (%current-system))
|
| 385 | ("x86_64-linux" "x86_64")
|
| 386 | ("i686-linux" "i386")
|
| 387 | ("aarch64-linux" "aarch64")
|
| 388 | ("armhf-linux" "arm")
|
| 389 | ("mips64el-linux" "mips64el")
|
| 390 | ("powerpc-linux" "ppc")
|
| 391 | |
| 392 | |
| 393 | (_ "UNSUPPORTED"))))
|
| 394 | (hidden-package
|
| 395 | (package
|
| 396 | (name "qemu")
|
| 397 | (version "2.10.2")
|
| 398 | (source (origin
|
| 399 | (method url-fetch)
|
| 400 | (uri (string-append "https://download.qemu.org/qemu-"
|
| 401 | version ".tar.xz"))
|
| 402 | (sha256
|
| 403 | (base32
|
| 404 | "17w21spvaxaidi2am5lpsln8yjpyp2zi3s3gc6nsxj5arlgamzgw"))
|
| 405 | (patches
|
| 406 | (search-patches "qemu-glibc-2.27.patch"
|
| 407 | "qemu-glibc-2.30.patch"))))
|
| 408 | (build-system gnu-build-system)
|
| 409 | (arguments
|
| 410 | `( |
| 411 | |
| 412 | #:parallel-tests? #f
|
| 413 | #:configure-flags
|
| 414 | (list (string-append "--target-list=" ,machine "-linux-user"))
|
| 415 | #:make-flags '("V=1")
|
| 416 | #:phases
|
| 417 | (modify-phases %standard-phases
|
| 418 | (replace 'configure
|
| 419 | (lambda* (#:key inputs outputs (configure-flags '())
|
| 420 | #:allow-other-keys)
|
| 421 | |
| 422 | |
| 423 | (let ((out (assoc-ref outputs "out")))
|
| 424 | (setenv "SHELL" (which "bash"))
|
| 425 |
|
| 426 | |
| 427 | (substitute* "tests/libqtest.c"
|
| 428 | (("/bin/sh") (which "sh")))
|
| 429 |
|
| 430 | |
| 431 | (setenv "LDFLAGS" "-lrt")
|
| 432 | (apply invoke
|
| 433 | `("./configure"
|
| 434 | ,(string-append "--cc=" (which "gcc"))
|
| 435 | |
| 436 | ,(string-append "--host-cc=" (which "gcc"))
|
| 437 | "--disable-debug-info" |
| 438 | "--enable-virtfs" |
| 439 | ,(string-append "--prefix=" out)
|
| 440 | ,(string-append "--sysconfdir=/etc")
|
| 441 | ,@configure-flags)))))
|
| 442 | (add-after
|
| 443 | 'unpack 'apply-afl-patches
|
| 444 | (lambda* (#:key inputs #:allow-other-keys)
|
| 445 | (let* ((afl-src (assoc-ref inputs "afl-source"))
|
| 446 | (patch-dir "qemu_mode/patches"))
|
| 447 | (copy-recursively (string-append afl-src "/"
|
| 448 | patch-dir)
|
| 449 | patch-dir)
|
| 450 | (install-file
|
| 451 | (string-append patch-dir
|
| 452 | "/afl-qemu-cpu-inl.h")
|
| 453 | ".")
|
| 454 | (copy-file (string-append afl-src "/config.h")
|
| 455 | "./afl-config.h")
|
| 456 | (install-file (string-append afl-src "/types.h")
|
| 457 | ".")
|
| 458 | (substitute* "afl-qemu-cpu-inl.h"
|
| 459 | (("\\.\\./\\.\\./config.h") "afl-config.h"))
|
| 460 | (substitute* (string-append patch-dir
|
| 461 | "/cpu-exec.diff")
|
| 462 | (("\\.\\./patches/") ""))
|
| 463 |
|
| 464 | |
| 465 | (for-each (lambda (obsolete-patch)
|
| 466 | (delete-file (string-append
|
| 467 | patch-dir "/"
|
| 468 | obsolete-patch)))
|
| 469 | (list "configure.diff"
|
| 470 | "memfd.diff"))
|
| 471 |
|
| 472 | (for-each (lambda (patch-file)
|
| 473 | (invoke "patch" "--force" "-p1"
|
| 474 | "--input" patch-file))
|
| 475 | (find-files patch-dir
|
| 476 | "\\.diff$"))
|
| 477 | #t)))
|
| 478 | (add-before 'check 'disable-unusable-tests
|
| 479 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 480 | (substitute* "tests/Makefile.include"
|
| 481 | |
| 482 | |
| 483 | (("check-unit-.* tests/test-qga" all)
|
| 484 | (string-append "# " all)))
|
| 485 | (substitute* "tests/Makefile.include"
|
| 486 | |
| 487 | |
| 488 | (("check-unit-.* tests/test-char" all)
|
| 489 | (string-append "# " all)))
|
| 490 | #t)))))
|
| 491 | (native-inputs
|
| 492 | `(("python-2" ,python-2) |
| 493 | ("glib:bin" ,glib "bin")
|
| 494 | ("perl" ,perl)
|
| 495 | ("flex" ,flex)
|
| 496 | ("bison" ,bison)
|
| 497 | ("pkg-config" ,pkg-config)))
|
| 498 | (inputs
|
| 499 | `(("afl-source" ,(package-source american-fuzzy-lop))
|
| 500 | ("alsa-lib" ,alsa-lib)
|
| 501 | ("attr" ,attr)
|
| 502 | ("glib" ,glib)
|
| 503 | ("libaio" ,libaio)
|
| 504 | ("libattr" ,attr)
|
| 505 | ("libcap" ,libcap)
|
| 506 | ("libjpeg" ,libjpeg-turbo)
|
| 507 | ("libpng" ,libpng)
|
| 508 | ("ncurses" ,ncurses)
|
| 509 | ("pixman" ,pixman)
|
| 510 | ("util-linux" ,util-linux)
|
| 511 | ("zlib" ,zlib)))
|
| 512 | (home-page "https://www.qemu.org")
|
| 513 | (synopsis "Machine emulator and virtualizer (without GUI) for american fuzzy lop")
|
| 514 | (description
|
| 515 | "QEMU is a generic machine emulator and virtualizer. This package
|
| 516 | of QEMU is used only by the american fuzzy lop package.
|
| 517 |
|
| 518 | When used as a machine emulator, QEMU can run OSes and programs made for one
|
| 519 | machine (e.g. an ARM board) on a different machine---e.g., your own PC. By
|
| 520 | using dynamic translation, it achieves very good performance.
|
| 521 |
|
| 522 | When used as a virtualizer, QEMU achieves near native performances by
|
| 523 | executing the guest code directly on the host CPU. QEMU supports
|
| 524 | virtualization when executing under the Xen hypervisor or using
|
| 525 | the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86,
|
| 526 | server and embedded PowerPC, and S390 guests.")
|
| 527 | |
| 528 | (license license:gpl2)
|
| 529 | |
| 530 | (supported-systems (delete "mips64el-linux" %supported-systems))))))
|
| 531 |
|
| 532 | (define-public aflplusplus
|
| 533 | (package
|
| 534 | (inherit american-fuzzy-lop)
|
| 535 | (name "aflplusplus")
|
| 536 | (version "4.33c")
|
| 537 | (source (origin
|
| 538 | (method git-fetch)
|
| 539 | (uri (git-reference
|
| 540 | (url "https://github.com/AFLplusplus/AFLplusplus")
|
| 541 | (commit (string-append "v" version))))
|
| 542 | (file-name (git-file-name name version))
|
| 543 | (sha256
|
| 544 | (base32
|
| 545 | "1h4ya82s1wd11c04r0g0wsq56asl1np3nmsf6yk4vyic9nm0hsq0"))))
|
| 546 | (arguments
|
| 547 | (substitute-keyword-arguments (package-arguments american-fuzzy-lop)
|
| 548 | ((#:make-flags _ ''())
|
| 549 | #~(list (string-append "PREFIX=" #$output)
|
| 550 | (string-append "DOC_PATH=" #$output "/share/doc/"
|
| 551 | #$(package-name this-package) "-"
|
| 552 | #$(package-version this-package))
|
| 553 | (string-append "CC=" #$(cc-for-target))))
|
| 554 | ((#:phases phases '%standard-phases)
|
| 555 | #~(modify-phases #$phases
|
| 556 | |
| 557 | (add-after 'unpack 'patch-gcc-path
|
| 558 | (lambda* (#:key inputs #:allow-other-keys)
|
| 559 | (substitute* "src/afl-cc.c"
|
| 560 | (("alt_cc = \"gcc\";")
|
| 561 | (format #f "alt_cc = \"~a\";"
|
| 562 | (search-input-file inputs "bin/gcc")))
|
| 563 | (("alt_cxx = \"g\\+\\+\";")
|
| 564 | (format #f "alt_cxx = \"~a\";"
|
| 565 | (search-input-file inputs "bin/g++"))))))))))
|
| 566 | |
| 567 | |
| 568 | (inputs (list gcc-11 gmp python qemu))
|
| 569 | (native-inputs (list gcc-11))
|
| 570 | (home-page "https://aflplus.plus/")
|
| 571 | (description
|
| 572 | "AFLplusplus is a security-oriented fuzzer that employs a novel type of
|
| 573 | compile-time instrumentation and genetic algorithms to automatically discover
|
| 574 | clean, interesting test cases that trigger new internal states in the targeted
|
| 575 | binary. This substantially improves the functional coverage for the fuzzed
|
| 576 | code. The compact synthesized corpora produced by the tool are also useful for
|
| 577 | seeding other, more labor- or resource-intensive testing regimes down the road.
|
| 578 | It is a fork of American Fuzzy Lop fuzzer and features:
|
| 579 | @itemize
|
| 580 | @item A more recent qemu version.
|
| 581 | @item More algorithms like collision-free coverage, enhanced laf-intel &
|
| 582 | redqueen, AFLfast++ power schedules, MOpt mutators, unicorn_mode, etc.
|
| 583 | @end itemize")))
|
| 584 |
|
| 585 | (define-public backward-cpp
|
| 586 | (package
|
| 587 | (name "backward-cpp")
|
| 588 | (version "1.6")
|
| 589 | (source (origin
|
| 590 | (method git-fetch)
|
| 591 | (uri (git-reference
|
| 592 | (url "https://github.com/bombela/backward-cpp")
|
| 593 | (commit (string-append "v" version))))
|
| 594 | (file-name (git-file-name name version))
|
| 595 | (sha256
|
| 596 | (base32
|
| 597 | "1b2h03iwfhcsg8i4f125mlrjf8l1y7qsr2gsbkv0z03i067lykns"))))
|
| 598 | (arguments
|
| 599 | (list
|
| 600 | #:configure-flags
|
| 601 | #~(list "-DBACKWARD_SHARED=ON")))
|
| 602 | (build-system cmake-build-system)
|
| 603 | (inputs
|
| 604 | (list libiberty zlib))
|
| 605 | (synopsis "Stack trace pretty printer for C++")
|
| 606 | (description
|
| 607 | "Backward-cpp is a stack trace pretty printer for C++.
|
| 608 | It can print annotated stack traces using debug info in the executable.")
|
| 609 | (home-page "https://github.com/bombela/backward-cpp")
|
| 610 | (license license:expat)))
|
| 611 |
|
| 612 | (define-public stress-make
|
| 613 | (let ((commit "97815bed8060de33952475b3498767c91f59ffd9")
|
| 614 | (revision "2")) |
| 615 | (package
|
| 616 | (name "stress-make")
|
| 617 | (version (git-version "1.0" revision commit))
|
| 618 | (source
|
| 619 | (origin
|
| 620 | (method git-fetch)
|
| 621 | (uri (git-reference
|
| 622 | (url "https://github.com/lanl/stress-make")
|
| 623 | (commit commit)))
|
| 624 | (file-name (git-file-name name version))
|
| 625 | (sha256
|
| 626 | (base32
|
| 627 | "0k55cy7x0hlc6rgpascl6ibhcfxaash3p9r9r8kwvbm3zag1rmac"))))
|
| 628 | (build-system gnu-build-system)
|
| 629 | (native-inputs
|
| 630 | (list autoconf automake go))
|
| 631 | (inputs
|
| 632 | `(("make-source" ,(package-source gnu-make))))
|
| 633 | (arguments
|
| 634 | |
| 635 | |
| 636 | |
| 637 | |
| 638 | (let ((make-dir (string-append "make-" (package-version gnu-make))))
|
| 639 | `(#:configure-flags '("--with-make-tar=./make.tar.xz"
|
| 640 | "make_cv_sys_gnu_glob=yes")
|
| 641 | #:phases
|
| 642 | (modify-phases %standard-phases
|
| 643 | (add-after 'unpack 'unpack-make
|
| 644 | (lambda* (#:key inputs #:allow-other-keys)
|
| 645 | (invoke "tar" "xf" (assoc-ref inputs "make-source"))))
|
| 646 | (add-after 'unpack-make 'set-default-shell
|
| 647 | (lambda _
|
| 648 | |
| 649 | (substitute* (string-append ,make-dir "/src/job.c")
|
| 650 | (("default_shell = .*$")
|
| 651 | (format #f "default_shell = \"~a\";\n"
|
| 652 | (which "sh"))))))
|
| 653 | (add-before 'configure 'repack-make
|
| 654 | (lambda _
|
| 655 | (invoke "tar" "cJf" "./make.tar.xz" ,make-dir)))
|
| 656 | (add-before 'build 'setup-go
|
| 657 | |
| 658 | |
| 659 | (lambda _ (setenv "GOCACHE" "/tmp/go-cache") #t))))))
|
| 660 | (home-page "https://github.com/lanl/stress-make")
|
| 661 | (synopsis "Expose race conditions in Makefiles")
|
| 662 | (description
|
| 663 | "Stress Make is a customized GNU Make that explicitly manages the order
|
| 664 | in which concurrent jobs are run to provoke erroneous behavior into becoming
|
| 665 | manifest. It can run jobs in the order in which they're launched, in backwards
|
| 666 | order, or in random order. The thought is that if code builds correctly with
|
| 667 | Stress Make, then it is likely that the @code{Makefile} contains no race
|
| 668 | conditions.")
|
| 669 | |
| 670 | |
| 671 | (license (list (license:non-copyleft "LICENSE.md")
|
| 672 | license:gpl3+)))))
|
| 673 |
|
| 674 | (define-public zzuf
|
| 675 | (package
|
| 676 | (name "zzuf")
|
| 677 | (version "0.15")
|
| 678 | (source
|
| 679 | (origin
|
| 680 | (method url-fetch)
|
| 681 | (uri (string-append
|
| 682 | "https://github.com/samhocevar/zzuf/releases/download/v"
|
| 683 | version "/" name "-" version ".tar.gz"))
|
| 684 | (file-name (string-append name "-" version ".tar.gz"))
|
| 685 | (sha256
|
| 686 | (base32
|
| 687 | "1mpzjaksc2qg2hzqflf39pl06p53qam2dn3hkhkcv6p00d2n4kx3"))))
|
| 688 | (build-system gnu-build-system)
|
| 689 | (native-inputs (list gcc-13))
|
| 690 | (home-page "https://github.com/samhocevar/zzuf")
|
| 691 | (synopsis "Transparent application input fuzzer")
|
| 692 | (description "Zzuf is a transparent application input fuzzer. It works by
|
| 693 | intercepting file operations and changing random bits in the program's
|
| 694 | input. Zzuf's behaviour is deterministic, making it easy to reproduce bugs.")
|
| 695 | (license license:wtfpl2)))
|
| 696 |
|
| 697 | (define-public scanmem
|
| 698 | (package
|
| 699 | (name "scanmem")
|
| 700 | (version "0.17")
|
| 701 | (source
|
| 702 | (origin
|
| 703 | (method git-fetch)
|
| 704 | (uri (git-reference
|
| 705 | (url "https://github.com/scanmem/scanmem")
|
| 706 | (commit (string-append "v" version))))
|
| 707 | (file-name (git-file-name name version))
|
| 708 | (sha256
|
| 709 | (base32
|
| 710 | "17p8sh0rj8yqz36ria5bp48c8523zzw3y9g8sbm2jwq7sc27i7s9"))))
|
| 711 | (build-system gnu-build-system)
|
| 712 | (arguments
|
| 713 | `(#:configure-flags '("--enable-gui")
|
| 714 | #:phases
|
| 715 | (modify-phases %standard-phases
|
| 716 | (add-before 'configure 'hardcode-python
|
| 717 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 718 | (substitute* "gui/GameConqueror.py"
|
| 719 | (("/usr/bin/env python")
|
| 720 | (search-input-file inputs "/bin/python")))))
|
| 721 | (add-after 'install 'wrap-gameconqueror
|
| 722 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 723 | (let ((out (assoc-ref outputs "out"))
|
| 724 | (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
|
| 725 | (python-path (getenv "GUIX_PYTHONPATH")))
|
| 726 | (wrap-program (string-append out "/share/gameconqueror/GameConqueror.py")
|
| 727 | `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
|
| 728 | `("GUIX_PYTHONPATH" ":" prefix (,python-path))))
|
| 729 | #t)))))
|
| 730 | (native-inputs
|
| 731 | (list libtool
|
| 732 | python-wrapper
|
| 733 | gobject-introspection
|
| 734 | gtk+
|
| 735 | intltool
|
| 736 | automake
|
| 737 | autoconf))
|
| 738 | (inputs
|
| 739 | (list bash-minimal
|
| 740 | readline))
|
| 741 | (propagated-inputs
|
| 742 | (list python-pygobject))
|
| 743 | (home-page "https://github.com/scanmem/scanmem")
|
| 744 | (synopsis "Memory scanner")
|
| 745 | (description "Scanmem is a debugging utility designed to isolate the
|
| 746 | address of an arbitrary variable in an executing process. Scanmem simply
|
| 747 | needs to be told the pid of the process and the value of the variable at
|
| 748 | several different times. After several scans of the process, scanmem isolates
|
| 749 | the position of the variable and allows you to modify its value.")
|
| 750 | |
| 751 | |
| 752 | (license (list license:lgpl3+ license:gpl3+))))
|
| 753 |
|
| 754 | (define-public remake
|
| 755 | (package (inherit gnu-make)
|
| 756 | (name "remake")
|
| 757 | (version "4.3-1.6")
|
| 758 | (source (origin
|
| 759 | (method url-fetch)
|
| 760 | (uri (let ((upstream-version
|
| 761 | (match (string-split version #\-)
|
| 762 | ((ver sub) (string-append ver "%2Bdbg-" sub)))))
|
| 763 | (string-append "mirror://sourceforge/bashdb/"
|
| 764 | "remake/" upstream-version "/"
|
| 765 | "remake-" upstream-version ".tar.gz")))
|
| 766 | (file-name (string-append "remake-" version ".tar.gz"))
|
| 767 | (sha256
|
| 768 | (base32
|
| 769 | "11vvch8bi0yhjfz7gn92b3xmmm0cgi3qfiyhbnnj89frkhbwd87n"))
|
| 770 | (patches (search-patches "remake-impure-dirs.patch"))))
|
| 771 | (inputs
|
| 772 | (modify-inputs (package-inputs gnu-make)
|
| 773 | (prepend readline)))
|
| 774 | (home-page "https://bashdb.sourceforge.net/remake/")
|
| 775 | (description "Remake is an enhanced version of GNU Make that adds improved
|
| 776 | error reporting, better tracing, profiling, and a debugger.")
|
| 777 | (license license:gpl3+)))
|
| 778 |
|
| 779 | (define-public rr
|
| 780 | |
| 781 | |
| 782 | (let ((commit "7fe1e367c2b4e0df7647e020c20d66827badfad3")
|
| 783 | (revision "0"))
|
| 784 | (package
|
| 785 | (name "rr")
|
| 786 | (version (git-version "5.9.0" revision commit))
|
| 787 | (source (origin
|
| 788 | (method git-fetch)
|
| 789 | (uri (git-reference
|
| 790 | (url "https://github.com/mozilla/rr")
|
| 791 | (commit commit)))
|
| 792 | (sha256
|
| 793 | (base32
|
| 794 | "1zgxk4blwwq0bigi0g8dafgl330aid3kw9ym426825flc3pp1c3m"))
|
| 795 | (file-name (git-file-name name version))))
|
| 796 | (build-system cmake-build-system)
|
| 797 | (arguments
|
| 798 | `(#:configure-flags
|
| 799 | |
| 800 | |
| 801 | |
| 802 | (list "-DCMAKE_INSTALL_RPATH="
|
| 803 | |
| 804 | |
| 805 | (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
|
| 806 | (assoc-ref %build-inputs "capnproto")
|
| 807 | "/lib,-rpath=" (assoc-ref %build-inputs "zlib")
|
| 808 | "/lib,-rpath=" (assoc-ref %build-inputs "zstd")
|
| 809 | "/lib")
|
| 810 | ,@(if (and (not (%current-target-system))
|
| 811 | (member (%current-system)
|
| 812 | '("x86_64-linux" "aarch64-linux")))
|
| 813 | |
| 814 | '("-Ddisable32bit=ON")
|
| 815 | '()))
|
| 816 |
|
| 817 | |
| 818 | |
| 819 | |
| 820 | |
| 821 | |
| 822 | |
| 823 | #:tests? #f
|
| 824 |
|
| 825 | #:phases (modify-phases %standard-phases
|
| 826 | (add-before 'check 'set-home
|
| 827 | (lambda _
|
| 828 | |
| 829 | (setenv "HOME" (getcwd)))))))
|
| 830 | (native-inputs
|
| 831 | (list lldb pkg-config which))
|
| 832 | (inputs
|
| 833 | (list gdb
|
| 834 | capnproto
|
| 835 | python
|
| 836 | python-pexpect
|
| 837 | zlib
|
| 838 | `(,zstd "lib")))
|
| 839 |
|
| 840 | |
| 841 | (supported-systems '("x86_64-linux" "i686-linux" "aarch64-linux"))
|
| 842 |
|
| 843 | (home-page "https://rr-project.org/")
|
| 844 | (synopsis "Record and replay debugging framework")
|
| 845 | (description
|
| 846 | "rr is a lightweight tool for recording, replaying and debugging
|
| 847 | execution of applications (trees of processes and threads). Debugging extends
|
| 848 | GDB with very efficient reverse-execution, which in combination with standard
|
| 849 | GDB/x86 features like hardware data watchpoints, makes debugging much more
|
| 850 | fun.")
|
| 851 | (license license:expat))))
|
| 852 |
|
| 853 | (define-public rr-zen-pmu-workaround
|
| 854 | (package
|
| 855 | (name "rr-zen-pmu-workaround")
|
| 856 | (version (package-version rr))
|
| 857 | (source (package-source rr))
|
| 858 | (build-system linux-module-build-system)
|
| 859 | (arguments
|
| 860 | (list
|
| 861 | #:tests? #f |
| 862 | #:phases
|
| 863 | #~(modify-phases %standard-phases
|
| 864 | (add-after 'unpack 'cd
|
| 865 | (lambda _
|
| 866 | (chdir "third-party/zen-pmu-workaround"))))))
|
| 867 | (home-page "https://github.com/rr-debugger/rr/wiki/Zen")
|
| 868 | (synopsis "AMD Zen workaround kernel module for rr")
|
| 869 | (description "This is a Linux kernel module that implements
|
| 870 | workarounds needed for using the @command{rr} debugger with AMD Zen
|
| 871 | @acronym{CPU, Central Processing Unit}.")
|
| 872 | (license license:gpl2))) |
| 873 |
|
| 874 | (define-public libbacktrace
|
| 875 | |
| 876 | (let ((revision "2")
|
| 877 | (commit "cdb64b688dda93bbbacbc2b1ccf50ce9329d4748"))
|
| 878 | (package
|
| 879 | (name "libbacktrace")
|
| 880 | (version (git-version "1.0" revision commit))
|
| 881 | (source (origin
|
| 882 | (method git-fetch)
|
| 883 | (uri (git-reference
|
| 884 | (url "https://github.com/ianlancetaylor/libbacktrace")
|
| 885 | (commit commit)))
|
| 886 | (file-name (git-file-name name version))
|
| 887 | (sha256
|
| 888 | (base32
|
| 889 | "0iwd41pgr2nxlmghqdfwfwxac27jbqxwxp07jihhq85a8s3igjgr"))))
|
| 890 | (build-system gnu-build-system)
|
| 891 | (arguments
|
| 892 | `(#:parallel-tests? #f |
| 893 | #:make-flags '("CFLAGS=-fPIC")))
|
| 894 | (home-page "https://github.com/ianlancetaylor/libbacktrace")
|
| 895 | (synopsis "C library for producing symbolic backtraces")
|
| 896 | (description "The @code{libbacktrace} library can be linked into a C/C++
|
| 897 | program to produce symbolic backtraces.")
|
| 898 | (license license:bsd-3))))
|
| 899 |
|
| 900 | (define-public libleak
|
| 901 | (package
|
| 902 | (name "libleak")
|
| 903 | (version "0.3.6")
|
| 904 | (source (origin
|
| 905 | (method git-fetch)
|
| 906 | (uri (git-reference
|
| 907 | (url "https://github.com/WuBingzheng/libleak")
|
| 908 | (commit (string-append "v" version))))
|
| 909 | (file-name (git-file-name name version))
|
| 910 | (sha256
|
| 911 | (base32
|
| 912 | "1p6x20mm0dym2qn10d6cvwmh71m93xwcd319g94zkv88hj5q17n6"))))
|
| 913 | (build-system gnu-build-system)
|
| 914 | (arguments
|
| 915 | `(#:tests? #f |
| 916 | #:parallel-build? #f |
| 917 | #:phases (modify-phases %standard-phases
|
| 918 | (add-after 'unpack 'unbundle-libwuya
|
| 919 | (lambda _
|
| 920 | (substitute* "Makefile"
|
| 921 | ((".*make -C libwuya.*") ""))
|
| 922 | #t))
|
| 923 | (add-before 'build 'set-CC
|
| 924 | (lambda _
|
| 925 | (setenv "CC" "gcc")
|
| 926 | #t))
|
| 927 | (delete 'configure) |
| 928 | (replace 'install
|
| 929 | (lambda* (#:key outputs #:allow-other-keys)
|
| 930 | (let* ((out (assoc-ref outputs "out")))
|
| 931 | (install-file "libleak.so" (string-append out "/lib"))
|
| 932 | #t))))))
|
| 933 | (inputs (list libbacktrace libwuya))
|
| 934 | (home-page "https://github.com/WuBingzheng/libleak")
|
| 935 | (synopsis "Memory leaks detection tool")
|
| 936 | (description "The libleak tool detects memory leaks by hooking memory
|
| 937 | functions such as @code{malloc}. It comes as a shared object to be pre-loaded
|
| 938 | via @code{LD_PRELOAD} when launching the application. It prints the full call
|
| 939 | stack at suspicious memory leak points. Modifying or recompiling the target
|
| 940 | program is not required, and the detection can be enabled or disabled while
|
| 941 | the target application is running. The overhead incurred by libleak is
|
| 942 | smaller than that of other tools such as Valgrind, and it aims to be easier to
|
| 943 | use than similar tools like @command{mtrace}.")
|
| 944 | (license license:gpl2+)))
|
| 945 |
|
| 946 | (define-public cgdb
|
| 947 | (package
|
| 948 | (name "cgdb")
|
| 949 | (version "0.8.0")
|
| 950 | (source
|
| 951 | (origin
|
| 952 | (method url-fetch)
|
| 953 | (uri (string-append "https://cgdb.me/files/cgdb-" version ".tar.gz"))
|
| 954 | (sha256
|
| 955 | (base32 "1w8ib2vg3pg68d9hh97fw5042c73i9nqavdddc87n9bpscjbaf0d"))))
|
| 956 | (build-system gnu-build-system)
|
| 957 | (inputs
|
| 958 | (list bash-minimal ncurses readline gdb))
|
| 959 | (native-inputs
|
| 960 | (list flex texinfo))
|
| 961 | (arguments
|
| 962 | `(#:configure-flags
|
| 963 | (list
|
| 964 | (string-append "ac_cv_rl_version=" ,(package-version readline))
|
| 965 | "ac_cv_file__dev_ptmx=no"
|
| 966 | "ac_cv_file__proc_self_status=no"
|
| 967 | "ac_cv_func_setpgrp_void=no")
|
| 968 | #:phases
|
| 969 | (modify-phases %standard-phases
|
| 970 | (add-after 'unpack 'fix-paths
|
| 971 | (lambda* (#:key inputs #:allow-other-keys)
|
| 972 | (let ((gdb (search-input-file inputs "bin/gdb"))
|
| 973 | (sh (search-input-file inputs "bin/sh")))
|
| 974 | (substitute* "lib/util/fork_util.cpp"
|
| 975 | (("GDB = \"gdb\"") (string-append "GDB = \"" gdb "\"")))
|
| 976 | (substitute* "cgdb/cgdb.cpp" (("/bin/sh") sh))))))))
|
| 977 | (home-page "https://cgdb.github.io")
|
| 978 | (synopsis "Console front-end to the GNU debugger")
|
| 979 | (description
|
| 980 | "@code{cgdb} is a lightweight curses (terminal-based) interface to the
|
| 981 | GNU Debugger (GDB). In addition to the standard gdb console, cgdb provides
|
| 982 | a split screen view that displays the source code as it executes. The
|
| 983 | keyboard interface is modeled after vim, so vim users should feel at home
|
| 984 | using cgdb.")
|
| 985 | (license license:gpl2+)))
|
| 986 |
|
| 987 | (define-public mspdebug
|
| 988 | |
| 989 | (let ((commit "4c4d94e43bc4a18ecf82070ff81cd38dd5641e3b")
|
| 990 | (revision "0"))
|
| 991 | (package
|
| 992 | (name "mspdebug")
|
| 993 | (version (git-version "0.25" revision commit))
|
| 994 | (source (origin
|
| 995 | (method git-fetch)
|
| 996 | (uri (git-reference
|
| 997 | (url "https://github.com/dlbeer/mspdebug")
|
| 998 | (commit commit)))
|
| 999 | (file-name (git-file-name name version))
|
| 1000 | (sha256
|
| 1001 | (base32 "1lgw1dsc1aglyja610ichadvgs5b0df3wlarinczb0ykf431gjln"))))
|
| 1002 | (build-system gnu-build-system)
|
| 1003 | (arguments
|
| 1004 | `(#:tests? #f |
| 1005 | #:phases
|
| 1006 | (modify-phases %standard-phases
|
| 1007 | (delete 'configure)) |
| 1008 | #:make-flags
|
| 1009 | (list (string-append "CC=" ,(cc-for-target))
|
| 1010 | "INSTALL=install"
|
| 1011 | (string-append "PREFIX=" %output))))
|
| 1012 | (inputs
|
| 1013 | (list libusb-compat readline))
|
| 1014 | (synopsis "Debugging tool for MSP430 MCUs")
|
| 1015 | (description "MspDebug supports FET430UIF, eZ430, RF2500 and Olimex
|
| 1016 | MSP430-JTAG-TINY programmers, as well as many other compatible
|
| 1017 | devices. It can be used as a proxy for gdb or as an independent
|
| 1018 | debugger with support for programming, disassembly and reverse
|
| 1019 | engineering.")
|
| 1020 | (home-page "https://github.com/dlbeer/mspdebug")
|
| 1021 | (license license:gpl2+))))
|
| 1022 |
|
| 1023 | (define-public seer-gdb
|
| 1024 | (package
|
| 1025 | (name "seer-gdb")
|
| 1026 | (version "1.16")
|
| 1027 | (source (origin
|
| 1028 | (method git-fetch)
|
| 1029 | (uri (git-reference
|
| 1030 | (url "https://github.com/epasveer/seer.git")
|
| 1031 | (commit (string-append "v" version))))
|
| 1032 | (file-name (string-append name "-" version "-checkout"))
|
| 1033 | (sha256
|
| 1034 | (base32
|
| 1035 | "0jdvyg2jab1pvf36pvkyrfsg2wyy8zp1qx0v2ksclgrnr1hja6k6"))))
|
| 1036 | (build-system qt-build-system)
|
| 1037 | (arguments
|
| 1038 | `(#:tests? #f |
| 1039 | #:phases
|
| 1040 | (modify-phases %standard-phases
|
| 1041 | (add-after 'unpack 'chdir
|
| 1042 | (lambda _
|
| 1043 | (chdir "src"))))))
|
| 1044 | (inputs
|
| 1045 | (list qtbase-5 qtcharts-5 qtwayland-5))
|
| 1046 | (synopsis "GUI frontend for GDB")
|
| 1047 | (description "This package provides a frontend to GDB, the GNU debugger.")
|
| 1048 | (home-page "https://github.com/epasveer/seer")
|
| 1049 | |
| 1050 | (license license:gpl3+)))
|
| 1051 |
|
| 1052 | (define-public ddd
|
| 1053 | (package
|
| 1054 | (name "ddd")
|
| 1055 | (version "3.4.1")
|
| 1056 | (source (origin
|
| 1057 | (method url-fetch)
|
| 1058 | (uri (string-append "mirror://gnu/ddd/ddd-" version ".tar.gz"))
|
| 1059 | (patches (search-patches "ddd-build.patch"))
|
| 1060 | (sha256
|
| 1061 | (base32
|
| 1062 | "12gfyh139rim49m56lxm36ckdyiiz4n3la3y6ik1aqgrqfk1fxdq"))))
|
| 1063 | (build-system gnu-build-system)
|
| 1064 | (arguments
|
| 1065 | (list #:tests? #f |
| 1066 | #:configure-flags
|
| 1067 | #~(list (string-append "--with-freetype-includes="
|
| 1068 | #$(this-package-input "freetype") "/include/freetype2"))))
|
| 1069 | (native-inputs
|
| 1070 | (list pkg-config bison flex perl))
|
| 1071 | (inputs
|
| 1072 | (list libxaw libxft freetype motif ncurses gdb))
|
| 1073 | (synopsis "Graphical front-end for GDB and other debuggers")
|
| 1074 | (description "GNU DDD, the Data Display Debugger, is a graphical front-end
|
| 1075 | for command-line debuggers. Many back-end debuggers are supported, notably
|
| 1076 | the GNU debugger, GDB. In addition to usual debugging features such as
|
| 1077 | viewing the source files, DDD has additional graphical, interactive features
|
| 1078 | to aid in debugging.")
|
| 1079 | (home-page "https://www.gnu.org/software/ddd/")
|
| 1080 | (license license:gpl3+)))
|
| 1081 |
|
| 1082 | (define-public delve
|
| 1083 | (package
|
| 1084 | (name "delve")
|
| 1085 | (version "1.25.2")
|
| 1086 | (source
|
| 1087 | (origin
|
| 1088 | (method git-fetch)
|
| 1089 | (uri (git-reference
|
| 1090 | (url "https://github.com/go-delve/delve")
|
| 1091 | (commit (string-append "v" version))))
|
| 1092 | (file-name (git-file-name name version))
|
| 1093 | (sha256
|
| 1094 | (base32
|
| 1095 | "1b6vp6m4vjx4wfs1djhpizvz40s563jwld9lgjq82svaiilrmlqa"))
|
| 1096 | (snippet
|
| 1097 | #~(begin (use-modules (guix build utils))
|
| 1098 | (delete-file-recursively "vendor")))))
|
| 1099 | (build-system go-build-system)
|
| 1100 | (arguments
|
| 1101 | (list
|
| 1102 | #:install-source? #f
|
| 1103 | #:import-path "github.com/go-delve/delve/cmd/dlv"
|
| 1104 | #:unpack-path "github.com/go-delve/delve"
|
| 1105 | |
| 1106 | |
| 1107 | |
| 1108 | #:test-flags #~(list "-skip" "TestVersion|TestDeadcodeEliminated")))
|
| 1109 | (native-inputs
|
| 1110 | (list go-github-com-cilium-ebpf
|
| 1111 | go-github-com-cosiner-argv
|
| 1112 | go-github-com-creack-pty
|
| 1113 | go-github-com-derekparker-trie
|
| 1114 | go-github-com-go-delve-liner
|
| 1115 | go-github-com-google-go-dap
|
| 1116 | go-github-com-hashicorp-golang-lru
|
| 1117 | go-github-com-mattn-go-colorable
|
| 1118 | go-github-com-mattn-go-isatty
|
| 1119 | go-github-com-spf13-cobra
|
| 1120 | go-github-com-spf13-pflag
|
| 1121 | go-go-starlark-net
|
| 1122 | go-golang-org-x-arch
|
| 1123 | go-golang-org-x-sys
|
| 1124 | go-golang-org-x-telemetry
|
| 1125 | go-golang-org-x-tools
|
| 1126 | go-gopkg-in-yaml-v3))
|
| 1127 | (home-page "https://github.com/go-delve/delve")
|
| 1128 | (synopsis "Debugger for the Go programming language")
|
| 1129 | (description "Delve is a debugger for the Go programming language.")
|
| 1130 | (license license:expat)))
|
| 1131 |
|
| 1132 | (define-public fiu
|
| 1133 | (package
|
| 1134 | (name "fiu")
|
| 1135 | (version "1.2")
|
| 1136 | (source
|
| 1137 | (origin
|
| 1138 | (method url-fetch)
|
| 1139 | (uri (string-append "https://blitiri.com.ar/p/libfiu/files/"
|
| 1140 | version "/libfiu-" version ".tar.gz"))
|
| 1141 | (sha256
|
| 1142 | (base32 "0x4ncvi6sv22rqi9x61byybpmch0z1zvpr6p48axkk890ysv6fim"))))
|
| 1143 | (build-system gnu-build-system)
|
| 1144 | (arguments
|
| 1145 | (list #:make-flags #~(list (string-append "PREFIX=" #$output)
|
| 1146 | (string-append "CC=" #$(cc-for-target))
|
| 1147 | (string-append "LDFLAGS=-Wl,-rpath="
|
| 1148 | #$output "/lib"))
|
| 1149 | #:phases #~(modify-phases %standard-phases
|
| 1150 | (delete 'configure)
|
| 1151 | (add-before 'check 'set-env
|
| 1152 | |
| 1153 | (lambda _ (setenv "TMPDIR" "/tmp"))))
|
| 1154 | #:test-target "test"))
|
| 1155 | (native-inputs (list python)) |
| 1156 | (synopsis "Fault injector in userspace")
|
| 1157 | (description "Fiu provides CLI utilities and a C library
|
| 1158 | to mark points of failure inside your code
|
| 1159 | and to enable/disable the failure of those points.")
|
| 1160 | (home-page "https://blitiri.com.ar/p/libfiu")
|
| 1161 | (license license:public-domain)))
|
| 1162 |
|
| 1163 | (define-public python-fiu
|
| 1164 | (package
|
| 1165 | (name "python-fiu")
|
| 1166 | (version "1.2")
|
| 1167 | (source (package-source fiu))
|
| 1168 | (build-system pyproject-build-system)
|
| 1169 | (arguments
|
| 1170 | (list #:phases #~(modify-phases %standard-phases
|
| 1171 | (add-after 'unpack 'enter-python-dir
|
| 1172 | (lambda _ (chdir "bindings/python")))
|
| 1173 | (add-before 'build 'set-env
|
| 1174 | (lambda* (#:key inputs #:allow-other-keys)
|
| 1175 | (setenv "PLIBPATH"
|
| 1176 | (string-append (assoc-ref inputs "fiu")
|
| 1177 | "/lib")))))
|
| 1178 | #:tests? #f)) |
| 1179 | (native-inputs (list python-setuptools python-wheel))
|
| 1180 | (inputs (list fiu))
|
| 1181 | (synopsis "Python binding for fiu (fault injection in userspace)")
|
| 1182 | (description "This package includes two Python modules:
|
| 1183 | @enumerate
|
| 1184 | @item @code{fiu} is a wrapper for @code{libfiu}, the fault injection C library.
|
| 1185 | @item @code{fiu_ctrl} provide an easy way run a command
|
| 1186 | with @code{libfiu} enabled, and controlling the failure points dynamically.
|
| 1187 | @end enumerate")
|
| 1188 | (home-page (package-home-page fiu))
|
| 1189 | (license (package-license fiu))))
|