imhex: init at 1.19.3

+94
+92
pkgs/applications/editors/imhex/default.nix
··· 1 + { lib 2 + , gcc12Stdenv 3 + , cmake 4 + , llvm 5 + , fetchFromGitHub 6 + , mbedtls 7 + , gtk3 8 + , pkg-config 9 + , capstone 10 + , dbus 11 + , libGLU 12 + , glfw3 13 + , file 14 + , perl 15 + , python3 16 + , jansson 17 + , curl 18 + , fmt_8 19 + , nlohmann_json 20 + , xlibsWrapper 21 + , yara 22 + }: 23 + 24 + let 25 + # when bumping the version, check if imhex has gotten support for the capstone version in nixpkgs 26 + version = "1.19.3"; 27 + 28 + patterns_src = fetchFromGitHub { 29 + owner = "WerWolv"; 30 + repo = "ImHex-Patterns"; 31 + rev = "ImHex-v${version}"; 32 + hash = "sha256-mukGPN2TugJZLLuZ5FTvZ4DxUsMGfVNhBFAPnBRC0qs="; 33 + }; 34 + 35 + in 36 + gcc12Stdenv.mkDerivation rec { 37 + pname = "imhex"; 38 + inherit version; 39 + 40 + src = fetchFromGitHub { 41 + fetchSubmodules = true; 42 + owner = "WerWolv"; 43 + repo = pname; 44 + rev = "v${version}"; 45 + hash = "sha256-SFv5ulyjm5Yf+3Gpx+A74so2YClCJx1sx0LE5fh5eG4="; 46 + }; 47 + 48 + nativeBuildInputs = [ cmake llvm python3 perl pkg-config xlibsWrapper ]; 49 + 50 + buildInputs = [ 51 + capstone 52 + curl 53 + dbus 54 + file 55 + fmt_8 56 + glfw3 57 + gtk3 58 + jansson 59 + libGLU 60 + mbedtls 61 + nlohmann_json 62 + yara 63 + ]; 64 + 65 + cmakeFlags = [ 66 + "-DIMHEX_OFFLINE_BUILD=ON" 67 + # see comment at the top about our version of capstone 68 + "-DUSE_SYSTEM_CAPSTONE=OFF" 69 + "-DUSE_SYSTEM_CURL=ON" 70 + "-DUSE_SYSTEM_FMT=ON" 71 + "-DUSE_SYSTEM_LLVM=ON" 72 + "-DUSE_SYSTEM_NLOHMANN_JSON=ON" 73 + "-DUSE_SYSTEM_YARA=ON" 74 + ]; 75 + 76 + # for reasons unknown, the built-in plugin isn't found unless made available under $out/bin 77 + postInstall = '' 78 + ln -s $out/share/imhex/plugins $out/bin/ 79 + 80 + for d in ${patterns_src}/{constants,encodings,includes,magic,patterns}; do 81 + cp -r $d $out/share/imhex/ 82 + done 83 + ''; 84 + 85 + meta = with lib; { 86 + description = "Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM"; 87 + homepage = "https://github.com/WerWolv/ImHex"; 88 + license = with licenses; [ gpl2Only ]; 89 + maintainers = with maintainers; [ luis ]; 90 + platforms = platforms.linux; 91 + }; 92 + }
+2
pkgs/top-level/all-packages.nix
··· 29210 29210 29211 29211 imgp = python3Packages.callPackage ../applications/graphics/imgp { }; 29212 29212 29213 + imhex = callPackage ../applications/editors/imhex { }; 29214 + 29213 29215 inkcut = libsForQt5.callPackage ../applications/misc/inkcut { }; 29214 29216 29215 29217 inklingreader = callPackage ../tools/misc/inklingreader { };