tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
imhex: init at 1.19.3
Peter Hoeg
3 years ago
751e222a
98919e76
+94
2 changed files
expand all
collapse all
unified
split
pkgs
applications
editors
imhex
default.nix
top-level
all-packages.nix
+92
pkgs/applications/editors/imhex/default.nix
···
1
1
+
{ lib
2
2
+
, gcc12Stdenv
3
3
+
, cmake
4
4
+
, llvm
5
5
+
, fetchFromGitHub
6
6
+
, mbedtls
7
7
+
, gtk3
8
8
+
, pkg-config
9
9
+
, capstone
10
10
+
, dbus
11
11
+
, libGLU
12
12
+
, glfw3
13
13
+
, file
14
14
+
, perl
15
15
+
, python3
16
16
+
, jansson
17
17
+
, curl
18
18
+
, fmt_8
19
19
+
, nlohmann_json
20
20
+
, xlibsWrapper
21
21
+
, yara
22
22
+
}:
23
23
+
24
24
+
let
25
25
+
# when bumping the version, check if imhex has gotten support for the capstone version in nixpkgs
26
26
+
version = "1.19.3";
27
27
+
28
28
+
patterns_src = fetchFromGitHub {
29
29
+
owner = "WerWolv";
30
30
+
repo = "ImHex-Patterns";
31
31
+
rev = "ImHex-v${version}";
32
32
+
hash = "sha256-mukGPN2TugJZLLuZ5FTvZ4DxUsMGfVNhBFAPnBRC0qs=";
33
33
+
};
34
34
+
35
35
+
in
36
36
+
gcc12Stdenv.mkDerivation rec {
37
37
+
pname = "imhex";
38
38
+
inherit version;
39
39
+
40
40
+
src = fetchFromGitHub {
41
41
+
fetchSubmodules = true;
42
42
+
owner = "WerWolv";
43
43
+
repo = pname;
44
44
+
rev = "v${version}";
45
45
+
hash = "sha256-SFv5ulyjm5Yf+3Gpx+A74so2YClCJx1sx0LE5fh5eG4=";
46
46
+
};
47
47
+
48
48
+
nativeBuildInputs = [ cmake llvm python3 perl pkg-config xlibsWrapper ];
49
49
+
50
50
+
buildInputs = [
51
51
+
capstone
52
52
+
curl
53
53
+
dbus
54
54
+
file
55
55
+
fmt_8
56
56
+
glfw3
57
57
+
gtk3
58
58
+
jansson
59
59
+
libGLU
60
60
+
mbedtls
61
61
+
nlohmann_json
62
62
+
yara
63
63
+
];
64
64
+
65
65
+
cmakeFlags = [
66
66
+
"-DIMHEX_OFFLINE_BUILD=ON"
67
67
+
# see comment at the top about our version of capstone
68
68
+
"-DUSE_SYSTEM_CAPSTONE=OFF"
69
69
+
"-DUSE_SYSTEM_CURL=ON"
70
70
+
"-DUSE_SYSTEM_FMT=ON"
71
71
+
"-DUSE_SYSTEM_LLVM=ON"
72
72
+
"-DUSE_SYSTEM_NLOHMANN_JSON=ON"
73
73
+
"-DUSE_SYSTEM_YARA=ON"
74
74
+
];
75
75
+
76
76
+
# for reasons unknown, the built-in plugin isn't found unless made available under $out/bin
77
77
+
postInstall = ''
78
78
+
ln -s $out/share/imhex/plugins $out/bin/
79
79
+
80
80
+
for d in ${patterns_src}/{constants,encodings,includes,magic,patterns}; do
81
81
+
cp -r $d $out/share/imhex/
82
82
+
done
83
83
+
'';
84
84
+
85
85
+
meta = with lib; {
86
86
+
description = "Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM";
87
87
+
homepage = "https://github.com/WerWolv/ImHex";
88
88
+
license = with licenses; [ gpl2Only ];
89
89
+
maintainers = with maintainers; [ luis ];
90
90
+
platforms = platforms.linux;
91
91
+
};
92
92
+
}
+2
pkgs/top-level/all-packages.nix
···
29210
29210
29211
29211
imgp = python3Packages.callPackage ../applications/graphics/imgp { };
29212
29212
29213
29213
+
imhex = callPackage ../applications/editors/imhex { };
29214
29214
+
29213
29215
inkcut = libsForQt5.callPackage ../applications/misc/inkcut { };
29214
29216
29215
29217
inklingreader = callPackage ../tools/misc/inklingreader { };