python3Packages.capa: init at 9.4.0 (#527591)

This commit is contained in:
Fabian Affolter
2026-06-04 11:28:45 +00:00
committed by GitHub
10 changed files with 429 additions and 3 deletions
+1
View File
@@ -0,0 +1 @@
{ python3Packages }: with python3Packages; toPythonApplication capa
+1
View File
@@ -0,0 +1 @@
{ python3Packages }: with python3Packages; toPythonApplication ida-hcli
@@ -0,0 +1,131 @@
{
lib,
buildPythonPackage,
colorama,
deptry,
dncil,
dnfile,
fetchFromGitHub,
humanize,
ida-netnode,
ida-settings,
jschema-to-python,
msgspec,
mypy-protobuf,
mypy,
networkx,
pefile,
protobuf,
psutil,
pydantic,
pyelftools,
pyghidra,
pygithub,
pytest-instafail,
pytest-sugar,
pytestCheckHook,
python-flirt,
pyyaml,
requests,
rich,
ruamel-yaml,
sarif-om,
setuptools-scm,
setuptools,
stix2,
types-colorama,
types-protobuf,
types-psutil,
types-pyyaml,
types-requests,
viv-utils,
vivisect,
writableTmpDirAsHomeHook,
xmltodict,
}:
buildPythonPackage (finalAttrs: {
pname = "capa";
version = "9.4.0";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "mandiant";
repo = "capa";
tag = "v${finalAttrs.version}";
hash = "sha256-h9ML+TJe9NprBEy4W7XKahmUTM0d4vY0zIFs6MxYzZ8=";
fetchSubmodules = true;
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [
colorama
dncil
dnfile
humanize
ida-netnode
ida-settings
msgspec
networkx
pefile
protobuf
pydantic
pyelftools
python-flirt
pyyaml
rich
ruamel-yaml
viv-utils
vivisect
xmltodict
];
optional-dependencies = {
ghidra = [ pyghidra ];
scripts = [
jschema-to-python
psutil
requests
sarif-om
stix2
];
};
nativeCheckInputs = [
pygithub
pytestCheckHook
pytest-instafail
pytest-sugar
types-colorama
types-protobuf
types-psutil
types-pyyaml
types-requests
writableTmpDirAsHomeHook
];
pythonImportsCheck = [ "capa" ];
disabledTests = [
# AssertionError
"test_is_dev_environment"
"test_rule_cache_dev_environment"
"test_scripts"
"test_binexport_scripts"
];
meta = {
description = "Tool to identify capabilities in executable files";
homepage = "https://github.com/mandiant/capa";
changelog = "https://github.com/mandiant/capa/blob/${finalAttrs.src.tag}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "capa";
};
})
@@ -0,0 +1,59 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
graphviz,
idapro,
nix-update-script,
packaging,
pytest-cov-stub,
pytestCheckHook,
setuptools,
typing-extensions,
writableTmpDirAsHomeHook,
}:
buildPythonPackage (finalAttrs: {
pname = "ida-domain";
version = "0.5.0";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "HexRaysSA";
repo = "ida-domain";
tag = "v${finalAttrs.version}";
hash = "sha256-oa3VQgWDEr4tPQ166EugfS7QrW1DlRb/hwypwKP+Xv4=";
};
build-system = [ setuptools ];
dependencies = [
idapro
packaging
typing-extensions
];
nativeCheckInputs = [
graphviz
pytest-cov-stub
pytestCheckHook
writableTmpDirAsHomeHook
];
# Requires IDE to be installed
doCheck = false;
# pythonImportsCheck = [ "ida_domain" ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Python interface for IDA Pro reverse engineering platform";
homepage = "https://github.com/HexRaysSA/ida-domain";
changelog = "https://github.com/HexRaysSA/ida-domain/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
})
@@ -0,0 +1,93 @@
{
lib,
buildPythonPackage,
click,
fetchFromGitHub,
httpx,
idapro,
nix-update-script,
packaging,
pexpect,
pip,
platformdirs,
pydantic,
pytest-asyncio,
pytest-httpx,
pytest-mock,
pytestCheckHook,
questionary,
rich-click,
rich,
semantic-version,
setuptools,
tenacity,
tomli,
writableTmpDirAsHomeHook,
}:
buildPythonPackage (finalAttrs: {
pname = "ida-hcli";
version = "0.18.1";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "HexRaysSA";
repo = "ida-hcli";
tag = "v${finalAttrs.version}";
hash = "sha256-p7nmibfasnkfvCDHp+luh3VYq7oZ843TfudN1Ce8mLY=";
};
build-system = [ setuptools ];
dependencies = [
click
httpx
idapro
packaging
pip
platformdirs
pydantic
questionary
rich
rich-click
semantic-version
tenacity
tomli
];
nativeCheckInputs = [
pexpect
pytest-asyncio
pytest-httpx
pytest-mock
pytestCheckHook
writableTmpDirAsHomeHook
];
pythonImportsCheck = [ "hcli" ];
disabledTestPaths = [
# Tests require IDA to be installed and configured
"tests/integration/"
"tests/lib/test_ida_python.py"
"tests/lib/test_ida.py"
"tests/lib/test_plugin_bundle_install.py"
"tests/lib/test_plugin_collisions.py"
"tests/lib/test_plugin_install.py"
"tests/lib/test_plugin_records.py"
"tests/lib/test_plugin_settings.py"
];
passthru.updateScript = nix-update-script { };
meta = {
description = "CLI for IDA plugin management and configuration";
homepage = "https://github.com/HexRaysSA/ida-hcli";
changelog = "https://github.com/HexRaysSA/ida-hcli/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "hcli";
};
})
@@ -0,0 +1,42 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
nix-update-script,
setuptools,
six,
}:
buildPythonPackage (finalAttrs: {
pname = "ida-netnode";
version = "3.0.0";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "williballenthin";
repo = "ida-netnode";
tag = "v${finalAttrs.version}";
hash = "sha256-hXApNeeDYHX41zuYDpSNqSXdM/c8DoVXuB6NMqYf7iU=";
};
build-system = [ setuptools ];
dependencies = [ six ];
# Module has no test and requires IDA to be installed
doCheck = false;
# pythonImportsCheck = [ "netnode"];
passthru.updateScript = nix-update-script { };
meta = {
description = "Humane API for storing and accessing persistent data in IDA Pro databases";
homepage = "https://github.com/williballenthin/ida-netnode";
changelog = "https://github.com/williballenthin/ida-netnode/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fab ];
};
})
@@ -0,0 +1,47 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
uv-build,
ida-hcli,
nix-update-script,
}:
buildPythonPackage (finalAttrs: {
pname = "ida-settings";
version = "3.4.1";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "williballenthin";
repo = "ida-settings";
tag = "v${finalAttrs.version}";
hash = "sha256-YPkJ/yn7ZmEYZJART6oFLO7zIqzgPl2XCq5RfXasFV0=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "uv_build>=0.8.6,<0.9.0" "uv_build"
'';
build-system = [ uv-build ];
dependencies = [ ida-hcli ];
pythonImportsCheck = [ "ida_settings" ];
# Module has no tests
doCheck = false;
passthru.updateScript = nix-update-script { };
meta = {
description = "Fetch and set configuration values for IDA Plugins";
homepage = "https://github.com/williballenthin/ida-settings";
changelog = "https://github.com/williballenthin/ida-settings/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fab ];
};
})
@@ -0,0 +1,40 @@
{
lib,
buildPythonPackage,
fetchPypi,
nix-update-script,
setuptools,
writableTmpDirAsHomeHook,
}:
buildPythonPackage (finalAttrs: {
pname = "idapro";
version = "0.0.9";
pyproject = true;
__structuredAttrs = true;
src = fetchPypi {
inherit (finalAttrs) pname version;
hash = "sha256-igQ6ic5QdTPlAuj2WBpPtYut4l6PpgSVRbeexjZ5LjU=";
};
build-system = [ setuptools ];
nativeBuildInputs = [ writableTmpDirAsHomeHook ];
# Module has no tests
doCheck = false;
# Requires IDE to be installed
# pythonImportsCheck = [ "idapro" ];
passthru.updateScript = nix-update-script { };
meta = {
description = "IDA Library Python module";
homepage = "https://pypi.org/project/idapro";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
})
@@ -7,7 +7,7 @@
libiconv,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "python-flirt";
version = "0.9.10";
pyproject = true;
@@ -15,7 +15,7 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "williballenthin";
repo = "lancelot";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-fZZTEBkpCE5L4efcNGzAuxCWgOSqc2r77F5U6kpMU6M=";
};
@@ -47,4 +47,4 @@ buildPythonPackage rec {
license = lib.licenses.asl20;
maintainers = [ ];
};
}
})
+12
View File
@@ -2508,6 +2508,8 @@ self: super: with self; {
cantools = callPackage ../development/python-modules/cantools { };
capa = callPackage ../development/python-modules/capa { };
capstone = callPackage ../development/python-modules/capstone { inherit (pkgs) capstone; };
capstone_4 = callPackage ../development/python-modules/capstone/4.nix {
@@ -7493,6 +7495,16 @@ self: super: with self; {
id = callPackage ../development/python-modules/id { };
ida-domain = callPackage ../development/python-modules/ida-domain { };
ida-hcli = callPackage ../development/python-modules/ida-hcli { };
ida-netnode = callPackage ../development/python-modules/ida-netnode { };
ida-settings = callPackage ../development/python-modules/ida-settings { };
idapro = callPackage ../development/python-modules/idapro { };
idasen = callPackage ../development/python-modules/idasen { };
idasen-ha = callPackage ../development/python-modules/idasen-ha { };