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