2021-04-25 03:57:28 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, fetchPypi
|
2022-04-27 09:35:20 +00:00
|
|
|
, wrapQtAppsHook
|
|
|
|
|
|
|
|
# propagates
|
2021-04-25 03:57:28 +00:00
|
|
|
, pyasn1
|
|
|
|
, pyasn1-modules
|
|
|
|
, cxxfilt
|
|
|
|
, msgpack
|
|
|
|
, pycparser
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
# extras: gui
|
|
|
|
, pyqt5
|
|
|
|
, pyqtwebengine
|
|
|
|
|
|
|
|
# knobs
|
|
|
|
, withGui ? false
|
2021-04-25 03:57:28 +00:00
|
|
|
}:
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "vivisect";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "1.0.8";
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-Y8y6sAQJa9baPPdhtuR9Jv1tJkNWJsS1hJ1lknkHWU4=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'cxxfilt>=0.2.1,<0.3.0' 'cxxfilt'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyasn1
|
|
|
|
pyasn1-modules
|
|
|
|
cxxfilt
|
|
|
|
msgpack
|
|
|
|
pycparser
|
2022-06-16 17:23:12 +00:00
|
|
|
] ++ lib.optionals (withGui) passthru.optional-dependencies.gui;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.optional-dependencies.gui = [
|
2022-04-27 09:35:20 +00:00
|
|
|
pyqt5
|
|
|
|
pyqtwebengine
|
2021-04-25 03:57:28 +00:00
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postFixup = ''
|
|
|
|
wrapQtApp $out/bin/vivbin
|
2021-04-25 03:57:28 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# requires another repo for test files
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"vivisect"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Pure python disassembler, debugger, emulator, and static analysis framework";
|
|
|
|
homepage = "https://github.com/vivisect/vivisect";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = teams.determinatesystems.members;
|
|
|
|
};
|
|
|
|
}
|