diff --git a/pkgs/development/python-modules/pypcode/default.nix b/pkgs/development/python-modules/pypcode/default.nix new file mode 100644 index 000000000000..ca01377ca14e --- /dev/null +++ b/pkgs/development/python-modules/pypcode/default.nix @@ -0,0 +1,53 @@ +{ + lib, + buildPythonPackage, + cmake, + fetchFromGitHub, + nanobind, + pytest-cov-stub, + pytestCheckHook, + setuptools, +}: + +buildPythonPackage (finalAttrs: { + pname = "pypcode"; + version = "3.3.3"; + pyproject = true; + + src = fetchFromGitHub { + owner = "angr"; + repo = "pypcode"; + tag = "v${finalAttrs.version}"; + hash = "sha256-m3Ee1n6TIbcihTwz1ihpn10gC1YsSlFO17Gj0QVya2A="; + }; + + build-system = [ + cmake + setuptools + nanobind + ]; + + dontUseCmakeConfigure = true; + + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; + + pythonImportsCheck = [ "pypcode" ]; + + preCheck = '' + cd .. + ''; + + meta = { + description = "Machine code disassembly and IR translation library"; + homepage = "https://github.com/angr/pypcode"; + license = with lib.licenses; [ + bsd2 + asl20 + zlib + ]; + maintainers = with lib.maintainers; [ feyorsh ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f3df14ac530c..363c6562ed11 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14432,6 +14432,8 @@ self: super: with self; { pypck = callPackage ../development/python-modules/pypck { }; + pypcode = callPackage ../development/python-modules/pypcode { }; + pypdf = callPackage ../development/python-modules/pypdf { }; pypdf2 = callPackage ../development/python-modules/pypdf2 { };