diff --git a/pkgs/applications/misc/elf-dissector/default.nix b/pkgs/applications/misc/elf-dissector/default.nix index cae1b7b4d885..588dd7539b7e 100644 --- a/pkgs/applications/misc/elf-dissector/default.nix +++ b/pkgs/applications/misc/elf-dissector/default.nix @@ -1,24 +1,26 @@ { lib , stdenv -, fetchgit +, fetchFromGitLab , cmake +, elfutils , extra-cmake-modules -, wrapQtAppsHook , kitemmodels , libiberty -, libelf , libdwarf , libopcodes +, wrapQtAppsHook }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "elf-dissector"; - version = "unstable-2023-06-06"; + version = "unstable-2023-12-24"; - src = fetchgit { - url = "https://invent.kde.org/sdk/elf-dissector.git"; - rev = "de2e80438176b4b513150805238f3333f660718c"; - hash = "sha256-2yHPVPu6cncXhFCJvrSodcRFVAxj4vn+e99WhtiZniM="; + src = fetchFromGitLab { + domain = "invent.kde.org"; + owner = "sdk"; + repo = "elf-dissector"; + rev = "613538bd1d87ce72d5115646551a49cf7ff2ee34"; + hash = "sha256-fQFGFw8nZHMs8J1W2CcHAJCdcvaY2l2/CySyBSsKpyE="; }; patches = [ @@ -27,12 +29,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake extra-cmake-modules wrapQtAppsHook ]; - buildInputs = [ kitemmodels libiberty libelf libdwarf libopcodes ]; + buildInputs = [ kitemmodels libiberty elfutils libopcodes libdwarf ]; meta = with lib; { homepage = "https://invent.kde.org/sdk/elf-dissector"; description = "Tools for inspecting, analyzing and optimizing ELF files"; license = licenses.gpl2; - maintainers = with maintainers; [ ehmry ]; + maintainers = with maintainers; [ ehmry philiptaron ]; }; } 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 index 3edb17201808..ccc31c45ccde 100644 --- 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 @@ -1,12 +1,16 @@ diff --git a/src/lib/disassmbler/disassembler.cpp b/src/lib/disassmbler/disassembler.cpp -index 3277544..e77ffc4 100644 +index 8ff058e..dbd4bbe 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 +@@ -144,11 +144,7 @@ QString Disassembler::disassembleBinutils(const unsigned char* data, uint64_t si QString result; disassembler_ftype disassemble_fn; disassemble_info info; +-#if BINUTILS_VERSION >= BINUTILS_VERSION_CHECK(2, 39) +- INIT_DISASSEMBLE_INFO(info, &result, qstring_printf, fprintf_styled); +-#else - INIT_DISASSEMBLE_INFO(info, &result, qstring_printf); +-#endif + INIT_DISASSEMBLE_INFO(info, &result, qstring_printf, qstring_printf); info.application_data = this; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1dae256051e9..51be6ea96711 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31330,9 +31330,7 @@ with pkgs; electrum-ltc = libsForQt5.callPackage ../applications/misc/electrum/ltc.nix { }; - elf-dissector = libsForQt5.callPackage ../applications/misc/elf-dissector { - libdwarf = libdwarf_20210528; - }; + elf-dissector = libsForQt5.callPackage ../applications/misc/elf-dissector { }; elfx86exts = callPackage ../applications/misc/elfx86exts { };