mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
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
This commit is contained in:
parent
a8c0c21f78
commit
8817036a31
2 changed files with 15 additions and 25 deletions
|
@ -3,43 +3,33 @@
|
|||
, fetchPypi
|
||||
, fetchpatch
|
||||
, setuptools
|
||||
, capstone
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "capstone";
|
||||
version = "3.0.5.post1";
|
||||
version = stdenv.lib.getVersion capstone;
|
||||
|
||||
setupPyBuildFlags = [
|
||||
"--plat-name x86_64-linux"
|
||||
];
|
||||
src = capstone.src;
|
||||
sourceRoot = "${capstone.name}/bindings/python";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "3c0f73db9f8392f7048c8a244809f154d7c39f354e2167f6c477630aa517ed04";
|
||||
};
|
||||
postPatch = ''
|
||||
ln -s ${capstone}/lib/libcapstone${stdenv.targetPlatform.extensions.sharedLibrary} prebuilt/
|
||||
ln -s ${capstone}/lib/libcapstone.a prebuilt/
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ setuptools ];
|
||||
|
||||
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
|
||||
checkPhase = ''
|
||||
mv capstone capstone.hidden
|
||||
patchShebangs test_*
|
||||
make check
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "http://www.capstone-engine.org/";
|
||||
license = licenses.bsdOriginal;
|
||||
description = "Capstone disassembly engine";
|
||||
maintainers = with maintainers; [ bennofs ];
|
||||
description = "Python bindings for Capstone disassembly engine";
|
||||
maintainers = with maintainers; [ bennofs ris ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1816,7 +1816,7 @@ in {
|
|||
inherit (self) python numpy boost;
|
||||
});
|
||||
|
||||
capstone = callPackage ../development/python-modules/capstone { };
|
||||
capstone = callPackage ../development/python-modules/capstone { inherit (pkgs) capstone; };
|
||||
|
||||
capturer = callPackage ../development/python-modules/capturer { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue