From f36f414f51fdbfb181e9d2d2a6d4c612e3c6b5b7 Mon Sep 17 00:00:00 2001 From: Random936 Date: Mon, 27 Oct 2025 21:44:10 -0400 Subject: [PATCH] Added binary ninja personal to repo --- home/modules/gui-apps.nix | 2 + home/modules/hacking.nix | 7 ++- home/modules/tmux.nix | 4 +- packages/all-packages.nix | 1 + packages/binaryninja/default.nix | 99 ++++++++++++++++++++++++++++++++ 5 files changed, 109 insertions(+), 4 deletions(-) create mode 100644 packages/binaryninja/default.nix diff --git a/home/modules/gui-apps.nix b/home/modules/gui-apps.nix index 3f348db..dc2d7e0 100644 --- a/home/modules/gui-apps.nix +++ b/home/modules/gui-apps.nix @@ -4,6 +4,8 @@ vlc dconf steam + heroic + doomretro firefox vesktop zoom-us diff --git a/home/modules/hacking.nix b/home/modules/hacking.nix index 8ecb3d5..2474caf 100644 --- a/home/modules/hacking.nix +++ b/home/modules/hacking.nix @@ -1,10 +1,11 @@ -{ lib, config, pkgs, ... }: { +{ lib, config, pkgs, ... }: let + mypkgs = import ../../packages/all-packages.nix { inherit pkgs lib config; }; +in { # Hacking specific packages. home.packages = (with pkgs; [ gdb yara nmap - #john ffuf amass nikto @@ -35,6 +36,8 @@ seclists ]; }) + ]) ++ (with mypkgs; [ + binaryninja ]); } diff --git a/home/modules/tmux.nix b/home/modules/tmux.nix index 7336c4a..e938686 100644 --- a/home/modules/tmux.nix +++ b/home/modules/tmux.nix @@ -1,7 +1,7 @@ -{ pkgs, lib, config, ... }: let +{ pkgs, lib, config, ... }: let mypkgs = import ../../packages/all-packages.nix { inherit pkgs lib config; }; in { - home.packages = with pkgs; [ tmux ]; + home.packages = with pkgs; [ tmux ]; home.file = { ".tmux/plugins/tpm".source = "${mypkgs.tpm}"; ".tmux.conf".source = ../../dotfiles/.tmux.conf; diff --git a/packages/all-packages.nix b/packages/all-packages.nix index 302b0b7..1974e94 100644 --- a/packages/all-packages.nix +++ b/packages/all-packages.nix @@ -1,3 +1,4 @@ { pkgs, lib, config, ... }: rec { tpm = pkgs.callPackage ./tpm {}; + binaryninja = pkgs.callPackage ./binaryninja {}; } diff --git a/packages/binaryninja/default.nix b/packages/binaryninja/default.nix new file mode 100644 index 0000000..2e212f6 --- /dev/null +++ b/packages/binaryninja/default.nix @@ -0,0 +1,99 @@ +{ + autoPatchelfHook, + copyDesktopItems, + dbus, + fetchurl, + fontconfig, + freetype, + lib, + libGLU, + libxkbcommon, + makeDesktopItem, + stdenv, + unzip, + wayland, + xcbutilimage, + xcbutilkeysyms, + xcbutilrenderutil, + xcbutilwm, + openssl, + qt6, +}: +stdenv.mkDerivation rec { + pname = "binaryninja"; + version = "5.1.8104"; + + src = ./binaryninja_linux_stable_personal.zip; + + 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 Personal"; + comment = "A Reverse Engineering Platform"; + exec = "binaryninja"; + icon = "binaryninja"; + mimeTypes = [ + "application/x-binaryninja" + "x-scheme-handler/binaryninja" + ]; + categories = [ "Utility" ]; + }) + ]; + + nativeBuildInputs = [ + unzip + autoPatchelfHook + copyDesktopItems + qt6.wrapQtAppsHook + ]; + + buildInputs = [ + dbus + fontconfig + freetype + libGLU + libxkbcommon + stdenv.cc.cc.lib + wayland + xcbutilimage + xcbutilkeysyms + xcbutilrenderutil + xcbutilwm + openssl + qt6.qtbase + qt6.qtdeclarative + qt6.qtshadertools + qt6.qtsvg + ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/ + cp -R . $out/ + + mkdir $out/bin + ln -s $out/binaryninja $out/bin/binaryninja + + install -Dm644 ${icon} $out/share/icons/hicolor/256x256/apps/binaryninja.png + + runHook postInstall + ''; + + meta = { + changelog = "https://binary.ninja/changelog/#${lib.replaceStrings [ "." ] [ "-" ] version}"; + description = "Interactive decompiler, disassembler, debugger"; + homepage = "https://binary.ninja/"; + license = { + fullName = "Binary Ninja Personal Software License"; + url = "https://docs.binary.ninja/about/license.html#non-commercial-student-license-named"; + free = false; + }; + mainProgram = "binaryninja"; + platforms = [ "x86_64-linux" ]; + }; +}