Ghidra

From NixOS Wiki
Revision as of 22:30, 18 June 2024 by Klinger (talk | contribs) (install ghidra added)

Ghidra is a software reverse engineering (SRE) framework created and maintained by the American National Security Agency(NSA).j

Install Ghidra on NixOS

Ghidra can be installed from nixpkgs (ghidra, ghidra-bin). There are some extension packages available too.


Building Ghidra on NixOS

Building Ghidra on NixOS can be a bit more finnicky than usual because of the gradle setup. This is an example shell.nix file.

with import <nixpkgs> {};

pkgs.mkShell {
  buildInputs = [
    pkgs.jdk11
    pkgs.gradle
    pkgs.gcc
    pkgs.git
    pkgs.bison
    pkgs.flex
  ];

  shellHook = ''
    rm -rf /tmp/gradle &> /dev/null
    mkdir /tmp/gradle 
    export GRADLE_USER_HOME="/tmp/gradle" 
    echo "org.gradle.java.home=${pkgs.jdk11}/lib/openjdk" > /tmp/gradle/gradle.properties
  '';
}