add programs.idapro

This commit is contained in:
xenia 2025-09-12 02:14:30 -04:00
parent cf817800f5
commit 4b6fd48e04
4 changed files with 61 additions and 0 deletions

View File

@ -336,6 +336,22 @@ example:
enable binsync integration enable binsync integration
### [`programs.idapro`](./modules/idapro/default.nix)
Enables IDA Pro in the system environment, with optional plugin config.
#### `programs.idapro.enable`
Whether to enable IDA Pro
#### `programs.idapro.package`
The IDA Pro package to use
#### `programs.idapro.binsync.enable`
Enables binsync integration with IDA Pro
### [`environment.machineInfo`](./modules/machine-info/default.nix) ### [`environment.machineInfo`](./modules/machine-info/default.nix)
provides options to customize the `/etc/machine-info` file on a NixOS system. See the module itself provides options to customize the `/etc/machine-info` file on a NixOS system. See the module itself

View File

@ -2,6 +2,7 @@
imports = [ imports = [
./modules/ghidra-client ./modules/ghidra-client
./modules/ghidra-server ./modules/ghidra-server
./modules/idapro
./modules/machine-info ./modules/machine-info
./modules/regdom ./modules/regdom
./modules/satisfactory-dedicated-server ./modules/satisfactory-dedicated-server

View File

@ -0,0 +1,42 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.programs.idapo;
binsyncPkg = pkgs.python311.pkgs.binsync;
binsyncPath = "${pkgs.python311.pkgs.binsync}/${pkgs.python311.sitePackages}";
idaproConfigured = cfg.package.override {
pythonDeps = lib.optionals cfg.binsync.enable [binsyncPkg];
plugins = lib.optionals cfg.binsync.enable [
(pkgs.runCommand "binsync-ida" {} ''
mkdir -p $out/plugins
cp ${binsyncPath}/binsync/binsync_plugin.py $out/plugins
'')
];
};
in
{
options.programs.idapro = {
enable = lib.mkEnableOption "IDA Pro";
package = lib.mkPackageOption pkgs "idapro" {
example = lib.literalExpression "idapro.override { ... }";
};
binsync = {
enable = lib.mkEnableOption "IDA binsync integration";
};
};
config = lib.mkIf cfg.enable {
environment = {
systemPackages = [
idaproConfigured
];
};
};
}

View File

@ -62,6 +62,8 @@
pythonPackage ? python311, pythonPackage ? python311,
# additional python packages to make available to idapython # additional python packages to make available to idapython
pythonDeps ? [], pythonDeps ? [],
# dirs to prepend to IDAUSR
plugins ? [],
}: let }: let
defaultPythonDeps = ps: with ps; [ defaultPythonDeps = ps: with ps; [
rpyc rpyc