blob: f5825d2e18f9b8b36bf16ac30f385b4964a40ce7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, python3
, qtbase
, qttools
, radare2
, wrapQtAppsHook
}:
stdenv.mkDerivation rec {
pname = "iaito";
version = "5.8.2";
srcs = [
(fetchFromGitHub rec {
owner = "radareorg";
repo = "iaito";
rev = version;
hash = "sha256-6Do06u9axqH+DpGASEce8j3iGlrkIZGv50seyazOo1w=";
name = repo;
})
(fetchFromGitHub rec {
owner = "radareorg";
repo = "iaito-translations";
rev = "e66b3a962a7fc7dfd730764180011ecffbb206bf";
hash = "sha256-6NRTZ/ydypsB5TwbivvwOH9TEMAff/LH69hCXTvMPp8=";
name = repo;
})
];
sourceRoot = "iaito/src";
postUnpack = ''
chmod -R u+w iaito-translations
'';
postPatch = ''
substituteInPlace common/ResourcePaths.cpp \
--replace "/app/share/iaito/translations" "$out/share/iaito/translations"
'';
nativeBuildInputs = [
meson
ninja
pkg-config
python3
qttools
wrapQtAppsHook
];
buildInputs = [
qtbase
radare2
];
# the radare2 binary package seems to not install all necessary headers.
NIX_CFLAGS_COMPILE = toString [ "-I" "${radare2.src}/shlr/sdb/include/sdb" ];
postBuild = ''
pushd ../../../iaito-translations
make build -j$NIX_BUILD_CORES PREFIX=$out
popd
'';
installPhase = ''
runHook preInstall
install -m755 -Dt $out/bin iaito
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
make install -j$NIX_BUILD_CORES PREFIX=$out
popd
runHook postInstall
'';
meta = with lib; {
description = "An official graphical interface of radare2";
longDescription = ''
iaito is the official graphical interface of radare2. It's the
continuation of Cutter for radare2 after the Rizin fork.
'';
homepage = "https://radare.org/n/iaito.html";
changelog = "https://github.com/radareorg/iaito/releases/tag/${version}";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ azahi ];
platforms = platforms.linux;
};
}
|