2022-07-14 01:39:54 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2022-08-01 21:18:43 +02:00
|
|
|
, meson
|
|
|
|
, ninja
|
2022-07-14 01:39:54 +02:00
|
|
|
, pkg-config
|
2022-08-01 21:18:43 +02:00
|
|
|
, python3
|
2022-07-14 01:39:54 +02:00
|
|
|
, qtbase
|
|
|
|
, qttools
|
|
|
|
, radare2
|
|
|
|
, wrapQtAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "iaito";
|
2023-02-08 21:50:21 +01:00
|
|
|
version = "5.8.2";
|
2022-07-14 01:39:54 +02:00
|
|
|
|
2022-12-01 19:50:56 +01:00
|
|
|
srcs = [
|
|
|
|
(fetchFromGitHub rec {
|
|
|
|
owner = "radareorg";
|
|
|
|
repo = "iaito";
|
|
|
|
rev = version;
|
2023-02-08 21:50:21 +01:00
|
|
|
hash = "sha256-6Do06u9axqH+DpGASEce8j3iGlrkIZGv50seyazOo1w=";
|
2022-12-01 19:50:56 +01:00
|
|
|
name = repo;
|
|
|
|
})
|
|
|
|
(fetchFromGitHub rec {
|
|
|
|
owner = "radareorg";
|
|
|
|
repo = "iaito-translations";
|
2022-12-23 16:02:32 +01:00
|
|
|
rev = "e66b3a962a7fc7dfd730764180011ecffbb206bf";
|
|
|
|
hash = "sha256-6NRTZ/ydypsB5TwbivvwOH9TEMAff/LH69hCXTvMPp8=";
|
2022-12-01 19:50:56 +01:00
|
|
|
name = repo;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
sourceRoot = "iaito/src";
|
2022-07-14 01:39:54 +02:00
|
|
|
|
2022-08-01 21:18:43 +02:00
|
|
|
postUnpack = ''
|
2022-12-01 19:50:56 +01:00
|
|
|
chmod -R u+w iaito-translations
|
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace common/ResourcePaths.cpp \
|
|
|
|
--replace "/app/share/iaito/translations" "$out/share/iaito/translations"
|
2022-07-14 01:39:54 +02:00
|
|
|
'';
|
|
|
|
|
2022-12-01 19:50:56 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
qttools
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
radare2
|
|
|
|
];
|
|
|
|
|
2022-12-23 16:02:32 +01:00
|
|
|
# the radare2 binary package seems to not install all necessary headers.
|
2023-02-19 20:23:07 +01:00
|
|
|
NIX_CFLAGS_COMPILE = toString [ "-I" "${radare2.src}/shlr/sdb/include/sdb" ];
|
2022-12-23 16:02:32 +01:00
|
|
|
|
2022-12-01 19:50:56 +01:00
|
|
|
postBuild = ''
|
|
|
|
pushd ../../../iaito-translations
|
2023-02-08 21:50:21 +01:00
|
|
|
make build -j$NIX_BUILD_CORES PREFIX=$out
|
2022-12-01 19:50:56 +01:00
|
|
|
popd
|
|
|
|
'';
|
2022-07-14 01:39:54 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2022-08-01 21:18:43 +02:00
|
|
|
install -m755 -Dt $out/bin iaito
|
2022-12-01 19:50:56 +01:00
|
|
|
install -m644 -Dt $out/share/metainfo ../org.radare.iaito.appdata.xml
|
|
|
|
install -m644 -Dt $out/share/applications ../org.radare.iaito.desktop
|
|
|
|
install -m644 -Dt $out/share/pixmaps ../img/iaito-o.svg
|
|
|
|
|
|
|
|
pushd ../../../iaito-translations
|
2023-02-08 21:50:21 +01:00
|
|
|
make install -j$NIX_BUILD_CORES PREFIX=$out
|
2022-12-01 19:50:56 +01:00
|
|
|
popd
|
2022-07-14 01:39:54 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-08-01 21:18:43 +02:00
|
|
|
description = "An official graphical interface of radare2";
|
2022-07-14 01:39:54 +02:00
|
|
|
longDescription = ''
|
2022-08-01 21:18:43 +02:00
|
|
|
iaito is the official graphical interface of radare2. It's the
|
|
|
|
continuation of Cutter for radare2 after the Rizin fork.
|
2022-07-14 01:39:54 +02:00
|
|
|
'';
|
2022-08-01 21:18:43 +02:00
|
|
|
homepage = "https://radare.org/n/iaito.html";
|
2022-12-01 19:50:56 +01:00
|
|
|
changelog = "https://github.com/radareorg/iaito/releases/tag/${version}";
|
2022-07-14 01:39:54 +02:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ azahi ];
|
2022-08-01 21:18:43 +02:00
|
|
|
platforms = platforms.linux;
|
2022-07-14 01:39:54 +02:00
|
|
|
};
|
|
|
|
}
|