depot/third_party/nixpkgs/pkgs/development/python-modules/capstone/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

35 lines
803 B
Nix

{ stdenv
, buildPythonPackage
, fetchPypi
, fetchpatch
, setuptools
, capstone
}:
buildPythonPackage rec {
pname = "capstone";
version = stdenv.lib.getVersion capstone;
src = capstone.src;
sourceRoot = "${capstone.name}/bindings/python";
postPatch = ''
ln -s ${capstone}/lib/libcapstone${stdenv.targetPlatform.extensions.sharedLibrary} prebuilt/
ln -s ${capstone}/lib/libcapstone.a prebuilt/
'';
propagatedBuildInputs = [ setuptools ];
checkPhase = ''
mv capstone capstone.hidden
patchShebangs test_*
make check
'';
meta = with stdenv.lib; {
homepage = "http://www.capstone-engine.org/";
license = licenses.bsdOriginal;
description = "Python bindings for Capstone disassembly engine";
maintainers = with maintainers; [ bennofs ris ];
};
}