2024-04-21 15:54:59 +00:00
|
|
|
{ lib, mkDerivation, fetchFromGitHub, cmake, pkg-config, boost, capstone_4
|
2021-02-13 14:23:35 +00:00
|
|
|
, double-conversion, graphviz, qtxmlpatterns }:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "edb";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "1.4.0";
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eteran";
|
|
|
|
repo = "edb-debugger";
|
2024-02-07 01:22:34 +00:00
|
|
|
rev = version;
|
2021-02-13 14:23:35 +00:00
|
|
|
fetchSubmodules = true;
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-1Q0eZS05L4sxzcPvEFdEaobO7JYHRu98Yf+n3ZnBi+E=";
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
buildInputs = [ boost.dev capstone_4 double-conversion graphviz qtxmlpatterns ];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Remove CMAKE_INSTALL_PREFIX from DEFAULT_PLUGIN_PATH otherwise the nix store path will appear twice.
|
|
|
|
substituteInPlace ./src/CMakeLists.txt --replace \
|
|
|
|
'-DDEFAULT_PLUGIN_PATH=\"''${CMAKE_INSTALL_PREFIX}/''${CMAKE_INSTALL_LIBDIR}/edb\"' \
|
|
|
|
'-DDEFAULT_PLUGIN_PATH=\"''${CMAKE_INSTALL_LIBDIR}/edb\"'
|
|
|
|
|
|
|
|
# The build script checks for the presence of .git to determine whether
|
|
|
|
# submodules were fetched and will throw an error if it's not there.
|
|
|
|
# Avoid using leaveDotGit in the fetchFromGitHub options as it is non-deterministic.
|
2024-02-07 01:22:34 +00:00
|
|
|
mkdir -p src/qhexview/.git lib/gdtoa-desktop/.git
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
# Change default optional terminal program path to one that is more likely to work on NixOS.
|
|
|
|
substituteInPlace ./src/Configuration.cpp --replace "/usr/bin/xterm" "xterm";
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Cross platform AArch32/x86/x86-64 debugger";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "edb";
|
2021-02-13 14:23:35 +00:00
|
|
|
homepage = "https://github.com/eteran/edb-debugger";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ lihop maxxk ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|