1{
2 lib,
3 buildPythonPackage,
4 cxxfilt,
5 fetchPypi,
6 msgpack,
7 pyasn1,
8 pyasn1-modules,
9 pycparser,
10 pyqt5,
11 pythonRelaxDepsHook,
12 pyqtwebengine,
13 pythonOlder,
14 withGui ? false,
15 wrapQtAppsHook,
16}:
17
18buildPythonPackage rec {
19 pname = "vivisect";
20 version = "1.1.1";
21 format = "setuptools";
22
23 disabled = pythonOlder "3.6";
24
25 src = fetchPypi {
26 inherit pname version;
27 hash = "sha256-URRBEZelw4s43zqtb/GrLxIksvrqHbqQWntT9jVonhU=";
28 };
29
30 pythonRelaxDeps = [
31 "cxxfilt"
32 "pyasn1"
33 "pyasn1-modules"
34 ];
35
36 nativeBuildInputs = [
37 pythonRelaxDepsHook
38 wrapQtAppsHook
39 ];
40
41 propagatedBuildInputs = [
42 pyasn1
43 pyasn1-modules
44 cxxfilt
45 msgpack
46 pycparser
47 ] ++ lib.optionals (withGui) passthru.optional-dependencies.gui;
48
49 passthru.optional-dependencies.gui = [
50 pyqt5
51 pyqtwebengine
52 ];
53
54 postFixup = ''
55 wrapQtApp $out/bin/vivbin
56 '';
57
58 # requires another repo for test files
59 doCheck = false;
60
61 pythonImportsCheck = [ "vivisect" ];
62
63 meta = with lib; {
64 description = "Python disassembler, debugger, emulator, and static analysis framework";
65 homepage = "https://github.com/vivisect/vivisect";
66 changelog = "https://github.com/vivisect/vivisect/blob/v${version}/CHANGELOG.rst";
67 license = licenses.asl20;
68 maintainers = [ ];
69 };
70}