A Nix flake for packaging Binary Ninja.
Find a file
2025-10-30 17:42:37 +00:00
flake.lock init 2025-10-29 11:35:34 +01:00
flake.nix added python 3.10 2025-10-30 18:40:40 +01:00
README.md init 2025-10-29 11:35:34 +01:00

Binary Ninja Nix Flake

A Nix flake for packaging Binary Ninja.

Configuration

The flake provides pre-configured packages for both personal and commercial editions with the dev version. The mkBinaryNinja function is exported via lib for custom configurations:

# Access via lib.mkBinaryNinja for custom binType/binVersion:
binary-ninja.lib.mkBinaryNinja {
  system = "x86_64-linux";
  binType = "personal";     # "personal" or "commercial"
  binVersion = "dev";       # version string (e.g., "dev", "5.1.8104", etc.)
}

Prerequisites

You must have the corresponding Binary Ninja zip file in the root directory:

For x86_64-linux:

  • binaryninja_linux_${binVersion}_${binType}.zip
  • Example: binaryninja_linux_dev_personal.zip

For aarch64-linux:

  • binaryninja_linux-arm_${binVersion}_${binType}.zip
  • Example: binaryninja_linux-arm_dev_personal.zip

Download from https://portal.binary.ninja and place in this directory.

Adding Hash Values

When you change binType or binVersion, update the corresponding hash in the hashes object in flake.nix:

Calculate the hash with:

nix hash file --type sha256 binaryninja_linux_${binVersion}_${binType}.zip

Then add it to flake.nix with the sha256- prefix:

hashes = {
  x86_64-linux.personal.dev = "sha256-your-hash-here";
  aarch64-linux.personal.dev = "sha256-your-hash-here";
};

Currently configured:

hashes = {
  x86_64-linux.personal.dev = "sha256-4zUS-OAFhXwbxKN1tWtp-Lyc02VCz685pPsrQK6ZoWc=";
  aarch64-linux.personal.dev = "sha256-0h96MObb7qNuNTNDvPyFVCzKxsJyAM9RrSwAHukQDhU=";
};

Usage

Available Packages

  • binary-ninja-personal (default) - Personal edition
  • binary-ninja-commercial - Commercial edition

Build the default package (personal edition)

nix build

The binary will be available at ./result/bin/binaryninja.

Build a specific package

nix build .#binary-ninja-personal
nix build .#binary-ninja-commercial

Run directly

nix run

Add to NixOS configuration

For x86_64-linux:

inputs = {
  binary-ninja.url = "path:/path/to/this/flake";
};

outputs = { self, binary-ninja, ... }:
  {
    nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
      modules = [
        {
          environment.systemPackages = [ binary-ninja.packages.x86_64-linux.default ];
        }
      ];
    };
  };

For aarch64-linux, replace x86_64-linux with aarch64-linux above.

Use with nix profile

nix profile install .

Supported Platforms

Supports both x86_64-linux and aarch64-linux.

License

Binary Ninja is proprietary software. This flake is provided for packaging purposes only.