Ghidra

From NixOS Wiki
Revision as of 10:08, 28 November 2020 by imported>GovanifY (Create the Ghidra page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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
  '';
}