nixpkgs/pkgs/development/python-modules/capstone/default.nix
Robert Scott 8817036a31 pythonPackages.capstone: 3.0.5.post1 -> 4.0.1, redesign as wrapper package around main capstone package
this allows us to keep the two packages in sync and handle overrides more
flexibly
2020-02-10 20:29:01 +01:00

36 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 ];
};
}