diff --git a/pkgs/by-name/im/imhex/package.nix b/pkgs/by-name/im/imhex/package.nix index bc563ca95895..7b9f98853290 100644 --- a/pkgs/by-name/im/imhex/package.nix +++ b/pkgs/by-name/im/imhex/package.nix @@ -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