about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/misc/edb
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-02-16 18:32:21 +0000
committerAlyssa Ross <hi@alyssa.is>2021-02-16 18:32:21 +0000
commit9becdcc5df71b47a5da84ad670e9a7eae9e0c65a (patch)
tree2ddf0335eb393f89501e3753b50c3f7ab0552d12 /nixpkgs/pkgs/development/tools/misc/edb
parent49f2a77ac9abc88c253f68952eda26557fc3b555 (diff)
parentff96a0fa5635770390b184ae74debea75c3fd534 (diff)
downloadnixlib-9becdcc5df71b47a5da84ad670e9a7eae9e0c65a.tar
nixlib-9becdcc5df71b47a5da84ad670e9a7eae9e0c65a.tar.gz
nixlib-9becdcc5df71b47a5da84ad670e9a7eae9e0c65a.tar.bz2
nixlib-9becdcc5df71b47a5da84ad670e9a7eae9e0c65a.tar.lz
nixlib-9becdcc5df71b47a5da84ad670e9a7eae9e0c65a.tar.xz
nixlib-9becdcc5df71b47a5da84ad670e9a7eae9e0c65a.tar.zst
nixlib-9becdcc5df71b47a5da84ad670e9a7eae9e0c65a.zip
nixpkgs: merge nixos-unstable
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/edb')
-rw-r--r--nixpkgs/pkgs/development/tools/misc/edb/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/edb/default.nix b/nixpkgs/pkgs/development/tools/misc/edb/default.nix
new file mode 100644
index 000000000000..ec65ca62fa30
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/misc/edb/default.nix
@@ -0,0 +1,42 @@
+{ lib, mkDerivation, fetchFromGitHub, cmake, pkg-config, boost, capstone
+, double-conversion, graphviz, qtxmlpatterns }:
+
+mkDerivation rec {
+  pname = "edb";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "eteran";
+    repo = "edb-debugger";
+    rev = "1.3.0";
+    fetchSubmodules = true;
+    sha256 = "fFUau8XnsRFjC83HEsqyhrwCCBOfDmV6oACf3txm7O8=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ boost.dev capstone double-conversion graphviz qtxmlpatterns ];
+
+  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.
+    mkdir -p src/qhexview/.git
+
+    # 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";
+    homepage = "https://github.com/eteran/edb-debugger";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ lihop maxxk ];
+    platforms = [ "x86_64-linux" ];
+  };
+}