5a8b500490
GitOrigin-RevId: 1ca6b0a0cc38dbba0441202535c92841dd39d1ae
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{ lib
|
|
, angr
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, progressbar
|
|
, pythonOlder
|
|
, tqdm
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "angrop";
|
|
version = "9.0.7833";
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "angr";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-JhD4/P5/IhmLBvmG3XoIEYVkowK+dDoLuwOdMhGi5q8=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
angr
|
|
progressbar
|
|
tqdm
|
|
];
|
|
|
|
postPatch = ''
|
|
# https://github.com/angr/angrop/issues/35
|
|
substituteInPlace setup.py \
|
|
--replace "packages=['angrop']," "packages=find_packages()," \
|
|
--replace "from distutils.core import setup" "from setuptools import find_packages, setup"
|
|
'';
|
|
|
|
# Tests have additional requirements, e.g., angr binaries
|
|
# cle is executing the tests with the angr binaries already and is a requirement of angr
|
|
doCheck = false;
|
|
pythonImportsCheck = [ "angrop" ];
|
|
|
|
meta = with lib; {
|
|
description = "ROP gadget finder and chain builder";
|
|
homepage = "https://github.com/angr/angrop";
|
|
license = with licenses; [ bsd2 ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|