29 patterns_version = "1.35.4";
31 patterns_src = fetchFromGitHub {
32 name = "ImHex-Patterns-source-${patterns_version}";
34 repo = "ImHex-Patterns";
35 rev = "ImHex-v${patterns_version}";
36 hash = "sha256-7ch2KXkbkdRAvo3HyErWcth3kG4bzYvp9I5GZSsb/BQ=";
40 stdenv.mkDerivation rec {
44 src = fetchFromGitHub {
45 name = "ImHex-source-${version}";
46 fetchSubmodules = true;
49 rev = "refs/tags/v${version}";
50 hash = "sha256-6QpmFkSMQpGlEzo7BHZn20c+q8CTDUB4yO87wMU5JT4=";
78 # autoPatchelfHook only searches for *.so and *.so.*, and won't find *.hexpluglib
79 # however, we will append to RUNPATH ourselves
80 autoPatchelfIgnoreMissingDeps = [ "*.hexpluglib" ];
82 (lib.makeLibraryPath [ libGL ])
83 "${placeholder "out"}/lib/imhex/plugins"
87 "-DIMHEX_OFFLINE_BUILD=ON"
88 "-DUSE_SYSTEM_CAPSTONE=ON"
89 "-DUSE_SYSTEM_CURL=ON"
91 "-DUSE_SYSTEM_LLVM=ON"
92 "-DUSE_SYSTEM_NLOHMANN_JSON=ON"
93 "-DUSE_SYSTEM_YARA=ON"
96 # rsync is used here so we can not copy the _schema.json files
98 mkdir -p $out/share/imhex
99 rsync -av --exclude="*_schema.json" ${patterns_src}/{constants,encodings,includes,magic,patterns} $out/share/imhex
103 description = "Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM";
104 homepage = "https://github.com/WerWolv/ImHex";
105 license = with licenses; [ gpl2Only ];
106 maintainers = with maintainers; [
110 platforms = platforms.linux;