imhex: fix darwin cmake workaround (#526225)

This commit is contained in:
Christian Kögler
2026-06-20 04:12:41 +00:00
committed by GitHub
+3 -4
View File
@@ -98,6 +98,9 @@ stdenv.mkDerivation (finalAttrs: {
(lib.cmakeBool "USE_SYSTEM_NLOHMANN_JSON" true)
(lib.cmakeBool "USE_SYSTEM_YARA" true)
(lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.5")
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
(lib.cmakeFeature "CMAKE_INSTALL_NAME_DIR" "@executable_path/../Frameworks")
];
env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
@@ -122,10 +125,6 @@ stdenv.mkDerivation (finalAttrs: {
''
mkdir -p $out/Applications
mv $out/imhex.app $out/Applications
install_name_tool \
-change "$out/lib/libimhex.${finalAttrs.version}${stdenv.hostPlatform.extensions.sharedLibrary}" \
"@executable_path/../Frameworks/libimhex.${finalAttrs.version}${stdenv.hostPlatform.extensions.sharedLibrary}" \
"$out/Applications/imhex.app/Contents/MacOS/imhex"
makeWrapper "$out/Applications/imhex.app/Contents/MacOS/imhex" "$out/bin/imhex"
''
else