2022-07-18 16:21:45 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2022-08-12 12:06:08 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
2022-07-18 16:21:45 +00:00
|
|
|
, pkg-config
|
2022-08-12 12:06:08 +00:00
|
|
|
, python3
|
2022-07-18 16:21:45 +00:00
|
|
|
, qtbase
|
|
|
|
, qttools
|
|
|
|
, radare2
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, nix-update-script
|
|
|
|
}:
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
# TODO MacOS support.
|
|
|
|
# TODO Build and install translations.
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "iaito";
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "5.7.6";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "radareorg";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-10-06 18:32:54 +00:00
|
|
|
sha256 = "sha256-PnIOoWPYLK30lMmLVctihCs7GBo0rTN8yetWAr21h9w=";
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config python3 qttools wrapQtAppsHook ];
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
buildInputs = [ radare2 qtbase ];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postUnpack = ''
|
|
|
|
sourceRoot=$sourceRoot/src
|
2022-07-18 16:21:45 +00:00
|
|
|
'';
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
# TODO Fix version checking and version information for r2.
|
|
|
|
# Version checking always fails due to values being empty strings for some
|
|
|
|
# reason. Meanwhile, we can safely assume that radare2's runtime and
|
|
|
|
# compile-time implementations are the same and remove this check.
|
|
|
|
patches = [ ./remove-broken-version-check.patch ];
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
install -m755 -Dt $out/bin iaito
|
|
|
|
install -m644 -Dt $out/share/metainfo $src/src/org.radare.iaito.appdata.xml
|
|
|
|
install -m644 -Dt $out/share/applications $src/src/org.radare.iaito.desktop
|
|
|
|
install -m644 -Dt $out/share/pixmaps $src/src/img/iaito-o.svg
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-08-12 12:06:08 +00:00
|
|
|
description = "An official graphical interface of radare2";
|
2022-07-18 16:21:45 +00:00
|
|
|
longDescription = ''
|
2022-08-12 12:06:08 +00:00
|
|
|
iaito is the official graphical interface of radare2. It's the
|
|
|
|
continuation of Cutter for radare2 after the Rizin fork.
|
2022-07-18 16:21:45 +00:00
|
|
|
'';
|
2022-08-12 12:06:08 +00:00
|
|
|
homepage = "https://radare.org/n/iaito.html";
|
2022-07-18 16:21:45 +00:00
|
|
|
changelog = "https://github.com/radareorg/iaito/releases/tag/${src.rev}";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ azahi ];
|
2022-08-12 12:06:08 +00:00
|
|
|
platforms = platforms.linux;
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
}
|