3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

gnu: Add blacksmith.

* gnu/packages/cybersecurity.scm (blacksmith): New variable.

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
This commit is contained in:
Raghav Gururajan via Guix-patches via 2021-12-09 08:45:47 -05:00 committed by Nicolas Goaziou
parent fd58aa0784
commit be2c199661
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -2,6 +2,7 @@
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 c4droid <c4droid@foxmail.com>
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
;;;
;;; This file is part of GNU Guix.
;;;
@ -20,10 +21,14 @@
(define-module (gnu packages cybersecurity)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system cmake)
#:use-module (guix build-system python)
#:use-module (gnu packages cpp)
#:use-module (gnu packages engineering)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages python-crypto)
@ -32,6 +37,68 @@
#:use-module (gnu packages bioinformatics) ;python-intervaltree
#:use-module (gnu packages emulators))
(define-public blacksmith
(package
(name "blacksmith")
(version "0.0.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/comsec-group/blacksmith")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"0kyp71wndf527dgza5iks5m5vj543mvxp5w7cjd8x0pilmd1xrls"))
(modules '((guix build utils)))
(snippet `(begin
(delete-file-recursively "external")
(substitute* "CMakeLists.txt"
(("add_subdirectory\\(external\\)") "")
(("[ \t]*FetchContent_MakeAvailable\\(asmjit\\)")
(string-append
"find_package(asmjit)\n"
"find_package(nlohmann_json)")))))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f ;no test-suite
#:imported-modules
((guix build copy-build-system)
,@%cmake-build-system-modules)
#:modules
(((guix build copy-build-system) #:prefix copy:)
(guix build cmake-build-system)
(guix build utils))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-build
(lambda _
(substitute* "CMakeLists.txt"
;; Use default C++ standard instead.
(("cxx_std_17") "")
;; This project tries to link argagg library, which doesn't
;; exist, as argagg project is a single header file.
(("argagg") ""))))
(replace 'install
(lambda args
(apply (assoc-ref copy:%standard-phases 'install)
#:install-plan
'(("." "bin" #:include ("blacksmith"))
("." "lib" #:include-regexp ("\\.a$")))
args))))))
(native-inputs
(list pkg-config))
(inputs
(list argagg asmjit json-modern-cxx))
(home-page "https://comsec.ethz.ch/research/dram/blacksmith")
(synopsis "Rowhammer fuzzer with non-uniform and frequency-based patterns")
(description
"Blacksmith is an implementation of Rowhammer fuzzer that crafts novel
non-uniform Rowhammer access patterns based on the concepts of frequency,
phase, and amplitude. It is able to bypass recent @acronym{TRR, Target Row
Refresh}in-DRAM mitigations effectively and as such can trigger bit flips.")
(license license:expat)))
(define-public ropgadget
(package
(name "ropgadget")