about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pcodedmp/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pcodedmp/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pcodedmp/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pcodedmp/default.nix b/nixpkgs/pkgs/development/python-modules/pcodedmp/default.nix
new file mode 100644
index 000000000000..84f230f5852f
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/pcodedmp/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "pcodedmp";
+  version = "1.2.6";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.8";
+
+  src = fetchFromGitHub {
+    owner = "bontchev";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-SYOFGMvrzxDPMACaCvqwU28Mh9LEuvFBGvAph4X+geo=";
+  };
+
+  postPatch = ''
+    # Circular dependency
+    substituteInPlace setup.py \
+      --replace "'oletools>=0.54'," ""
+  '';
+
+  # Module doesn't have tests
+  doCheck = false;
+
+  pythonImportsCheck = [
+    "pcodedmp"
+  ];
+
+  meta = with lib; {
+    description = "Python VBA p-code disassembler";
+    homepage = "https://github.com/bontchev/pcodedmp";
+    license = with licenses; [ gpl3Only ];
+    maintainers = with maintainers; [ fab ];
+  };
+}