lol

python3Packages.libbs: init at 2.8.0 (#369305)

authored by

Fabian Affolter and committed by
GitHub
7315a337 3e8f4560

+255
+43
pkgs/development/python-modules/ghidra-bridge/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + jfx-bridge, 6 + setuptools, 7 + }: 8 + 9 + buildPythonPackage rec { 10 + pname = "ghidra-bridge"; 11 + version = "1.0.0"; 12 + pyproject = true; 13 + 14 + src = fetchFromGitHub { 15 + owner = "justfoxing"; 16 + repo = "ghidra_bridge"; 17 + tag = version; 18 + hash = "sha256-VcAl1tamsuHvZRtBP0+DCl2A9d7E6aoj2AbJhEcBNMM="; 19 + }; 20 + 21 + patches = [ ./no-invoke-git.patch ]; 22 + 23 + postPatch = '' 24 + substituteInPlace ./setup.py --subst-var-by version ${version} 25 + ''; 26 + 27 + build-system = [ setuptools ]; 28 + 29 + dependencies = [ jfx-bridge ]; 30 + 31 + # Tests require a running server instance 32 + doCheck = false; 33 + 34 + pythonImportsCheck = [ "ghidra_bridge" ]; 35 + 36 + meta = { 37 + description = "Python bridge to Ghidra's Python scripting"; 38 + homepage = "https://github.com/justfoxing/ghidra_bridge"; 39 + changelog = "https://github.com/justfoxing/ghidra_bridge/releases/tag/${src.tag}"; 40 + license = lib.licenses.mit; 41 + maintainers = with lib.maintainers; [ scoder12 ]; 42 + }; 43 + }
+13
pkgs/development/python-modules/ghidra-bridge/no-invoke-git.patch
··· 1 + diff --git a/setup.py b/setup.py 2 + index 9a2abe0..75ce109 100644 3 + --- a/setup.py 4 + +++ b/setup.py 5 + @@ -6,7 +6,7 @@ with open("README.md", "r") as fh: 6 + 7 + # determine the version, then write it out into the bridge.py file 8 + version = ( 9 + - subprocess.check_output("git describe --tags", shell=True).decode("utf-8").strip() 10 + + "@version@" 11 + ) 12 + # check if this is a non-tag release and remark it as a dev release 13 + if "-" in version:
+52
pkgs/development/python-modules/jfx-bridge/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + pytestCheckHook, 6 + python, 7 + setuptools, 8 + }: 9 + 10 + buildPythonPackage rec { 11 + pname = "jfx-bridge"; 12 + version = "1.0.0"; 13 + pyproject = true; 14 + 15 + src = fetchFromGitHub { 16 + owner = "justfoxing"; 17 + repo = "jfx_bridge"; 18 + tag = version; 19 + hash = "sha256-fpUrKNGqTpthhTfohCbwO1GBDAP/YnLWeapVhZftldg="; 20 + }; 21 + 22 + patches = [ ./no-invoke-git.patch ]; 23 + 24 + postPatch = '' 25 + substituteInPlace ./setup.py --subst-var-by version ${version} 26 + ''; 27 + 28 + build-system = [ setuptools ]; 29 + 30 + nativeCheckInputs = [ pytestCheckHook ]; 31 + 32 + preCheck = '' 33 + ${python.interpreter} test_bridge_server.py & 34 + ''; 35 + 36 + disabledTests = [ 37 + # known to cause timeout with newer python (acknowledged in test comment) 38 + "test_nonreturn_marker_local" 39 + # the mechanisms that hook into the python import machinery seem broken on newer python 40 + "TestBridgeHookImport" 41 + ]; 42 + 43 + pythonImportsCheck = [ "jfx_bridge" ]; 44 + 45 + meta = { 46 + description = "Base Python RPC bridge used for ghidra_bridge"; 47 + homepage = "https://github.com/justfoxing/jfx_bridge"; 48 + changelog = "https://github.com/justfoxing/jfx_bridge/releases/tag/${src.tag}"; 49 + license = lib.licenses.mit; 50 + maintainers = with lib.maintainers; [ scoder12 ]; 51 + }; 52 + }
+13
pkgs/development/python-modules/jfx-bridge/no-invoke-git.patch
··· 1 + diff --git a/setup.py b/setup.py 2 + index 079cb01..c5e71b8 100644 3 + --- a/setup.py 4 + +++ b/setup.py 5 + @@ -6,7 +6,7 @@ with open("README.md", "r") as fh: 6 + long_description = fh.read() 7 + 8 + # determine the version, then write it out into the bridge.py file 9 + -version = subprocess.check_output("git describe --tags", shell=True).decode("utf-8").strip() 10 + +version = "@version@" 11 + # check if this is a non-tag release and remark it as a dev release 12 + if "-" in version: 13 + ver, commits, hash = version.split("-")
+69
pkgs/development/python-modules/libbs/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + filelock, 6 + ghidra-bridge, 7 + jfx-bridge, 8 + networkx, 9 + platformdirs, 10 + prompt-toolkit, 11 + psutil, 12 + pycparser, 13 + pyhidra, 14 + pytestCheckHook, 15 + setuptools, 16 + toml, 17 + tqdm, 18 + writableTmpDirAsHomeHook, 19 + }: 20 + 21 + buildPythonPackage rec { 22 + pname = "libbs"; 23 + version = "2.11.1"; 24 + pyproject = true; 25 + 26 + src = fetchFromGitHub { 27 + owner = "binsync"; 28 + repo = "libbs"; 29 + tag = "v${version}"; 30 + hash = "sha256-hYRRmnxA6K7O6suaP1eGRnY89gok3JNNsL70XRGWYBU="; 31 + }; 32 + 33 + build-system = [ setuptools ]; 34 + 35 + dependencies = [ 36 + filelock 37 + ghidra-bridge 38 + jfx-bridge 39 + networkx 40 + platformdirs 41 + prompt-toolkit 42 + psutil 43 + pycparser 44 + pyhidra 45 + toml 46 + tqdm 47 + ]; 48 + 49 + nativeCheckInputs = [ 50 + pytestCheckHook 51 + writableTmpDirAsHomeHook 52 + ]; 53 + 54 + pythonImportsCheck = [ "libbs" ]; 55 + 56 + disabledTests = [ 57 + "test_change_watcher_plugin_cli" 58 + "test_ghidra_artifact_watchers" 59 + "TestHeadlessInterfaces" 60 + ]; 61 + 62 + meta = { 63 + description = "Library for writing plugins in any decompiler: includes API lifting, common data formatting, and GUI abstraction"; 64 + homepage = "https://github.com/binsync/libbs"; 65 + changelog = "https://github.com/binsync/libbs/releases/tag/${src.tag}"; 66 + license = lib.licenses.bsd2; 67 + maintainers = with lib.maintainers; [ scoder12 ]; 68 + }; 69 + }
+57
pkgs/development/python-modules/pyhidra/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + jpype1, 6 + pytest-datadir, 7 + pytestCheckHook, 8 + setuptools, 9 + }: 10 + 11 + buildPythonPackage rec { 12 + pname = "pyhidra"; 13 + version = "1.3.0"; 14 + pyproject = true; 15 + 16 + src = fetchFromGitHub { 17 + owner = "dod-cyber-crime-center"; 18 + repo = "pyhidra"; 19 + tag = version; 20 + hash = "sha256-8xouU+S7Apy1ySIlvOLPerTApqKy/MNdl9vuBdt+9Vk="; 21 + }; 22 + 23 + build-system = [ setuptools ]; 24 + 25 + dependencies = [ jpype1 ]; 26 + 27 + nativeCheckInputs = [ 28 + pytest-datadir 29 + pytestCheckHook 30 + ]; 31 + 32 + pythonImportsCheck = [ "pyhidra" ]; 33 + 34 + disabledTests = [ 35 + # Tests require a running Ghidra instance 36 + "test_invalid_jpype_keyword_arg" 37 + "test_invalid_vm_arg_succeed" 38 + "test_run_script" 39 + "test_open_program" 40 + "test_no_compiler" 41 + "test_no_language_with_compiler" 42 + "test_loader" 43 + "test_invalid_loader_type" 44 + "test_no_project" 45 + "test_no_program" 46 + "test_import_script" 47 + "test_import_ghidra_base_java_packages" 48 + ]; 49 + 50 + meta = { 51 + description = "Provides direct access to the Ghidra API within a native CPython interpreter using jpype"; 52 + homepage = "https://github.com/dod-cyber-crime-center/pyhidra"; 53 + changelog = "https://github.com/dod-cyber-crime-center/pyhidra/blob/${src.tag}/CHANGELOG.md"; 54 + license = lib.licenses.mit; 55 + maintainers = with lib.maintainers; [ scoder12 ]; 56 + }; 57 + }
+8
pkgs/top-level/python-packages.nix
··· 5373 5373 5374 5374 ghdiff = callPackage ../development/python-modules/ghdiff { }; 5375 5375 5376 + ghidra-bridge = callPackage ../development/python-modules/ghidra-bridge { }; 5377 + 5376 5378 ghome-foyer-api = callPackage ../development/python-modules/ghome-foyer-api { }; 5377 5379 5378 5380 ghp-import = callPackage ../development/python-modules/ghp-import { }; ··· 6802 6804 6803 6805 jh2 = callPackage ../development/python-modules/jh2 { }; 6804 6806 6807 + jfx-bridge = callPackage ../development/python-modules/jfx-bridge { }; 6808 + 6805 6809 jianpu-ly = callPackage ../development/python-modules/jianpu-ly { }; 6806 6810 6807 6811 jieba = callPackage ../development/python-modules/jieba { }; ··· 7445 7449 lib4package = callPackage ../development/python-modules/lib4package { }; 7446 7450 7447 7451 libagent = callPackage ../development/python-modules/libagent { }; 7452 + 7453 + libbs = callPackage ../development/python-modules/libbs { }; 7448 7454 7449 7455 pa-ringbuffer = callPackage ../development/python-modules/pa-ringbuffer { }; 7450 7456 ··· 10923 10929 pyheos = callPackage ../development/python-modules/pyheos { }; 10924 10930 10925 10931 pyhepmc = callPackage ../development/python-modules/pyhepmc { }; 10932 + 10933 + pyhidra = callPackage ../development/python-modules/pyhidra { }; 10926 10934 10927 10935 pyhive-integration = callPackage ../development/python-modules/pyhive-integration { }; 10928 10936