diff --git a/pkgs/development/python-modules/angrcli/default.nix b/pkgs/development/python-modules/angrcli/default.nix new file mode 100644 index 000000000000..612cfbec5d6d --- /dev/null +++ b/pkgs/development/python-modules/angrcli/default.nix @@ -0,0 +1,59 @@ +{ lib +, angr +, buildPythonPackage +, cmd2 +, coreutils +, fetchFromGitHub +, pygments +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "angrcli"; + version = "1.1.1"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "fmagin"; + repo = "angr-cli"; + rev = "v${version}"; + sha256 = "0mz3yzsw08xwpj6188rxmr7darilh4ismcnh8nhp9945wjyzl4kr"; + }; + + propagatedBuildInputs = [ + angr + cmd2 + pygments + ]; + + checkInputs = [ + coreutils + pytestCheckHook + ]; + + postPatch = '' + # Version mismatch, https://github.com/fmagin/angr-cli/pull/11 + substituteInPlace setup.py \ + --replace "version='1.1.0'," "version='${version}'," + substituteInPlace tests/test_derefs.py \ + --replace "/bin/ls" "${coreutils}/bin/ls" + ''; + + disabledTests = [ + "test_sims" + ]; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 299330a031df..702d88725fff 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -461,6 +461,10 @@ in { angr = callPackage ../development/python-modules/angr { }; + angrcli = callPackage ../development/python-modules/angrcli { + inherit (pkgs) coreutils; + }; + angrop = callPackage ../development/python-modules/angrop { }; aniso8601 = callPackage ../development/python-modules/aniso8601 { };