summary refs log tree commit diff
path: root/pkgs/development/python-modules/capstone
diff options
context:
space:
mode:
authorChris Ostrouchov <chris.ostrouchov@gmail.com>2018-10-15 11:53:02 -0400
committerFrederik Rietdijk <fridh@fridh.nl>2018-10-17 07:46:55 +0200
commit9bbf54ea2daaa15111af5d4973fe98375a419727 (patch)
tree7103a649b7c3378c119d2786b5088ddb4692df65 /pkgs/development/python-modules/capstone
parent564c6f0f369c964a584c9cf46b0e67c3080b1903 (diff)
downloadnixpkgs-9bbf54ea2daaa15111af5d4973fe98375a419727.tar
nixpkgs-9bbf54ea2daaa15111af5d4973fe98375a419727.tar.gz
nixpkgs-9bbf54ea2daaa15111af5d4973fe98375a419727.tar.bz2
nixpkgs-9bbf54ea2daaa15111af5d4973fe98375a419727.tar.lz
nixpkgs-9bbf54ea2daaa15111af5d4973fe98375a419727.tar.xz
nixpkgs-9bbf54ea2daaa15111af5d4973fe98375a419727.tar.zst
nixpkgs-9bbf54ea2daaa15111af5d4973fe98375a419727.zip
pythonPackages.capstone: refactor move to python-modules
Diffstat (limited to 'pkgs/development/python-modules/capstone')
-rw-r--r--pkgs/development/python-modules/capstone/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/capstone/default.nix b/pkgs/development/python-modules/capstone/default.nix
new file mode 100644
index 00000000000..91e00ed7e43
--- /dev/null
+++ b/pkgs/development/python-modules/capstone/default.nix
@@ -0,0 +1,38 @@
+{ stdenv
+, buildPythonPackage
+, fetchPypi
+, fetchpatch
+}:
+
+buildPythonPackage rec {
+  pname = "capstone";
+  version = "3.0.4";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "945d3b8c3646a1c3914824c416439e2cf2df8969dd722c8979cdcc23b40ad225";
+  };
+
+  patches = [
+    (fetchpatch {
+      stripLen = 2;
+      url = "https://patch-diff.githubusercontent.com/raw/aquynh/capstone/pull/783/commits/23fe9f36622573c747e2bab6119ff245437bf276.patch";
+      sha256 = "0yizqrdlxqxn16873593kdx2vrr7gvvilhgcf9xy6hr0603d3m5r";
+    })
+  ];
+
+  postPatch = ''
+    patchShebangs src/make.sh
+  '';
+
+  preCheck = ''
+    mv src/libcapstone.so capstone
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "http://www.capstone-engine.org/";
+    license = licenses.bsdOriginal;
+    description = "Capstone disassembly engine";
+    maintainers = with maintainers; [ bennofs ];
+  };
+}