diff --git a/pkgs/by-name/hc/hcli/package.nix b/pkgs/by-name/hc/hcli/package.nix new file mode 100644 index 000000000000..58d31dd89d98 --- /dev/null +++ b/pkgs/by-name/hc/hcli/package.nix @@ -0,0 +1 @@ +{ python3Packages }: with python3Packages; toPythonApplication ida-hcli diff --git a/pkgs/development/python-modules/ida-hcli/default.nix b/pkgs/development/python-modules/ida-hcli/default.nix new file mode 100644 index 000000000000..5e43200e5e5e --- /dev/null +++ b/pkgs/development/python-modules/ida-hcli/default.nix @@ -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"; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index af9ef012f7fd..ef5734a6bd4a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7495,6 +7495,8 @@ self: super: with self; { ida-domain = callPackage ../development/python-modules/ida-domain { }; + ida-hcli = callPackage ../development/python-modules/ida-hcli { }; + idapro = callPackage ../development/python-modules/idapro { }; idasen = callPackage ../development/python-modules/idasen { };