2024-04-21 15:54:59 +00:00
|
|
|
{ lib
|
2021-12-06 16:07:01 +00:00
|
|
|
, angr
|
|
|
|
, buildPythonPackage
|
|
|
|
, cmd2
|
|
|
|
, coreutils
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pygments
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-04-21 15:54:59 +00:00
|
|
|
, setuptools
|
|
|
|
, stdenv
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "angrcli";
|
2021-12-30 13:39:12 +00:00
|
|
|
version = "1.2.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fmagin";
|
|
|
|
repo = "angr-cli";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-01-19 23:45:15 +00:00
|
|
|
hash = "sha256-a5ajUBQwt3xUNkeSOeGOAFf47wd4UVk+LcuAHGqbq4s=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/test_derefs.py \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail "/bin/ls" "${coreutils}/bin/ls"
|
2023-08-22 20:05:09 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [
|
2021-12-06 16:07:01 +00:00
|
|
|
angr
|
|
|
|
cmd2
|
|
|
|
pygments
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
coreutils
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
disabledTests = lib.optionals (!stdenv.hostPlatform.isx86) [
|
|
|
|
# expects the x86 register "rax" to exist
|
|
|
|
"test_cc"
|
|
|
|
"test_loop"
|
|
|
|
"test_max_depth"
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"angrcli"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python modules to allow easier interactive use of angr";
|
|
|
|
homepage = "https://github.com/fmagin/angr-cli";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|