diff --git a/pkgs/by-name/im/imhex/package.nix b/pkgs/by-name/im/imhex/package.nix index 7b9f98853290..0ce61eea2f86 100644 --- a/pkgs/by-name/im/imhex/package.nix +++ b/pkgs/by-name/im/imhex/package.nix @@ -23,6 +23,7 @@ nix-update-script, autoPatchelfHook, makeWrapper, + llvmPackages, }: let @@ -61,7 +62,9 @@ stdenv.mkDerivation (finalAttrs: { pkg-config makeWrapper ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; + ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook + # TODO: Remove once #536365 reaches this branch + ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.lld; buildInputs = [ capstone @@ -103,7 +106,13 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeFeature "CMAKE_INSTALL_NAME_DIR" "@executable_path/../Frameworks") ]; - env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; + env = { + NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; + } + // lib.optionalAttrs stdenv.hostPlatform.isDarwin { + # TODO: Remove once #536365 reaches this branch + NIX_CFLAGS_LINK = "-fuse-ld=lld"; + }; # Comment out fixup_bundle in PostprocessBundle.cmake as we are not building a standalone application postPatch = ''