diff options
Diffstat (limited to 'gnu/packages/engineering.scm')
-rw-r--r-- | gnu/packages/engineering.scm | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 3ceeb4425a..1979c0dc71 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -97,6 +97,7 @@ #:use-module (gnu packages digest) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) + #:use-module (gnu packages elf) #:use-module (gnu packages file) #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) @@ -167,6 +168,7 @@ #:use-module (gnu packages toolkits) #:use-module (gnu packages tree-sitter) #:use-module (gnu packages version-control) + #:use-module (gnu packages vim) #:use-module (gnu packages web) #:use-module (gnu packages wxwidgets) #:use-module (gnu packages xdisorg) @@ -1997,6 +1999,71 @@ and a fallback for environments without libc for Zydis.") @end itemize") (license license:expat))) +(define-public e9patch + (let ((commit "b4e7175abb8bd49ebbb6d09c7057aa43ddacac10") + (revision "0")) + (package + (name "e9patch") + (version (git-version "1.0.0-dev" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/GJDuck/e9patch") + (commit commit))) + (sha256 + (base32 + "0a9s7h43ryyl4bvn0sid0dq78v24bnbcf271smj1a8wvffsih0jy")) + (file-name (git-file-name name version)) + (patches (search-patches + ;; https://github.com/GJDuck/e9patch/pull/94 + "e9patch-devendor.patch" + ;; https://github.com/GJDuck/e9patch/pull/99 + "e9patch-plugin-api-headers.patch" + ;; https://github.com/GJDuck/e9patch/pull/92 + "e9patch-check.patch" + ;; https://github.com/GJDuck/e9patch/pull/95 + "e9patch-check-intel-format.patch" + ;; https://github.com/GJDuck/e9patch/pull/88 + "e9patch-check-mode.patch" + ;; https://github.com/GJDuck/e9patch/pull/93 + "e9patch-check-mov-imm.patch" + ;; https://github.com/GJDuck/e9patch/issues/96 + "e9patch-check-rflags.patch" + ;; https://github.com/GJDuck/e9patch/pull/97 + "e9patch-check-same_op_2.patch")))) + (build-system gnu-build-system) + (arguments (list #:modules `((ice-9 string-fun) ; string-replace-substring + ,@%default-gnu-modules) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-prefix + (lambda _ + (substitute* "Makefile" + ;; https://github.com/GJDuck/e9patch/pull/87 + (("\\\\/usr") + (string-replace-substring #$output "/" "\\/")) + (("/usr") #$output)))) + (delete 'configure)))) + (native-inputs (list markdown xxd)) + (inputs (list elfutils zycore zydis zlib)) + (home-page "https://github.com/GJDuck/e9patch") + (synopsis "Static binary rewriting tool") + (description + "E9Patch is a static binary rewriting tool for x86-64 ELF binaries. +E9Patch is: +@itemize +@item Scalable: E9Patch can reliably rewrite large/complex binaries + including web browsers (>100MB in size). +@item Compatible: The rewritten binary is a drop-in replacement of the original, + with no additional dependencies. +@item Fast: E9Patch can rewrite most binaries in a few seconds. +@item Low Overheads: Both performance and memory. +@item Programmable: E9Patch is designed so that it can be easily integrated + into other projects. +@end itemize") + (license (list license:expat ;src/e9patch/e9loader_*.cpp + license:gpl3+))))) ;rest + (define-public asco (package (name "asco") |