Skip to content

Commit 1db62e6

Browse files
committed
imhex: fix RUNPATH to find libGL and plugins
1 parent fe47a55 commit 1db62e6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

pkgs/by-name/im/imhex/package.nix

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
, capstone
1010
, dbus
1111
, libGLU
12+
, libGL
1213
, glfw3
1314
, file
1415
, perl
@@ -19,6 +20,7 @@
1920
, nlohmann_json
2021
, yara
2122
, rsync
23+
, autoPatchelfHook
2224
}:
2325

2426
let
@@ -47,7 +49,7 @@ stdenv.mkDerivation rec {
4749
hash = "sha256-8vhOOHfg4D9B9yYgnGZBpcjAjuL4M4oHHax9ad5PJtA=";
4850
};
4951

50-
nativeBuildInputs = [ cmake llvm python3 perl pkg-config rsync ];
52+
nativeBuildInputs = [ autoPatchelfHook cmake llvm python3 perl pkg-config rsync ];
5153

5254
buildInputs = [
5355
capstone
@@ -64,6 +66,14 @@ stdenv.mkDerivation rec {
6466
yara
6567
];
6668

69+
# autoPatchelfHook only searches for *.so and *.so.*, and won't find *.hexpluglib
70+
# however, we will append to RUNPATH ourselves
71+
autoPatchelfIgnoreMissingDeps = [ "*.hexpluglib" ];
72+
appendRunpaths = [
73+
(lib.makeLibraryPath [ libGL ])
74+
"${placeholder "out"}/lib/imhex/plugins"
75+
];
76+
6777
cmakeFlags = [
6878
"-DIMHEX_OFFLINE_BUILD=ON"
6979
"-DUSE_SYSTEM_CAPSTONE=ON"

0 commit comments

Comments
 (0)