depot/third_party/nixpkgs/pkgs/development/python-modules/capstone/default.nix
Default email ae91cbe6cc Project import generated by Copybara.
GitOrigin-RevId: 536fe36e23ab0fc8b7f35c24603422eee9fc17a2
2021-02-05 18:12:51 +01:00

35 lines
794 B
Nix

{ lib, stdenv
, buildPythonPackage
, fetchPypi
, fetchpatch
, setuptools
, capstone
}:
buildPythonPackage rec {
pname = "capstone";
version = 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 lib; {
homepage = "http://www.capstone-engine.org/";
license = licenses.bsdOriginal;
description = "Python bindings for Capstone disassembly engine";
maintainers = with maintainers; [ bennofs ris ];
};
}