From f2642a9101a8bedccbc9b7870f3cb9eda657f1a9 Mon Sep 17 00:00:00 2001 From: Mrmaxmeier Date: Fri, 12 Dec 2025 11:09:35 +0100 Subject: [PATCH] imhex: 1.37.4 -> 1.38.1 --- pkgs/by-name/im/imhex/package.nix | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/im/imhex/package.nix b/pkgs/by-name/im/imhex/package.nix index 794dbf6a60ae..bc563ca95895 100644 --- a/pkgs/by-name/im/imhex/package.nix +++ b/pkgs/by-name/im/imhex/package.nix @@ -20,22 +20,21 @@ fmt_11, nlohmann_json, yara, - rsync, nix-update-script, autoPatchelfHook, makeWrapper, }: let - version = "1.37.4"; - patterns_version = "1.37.4"; + version = "1.38.1"; + patterns_version = "1.38.1"; patterns_src = fetchFromGitHub { name = "ImHex-Patterns-source-${patterns_version}"; owner = "WerWolv"; repo = "ImHex-Patterns"; tag = "ImHex-v${patterns_version}"; - hash = "sha256-2NgMYaG6+XKp0fIHAn3vAcoXXa3EF4HV01nI+t1IL1U="; + hash = "sha256-MqQHzR5lKWhQI6pIX1kbAPDVG18UrMJM45mtIe/ggJE="; }; in @@ -49,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "WerWolv"; repo = "ImHex"; tag = "v${finalAttrs.version}"; - hash = "sha256-uenwAaIjtBzrtiLdy6fh5TxtbWtUJbtybNOLP3+8blA="; + hash = "sha256-lkpFiXuEF72nBkPuInv683Ct1Uu+uZ0PGejI9cVEUp0="; }; strictDeps = true; @@ -60,7 +59,6 @@ stdenv.mkDerivation (finalAttrs: { python3 perl pkg-config - rsync makeWrapper ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; @@ -78,6 +76,7 @@ stdenv.mkDerivation (finalAttrs: { mbedtls nlohmann_json yara + llvm ]; # autoPatchelfHook only searches for *.so and *.so.*, and won't find *.hexpluglib @@ -104,17 +103,18 @@ stdenv.mkDerivation (finalAttrs: { env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; # Comment out fixup_bundle in PostprocessBundle.cmake as we are not building a standalone application - postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' + postPatch = '' + # Link patterns source into location expected by cmake when IMHEX_OFFLINE_BUILD is set + ln -s ${patterns_src} ImHex-Patterns + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace cmake/modules/PostprocessBundle.cmake \ --replace-fail "fixup_bundle" "#fixup_bundle" ''; - # rsync is used here so we can not copy the _schema.json files postInstall = if stdenv.hostPlatform.isLinux then '' - mkdir -p $out/share/imhex - rsync -av --exclude="*_schema.json" ${patterns_src}/{constants,encodings,includes,magic,nodes,patterns} $out/share/imhex # without this imhex is not able to find pattern files wrapProgram $out/bin/imhex --prefix XDG_DATA_DIRS : $out/share '' @@ -122,7 +122,6 @@ stdenv.mkDerivation (finalAttrs: { '' mkdir -p $out/Applications mv $out/imhex.app $out/Applications - rsync -av --exclude="*_schema.json" ${patterns_src}/{constants,encodings,includes,magic,nodes,patterns} "$out/Applications/imhex.app/Contents/MacOS" install_name_tool \ -change "$out/lib/libimhex.${finalAttrs.version}${stdenv.hostPlatform.extensions.sharedLibrary}" \ "@executable_path/../Frameworks/libimhex.${finalAttrs.version}${stdenv.hostPlatform.extensions.sharedLibrary}" \