From c55163f47e909052d282af6b51d067ee8a6e90d8 Mon Sep 17 00:00:00 2001 From: rewine Date: Wed, 14 Jun 2023 10:15:42 +0800 Subject: [PATCH] elf-dissector: unstable-2020-11-14 -> unstable-2023-06-06 --- .../misc/elf-dissector/default.nix | 28 ++++++++++++++----- ...for_src_lib_disassembler_disassembler.diff | 13 +++++++++ 2 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 pkgs/applications/misc/elf-dissector/fix_build_for_src_lib_disassembler_disassembler.diff diff --git a/pkgs/applications/misc/elf-dissector/default.nix b/pkgs/applications/misc/elf-dissector/default.nix index 6edbcc0cce2e..cae1b7b4d885 100644 --- a/pkgs/applications/misc/elf-dissector/default.nix +++ b/pkgs/applications/misc/elf-dissector/default.nix @@ -1,17 +1,31 @@ -{ mkDerivation, fetchgit, lib, cmake, extra-cmake-modules, kitemmodels -, libiberty, libelf, libdwarf, libopcodes }: +{ lib +, stdenv +, fetchgit +, cmake +, extra-cmake-modules +, wrapQtAppsHook +, kitemmodels +, libiberty +, libelf +, libdwarf +, libopcodes +}: -mkDerivation rec { +stdenv.mkDerivation rec { pname = "elf-dissector"; - version = "unstable-2020-11-14"; + version = "unstable-2023-06-06"; src = fetchgit { url = "https://invent.kde.org/sdk/elf-dissector.git"; - rev = "d1700e76e3f60aff0a2a9fb63bc001251d2be522"; - sha256 = "1h1xr3ag1sbf005drcx8g8dc5mk7fb2ybs73swrld7clcawhxnk8"; + rev = "de2e80438176b4b513150805238f3333f660718c"; + hash = "sha256-2yHPVPu6cncXhFCJvrSodcRFVAxj4vn+e99WhtiZniM="; }; - nativeBuildInputs = [ cmake extra-cmake-modules ]; + patches = [ + ./fix_build_for_src_lib_disassembler_disassembler.diff + ]; + + nativeBuildInputs = [ cmake extra-cmake-modules wrapQtAppsHook ]; buildInputs = [ kitemmodels libiberty libelf libdwarf libopcodes ]; diff --git a/pkgs/applications/misc/elf-dissector/fix_build_for_src_lib_disassembler_disassembler.diff b/pkgs/applications/misc/elf-dissector/fix_build_for_src_lib_disassembler_disassembler.diff new file mode 100644 index 000000000000..3edb17201808 --- /dev/null +++ b/pkgs/applications/misc/elf-dissector/fix_build_for_src_lib_disassembler_disassembler.diff @@ -0,0 +1,13 @@ +diff --git a/src/lib/disassmbler/disassembler.cpp b/src/lib/disassmbler/disassembler.cpp +index 3277544..e77ffc4 100644 +--- a/src/lib/disassmbler/disassembler.cpp ++++ b/src/lib/disassmbler/disassembler.cpp +@@ -127,7 +127,7 @@ QString Disassembler::disassembleBinutils(const unsigned char* data, uint64_t si + QString result; + disassembler_ftype disassemble_fn; + disassemble_info info; +- INIT_DISASSEMBLE_INFO(info, &result, qstring_printf); ++ INIT_DISASSEMBLE_INFO(info, &result, qstring_printf, qstring_printf); + + info.application_data = this; + info.flavour = bfd_target_elf_flavour;