nixos/ghidra: init

GovanifY 6a3f025e faa63818

Changed files
+50
nixos
doc
manual
release-notes
modules
+2
nixos/doc/manual/release-notes/rl-2505.section.md
···
- [Homer](https://homer-demo.netlify.app/), a very simple static homepage for your server. Available as [services.homer](options.html#opt-services.homer).
+
- [Ghidra](https://ghidra-sre.org/), a software reverse engineering (SRE) suite of tools. Available as [programs.ghidra](options.html#opt-programs.ghidra).
+
- [Omnom](https://github.com/asciimoo/omnom), a webpage bookmarking and snapshotting service. Available as [services.omnom](options.html#opt-services.omnom.enable).
- [Yggdrasil-Jumper](https://github.com/one-d-wide/yggdrasil-jumper) is an independent project that aims to transparently reduce latency of a connection over Yggdrasil network, utilizing NAT traversal to automatically bypass intermediary nodes.
+1
nixos/modules/module-list.nix
···
./programs/gamescope.nix
./programs/gdk-pixbuf.nix
./programs/geary.nix
+
./programs/ghidra.nix
./programs/git.nix
./programs/git-worktree-switcher.nix
./programs/gnome-disks.nix
+47
nixos/modules/programs/ghidra.nix
···
+
{
+
config,
+
lib,
+
pkgs,
+
...
+
}:
+
+
let
+
cfg = config.programs.ghidra;
+
in
+
{
+
options.programs.ghidra = {
+
enable = lib.mkEnableOption "Ghidra, a software reverse engineering (SRE) suite of tools";
+
+
gdb = lib.mkOption {
+
default = true;
+
type = lib.types.bool;
+
description = ''
+
Whether to add to gdbinit the python modules required to make Ghidra's debugger work.
+
'';
+
};
+
+
package = lib.mkPackageOption pkgs "ghidra" { example = "ghidra-bin"; };
+
};
+
+
config = lib.mkIf cfg.enable {
+
environment = {
+
systemPackages = [ cfg.package ];
+
+
etc = lib.mkIf cfg.gdb {
+
"gdb/gdbinit.d/ghidra-modules.gdb".text = with pkgs.python3.pkgs; ''
+
python
+
import sys
+
[sys.path.append(p) for p in "${
+
(makePythonPath [
+
psutil
+
protobuf
+
])
+
}".split(":")]
+
end
+
'';
+
};
+
};
+
};
+
+
meta.maintainers = with lib.maintainers; [ govanify ];
+
}