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-02-10 20:34:41 +00:00
|
|
|
version = "1.0.7";
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "727a27ac1eb95d5a41f4430f6912e79940525551314fe68a2811fc9d51eaf2e9";
|
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;
|
|
|
|
};
|
|
|
|
}
|