1- { lib
2- , stdenv
3- , cmake
4- , llvm
5- , fetchFromGitHub
6- , mbedtls
7- , gtk3
8- , pkg-config
9- , capstone
10- , dbus
11- , libGLU
12- , glfw3
13- , file
14- , perl
15- , python3
16- , jansson
17- , curl
18- , fmt_8
19- , nlohmann_json
20- , yara
21- , rsync
1+ {
2+ lib ,
3+ stdenv ,
4+ cmake ,
5+ llvm ,
6+ fetchFromGitHub ,
7+ mbedtls ,
8+ gtk3 ,
9+ pkg-config ,
10+ capstone ,
11+ dbus ,
12+ libGLU ,
13+ libGL ,
14+ glfw3 ,
15+ file ,
16+ perl ,
17+ python3 ,
18+ jansson ,
19+ curl ,
20+ fmt_8 ,
21+ nlohmann_json ,
22+ yara ,
23+ rsync ,
24+ autoPatchelfHook ,
2225} :
2326
2427let
25- version = "1.33.2 " ;
26- patterns_version = "1.33.2 " ;
28+ version = "1.35.3 " ;
29+ patterns_version = "1.35.3 " ;
2730
2831 patterns_src = fetchFromGitHub {
32+ name = "ImHex-Patterns-source-${ patterns_version } " ;
2933 owner = "WerWolv" ;
3034 repo = "ImHex-Patterns" ;
3135 rev = "ImHex-v${ patterns_version } " ;
32- hash = "sha256-5a6aFT8R8vMzPS+Y+fcDV5+olhioEpLjdMqa7qOyGsw =" ;
36+ hash = "sha256-h86qoFMSP9ehsXJXOccUK9Mfqe+DVObfSRT4TCtK0rY =" ;
3337 } ;
3438
3539in
@@ -38,14 +42,23 @@ stdenv.mkDerivation rec {
3842 inherit version ;
3943
4044 src = fetchFromGitHub {
45+ name = "ImHex-source-${ version } " ;
4146 fetchSubmodules = true ;
4247 owner = "WerWolv" ;
43- repo = pname ;
44- rev = "v${ version } " ;
45- hash = "sha256-8Ehpk0TjE4itQ7D9Nx74plYwABVufuYmxfxyuSqak1c =" ;
48+ repo = "ImHex" ;
49+ rev = "refs/tags/ v${ version } " ;
50+ hash = "sha256-8vhOOHfg4D9B9yYgnGZBpcjAjuL4M4oHHax9ad5PJtA =" ;
4651 } ;
4752
48- nativeBuildInputs = [ cmake llvm python3 perl pkg-config rsync ] ;
53+ nativeBuildInputs = [
54+ autoPatchelfHook
55+ cmake
56+ llvm
57+ python3
58+ perl
59+ pkg-config
60+ rsync
61+ ] ;
4962
5063 buildInputs = [
5164 capstone
@@ -62,6 +75,14 @@ stdenv.mkDerivation rec {
6275 yara
6376 ] ;
6477
78+ # autoPatchelfHook only searches for *.so and *.so.*, and won't find *.hexpluglib
79+ # however, we will append to RUNPATH ourselves
80+ autoPatchelfIgnoreMissingDeps = [ "*.hexpluglib" ] ;
81+ appendRunpaths = [
82+ ( lib . makeLibraryPath [ libGL ] )
83+ "${ placeholder "out" } /lib/imhex/plugins"
84+ ] ;
85+
6586 cmakeFlags = [
6687 "-DIMHEX_OFFLINE_BUILD=ON"
6788 "-DUSE_SYSTEM_CAPSTONE=ON"
@@ -82,7 +103,10 @@ stdenv.mkDerivation rec {
82103 description = "Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM" ;
83104 homepage = "https://github.com/WerWolv/ImHex" ;
84105 license = with licenses ; [ gpl2Only ] ;
85- maintainers = with maintainers ; [ kashw2 cafkafk ] ;
106+ maintainers = with maintainers ; [
107+ kashw2
108+ cafkafk
109+ ] ;
86110 platforms = platforms . linux ;
87111 } ;
88112}
0 commit comments