summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2022-06-19 08:43:00 +0200
committerJulien Lepiller <julien@lepiller.eu>2022-06-28 19:34:50 +0200
commit404df667e3b06f1e9a416c956e53c03ca3642140 (patch)
tree129b7573c5a17d43976419cecaa2af7026849a22
parent0d5c88737bcdde05511080359c7a5bdf963eec6a (diff)
downloadguix-404df667e3b06f1e9a416c956e53c03ca3642140.tar.gz
guix-404df667e3b06f1e9a416c956e53c03ca3642140.tar.xz
gnu: bap: Update to 2.5.0-alpha.
* gnu/packages/ocaml.scm (bap): Update to 2.5.0-alpha.
-rw-r--r--gnu/packages/ocaml.scm104
1 files changed, 55 insertions, 49 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 59a883b400..06fee0ed59 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4074,7 +4074,7 @@ necessary set of rewriters.")
(define-public bap
(package
(name "bap")
- (version "2.0.0")
+ (version "2.5.0-alpha")
(home-page "https://github.com/BinaryAnalysisPlatform/bap")
(source (origin
(method git-fetch)
@@ -4084,58 +4084,64 @@ necessary set of rewriters.")
(file-name (git-file-name name version))
(sha256
(base32
- "0lb9xkfp67wjjqr75p6krivmjra7l5673236v9ny4gp0xi0755bk"))))
+ "1fw9pp0xnssc08qqfkcafffap4f46hw7zmk80gif5yc4nazga8w5"))))
(build-system ocaml-build-system)
- (native-inputs
- `(("ocaml-oasis" ,(package-with-ocaml4.07 ocaml-oasis))
- ("clang" ,clang-3.8)
- ("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))))
- (propagated-inputs
- `(("camlzip" ,(package-with-ocaml4.07 camlzip))
- ("ocaml-bitstring" ,(package-with-ocaml4.07 ocaml-bitstring))
- ("ocaml-cmdliner" ,(package-with-ocaml4.07 ocaml-cmdliner))
- ("ocaml-core-kernel" ,ocaml4.07-core-kernel)
- ("ocaml-ezjsonm" ,(package-with-ocaml4.07 ocaml-ezjsonm))
- ("ocaml-fileutils" ,(package-with-ocaml4.07 ocaml-fileutils))
- ("ocaml-frontc" ,(package-with-ocaml4.07 ocaml-frontc))
- ("ocaml-graph" ,(package-with-ocaml4.07 ocaml-graph))
- ("ocaml-ocurl" ,(package-with-ocaml4.07 ocaml-ocurl))
- ("ocaml-piqi" ,(package-with-ocaml4.07 ocaml-piqi))
- ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
- ("ocaml-utop" ,ocaml4.07-utop)
- ("ocaml-uuidm" ,(package-with-ocaml4.07 ocaml-uuidm))
- ("ocaml-uri" ,ocaml4.07-uri)
- ("ocaml-zarith" ,(package-with-ocaml4.07 ocaml-zarith))))
- (inputs
- (list gmp llvm-3.8 ncurses))
(arguments
- `(#:use-make? #t
+ (list
+ #:use-make? #t
#:phases
- (modify-phases %standard-phases
- (add-before 'configure 'fix-ncurses
- (lambda _
- (substitute* "oasis/llvm"
- (("-lcurses") "-lncurses"))
- #t))
- (replace 'configure
- (lambda* (#:key outputs inputs #:allow-other-keys)
- ;; add write for user, to prevent a failure in the install phase
- (for-each
- (lambda (file)
- (let ((stat (stat file)))
- (chmod file (+ #o200 (stat:mode stat)))))
- (find-files "." "."))
- (invoke "./configure" "--prefix"
- (assoc-ref outputs "out")
- "--libdir"
- (string-append
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'fix-ncurses
+ (lambda _
+ (substitute* "oasis/llvm"
+ (("-lcurses") "-lncurses"))
+ #t))
+ (replace 'configure
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (for-each make-file-writable (find-files "." "."))
+ ;; Package name changed
+ (substitute* "oasis/elf-loader"
+ (("bitstring.ppx") "ppx_bitstring"))
+ ;; We don't have a monolithic llvm
+ (substitute* "oasis/llvm.setup.ml.in"
+ (("llvm_static = \"true\"") "true"))
+ (invoke "./configure" "--prefix"
(assoc-ref outputs "out")
- "/lib/ocaml/site-lib")
- "--with-llvm-version=3.8"
- "--with-llvm-config=llvm-config"
- "--enable-everything"))))
- #:ocaml ,ocaml-4.07
- #:findlib ,ocaml4.07-findlib))
+ "--libdir"
+ (string-append
+ (assoc-ref outputs "out")
+ "/lib/ocaml/site-lib")
+ (string-append "--with-llvm-version=" #$(package-version llvm))
+ "--with-llvm-config=llvm-config"
+ "--disable-ghidra"
+ "--disable-llvm-static"
+ "--enable-llvm"
+ "--enable-everything"))))))
+ (native-inputs (list clang ocaml-oasis ocaml-ounit))
+ (propagated-inputs
+ (list
+ camlzip
+ ocaml-bitstring
+ ocaml-cmdliner
+ ocaml-core-kernel
+ ocaml-ezjsonm
+ ocaml-fileutils
+ ocaml-frontc
+ ocaml-graph
+ ocaml-linenoise
+ ocaml-ocurl
+ ocaml-piqi
+ ocaml-ppx-bap
+ ocaml-ppx-bitstring
+ ocaml-re
+ ocaml-uri
+ ocaml-utop
+ ocaml-uuidm
+ ocaml-yojson
+ ocaml-z3
+ ocaml-zarith))
+ (inputs
+ (list gmp llvm ncurses))
(synopsis "Binary Analysis Platform")
(description "Binary Analysis Platform is a framework for writing program
analysis tools, that target binary files. The framework consists of a plethora