Skip to content
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

binary-ninja: init at 4.2.6455 #360314

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

spencerpogo
Copy link
Contributor

@spencerpogo spencerpogo commented Nov 30, 2024

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 30, 2024
@spencerpogo
Copy link
Contributor Author

@ofborg build binary-ninja

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/4898

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-linux: 1-10 10.rebuild-linux: 1 and removed 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 30, 2024

mkdir -p $out/bin
cp ./binaryninja $out/bin
wrapProgram $out/bin/binaryninja --prefix LD_LIBRARY_PATH ":" ${libs}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we not using autopatchelfhook?

@eilvelia
Copy link
Contributor

eilvelia commented Dec 9, 2024

This doesn't work under wayland:

$ binaryninja -platform wayland
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb, eglfs, minimal, offscreen, linuxfb, minimalegl, vnc, vkkhrdisplay.

fish: Job 1, 'binaryninja -platform wayland' terminated by signal SIGABRT (Abort)

By the way, there has been another PR to add the free version of binary ninja: #322496 (wayland works in this one), which uses autoPatchelfHook.

Also, shouldn't this be named binaryninja instead of binary-ninja since this is how the executable file here is named and how Vector 35 usually writes it (e.g., https://github.com/Vector35/binaryninja-api etc)? (Personally I would've preferred binaryninja-free for clarity, as it is done on AUR.)

@spencerpogo spencerpogo force-pushed the binary-ninja branch 2 times, most recently from 733f525 to 900cdc5 Compare December 30, 2024 01:53
@spencerpogo
Copy link
Contributor Author

I agree with the suggestions re: attribute name. Took major inspiration from #322496 but fixed it up and made the closure smaller with (as far as I can tell) no runtime issues.

@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-linux: 1 labels Dec 30, 2024
xcbutilrenderutil
xcbutilwm
];

Copy link
Contributor

@eilvelia eilvelia Dec 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have a .desktop file for binary ninja (see linux-setup.sh for the desktop file generation they use in the personal version)

For example:

  nativeBuildInputs = [
    # .....
    copyDesktopItems
  ];

  icon = fetchurl {
    url = "https://raw.githubusercontent.com/Vector35/binaryninja-api/448f40be71dffa86a6581c3696627ccc1bdf74f2/docs/img/logo.png";
    hash = "sha256-TzGAAefTknnOBj70IHe64D6VwRKqIDpL4+o9kTw0Mn4=";
  };

  desktopItems = [
    (makeDesktopItem {
      name = "com.vector35.binaryninja";
      desktopName = "Binary Ninja Free";
      comment = "A Reverse Engineering Platform";
      exec = "binaryninja";
      icon = "binaryninja";
      mimeTypes = [ "application/x-binaryninja" "x-scheme-handler/binaryninja" ];
      categories = [ "Utility" ];
    })
  ];

  installPhase = ''
    # .....

    install -Dm644 ${icon} $out/share/icons/hicolor/256x256/apps/binaryninja.png

    runHook postInstall
  '';

@spencerpogo
Copy link
Contributor Author

Added icon, thanks very much for the example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants