New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imhex: init at 1.19.3 #184488
imhex: init at 1.19.3 #184488
Conversation
Just to elaborate on why #148646 is not sufficient:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bin can work for me. Here are some suggestions on the pr.
hash = "sha256-SFv5ulyjm5Yf+3Gpx+A74so2YClCJx1sx0LE5fh5eG4="; | ||
}; | ||
|
||
nativeBuildInputs = [ cmake llvm python3 perl pkg-config xlibsWrapper ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are perl and xlib really necessary? After removing them, I can build and run this package as well.
mbedtls | ||
nlohmann_json | ||
yara | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of them are not found by rg -i ...
in sources such as jansson. Are they necessary? OpenGL and freetype included by cmake find_package
are not listed here. They may be input from other dependencies, but it is better to add it here explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, could we seperate plugins from this drv like pass, fcitx5 and others or add some options to control it?
"-DUSE_SYSTEM_YARA=ON" | ||
]; | ||
|
||
# for reasons unknown, the built-in plugin isn't found unless made available under $out/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the source here which shows the reason. I think we should patch or make a pr to let add the share dir into default because plugins are better put there instead of bin, IMO.
"-DUSE_SYSTEM_LLVM=ON" | ||
"-DUSE_SYSTEM_NLOHMANN_JSON=ON" | ||
"-DUSE_SYSTEM_YARA=ON" | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should extra dirs be updated or patched for nix?
}: | ||
|
||
let | ||
# when bumping the version, check if imhex has gotten support for the capstone version in nixpkgs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we comment the compatible version or update it?
Hi! Thanks for adding ImHex to Nix! |
Awesome! I was just looking for ImHex in Nixpkgs and found this PR. Thank you! I tried this on my NixOS machine. I haven't used ImHex before. The core functionality seems to be working nicely, but the file dialogs are not working. For example clicking File -> Open File... doesn't show anything. In addition, it seems the patterns are not automatically loaded, for instance, opening an ELF file using command-line didn't show anything in the "pattern data" panel. I just couldn't figure out how to debug these issues properly and wasn't sure this was related to this Nix package in particular. |
I tested this on my gnome system and my KDE system and the file dialog worked for me on both. What desktop environment are you using? |
Ah maybe it isn't a packaging problem.
i3 on xserver. I guess the file dialog not working can be ignored. |
The file dialog not working correctly on some systems is a known "issue". It's because ImHex uses xdg-desktop-portal for it and that's somehow not correctly setup on some systems or doesn't have a frontend available. |
I can confirm it works with |
@WerWolv thanks for both imhex and supporting the packaging efforts here. It would be fantastic if imhex supported looking for plugins under PREFIX/share/imhex (or similar) out of the box so that the the files installed through |
@peterhoeg We already added this to make bundling ImHex for Fedora easier. As far as I know it came with v1.20.0 so the nix package here needs to be updated first. |
Basically if we can have an option to provide the path for the plugins (and the rest from ImHex-Patterns) at build-time, that would be great.
|
Do you mean the
I personally think it is a bad idea to add another location for the plugins, because we would end up confusing people making plugins, and make overall packaging harder (I understand it's not my decision to make through). Is there a reason why this would help you, rather than using EDIT : Relevant code : https://github.com/WerWolv/ImHex/blob/dd9b6643e6e535765f8b464c4c35d557bdd64e44/cmake/build_helpers.cmake#L100-L106 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as intended. Improvements can be made incrementally with new pull requests.
Description of changes
Further to #148646
Closes #105997
Closes #148646
A slightly more elegant approach compared to symlinking the plugins dir to $out/bin would be to patch things up to look for it in the right place.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes