summary refs log tree commit diff
path: root/pkgs/development/python-modules/angrcli
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-10-31 09:16:06 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2021-10-31 09:16:06 +0100
commit069d3c8abd626a8a2d3e8e6db51d42cfbedb9a7b (patch)
tree737baa4611d32c9f658be013336f2dc770b3b1f7 /pkgs/development/python-modules/angrcli
parentc5809ba048a8321a9ca1246ca1cccf15c141e73b (diff)
downloadnixpkgs-069d3c8abd626a8a2d3e8e6db51d42cfbedb9a7b.tar
nixpkgs-069d3c8abd626a8a2d3e8e6db51d42cfbedb9a7b.tar.gz
nixpkgs-069d3c8abd626a8a2d3e8e6db51d42cfbedb9a7b.tar.bz2
nixpkgs-069d3c8abd626a8a2d3e8e6db51d42cfbedb9a7b.tar.lz
nixpkgs-069d3c8abd626a8a2d3e8e6db51d42cfbedb9a7b.tar.xz
nixpkgs-069d3c8abd626a8a2d3e8e6db51d42cfbedb9a7b.tar.zst
nixpkgs-069d3c8abd626a8a2d3e8e6db51d42cfbedb9a7b.zip
python3Packages.angrcli: init at 1.1.1
Diffstat (limited to 'pkgs/development/python-modules/angrcli')
-rw-r--r--pkgs/development/python-modules/angrcli/default.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/angrcli/default.nix b/pkgs/development/python-modules/angrcli/default.nix
new file mode 100644
index 00000000000..612cfbec5d6
--- /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 ];
+  };
+}