imhex: fix RUNPATH to find libGL and plugins

This commit is contained in:
éclairevoyant 2024-06-29 20:59:05 -04:00
parent fe47a55fa3
commit 1db62e6fb7
No known key found for this signature in database
GPG Key ID: E3813AEAA02DB54B

View File

@ -9,6 +9,7 @@
, capstone
, dbus
, libGLU
, libGL
, glfw3
, file
, perl
@ -19,6 +20,7 @@
, nlohmann_json
, yara
, rsync
, autoPatchelfHook
}:
let
@ -47,7 +49,7 @@ stdenv.mkDerivation rec {
hash = "sha256-8vhOOHfg4D9B9yYgnGZBpcjAjuL4M4oHHax9ad5PJtA=";
};
nativeBuildInputs = [ cmake llvm python3 perl pkg-config rsync ];
nativeBuildInputs = [ autoPatchelfHook cmake llvm python3 perl pkg-config rsync ];
buildInputs = [
capstone
@ -64,6 +66,14 @@ stdenv.mkDerivation rec {
yara
];
# autoPatchelfHook only searches for *.so and *.so.*, and won't find *.hexpluglib
# however, we will append to RUNPATH ourselves
autoPatchelfIgnoreMissingDeps = [ "*.hexpluglib" ];
appendRunpaths = [
(lib.makeLibraryPath [ libGL ])
"${placeholder "out"}/lib/imhex/plugins"
];
cmakeFlags = [
"-DIMHEX_OFFLINE_BUILD=ON"
"-DUSE_SYSTEM_CAPSTONE=ON"