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
|
@ -3,43 +3,33 @@
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
, setuptools
|
, setuptools
|
||||||
|
, capstone
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "capstone";
|
pname = "capstone";
|
||||||
version = "3.0.5.post1";
|
version = stdenv.lib.getVersion capstone;
|
||||||
|
|
||||||
setupPyBuildFlags = [
|
src = capstone.src;
|
||||||
"--plat-name x86_64-linux"
|
sourceRoot = "${capstone.name}/bindings/python";
|
||||||
];
|
|
||||||
|
|
||||||
src = fetchPypi {
|
postPatch = ''
|
||||||
inherit pname version;
|
ln -s ${capstone}/lib/libcapstone${stdenv.targetPlatform.extensions.sharedLibrary} prebuilt/
|
||||||
sha256 = "3c0f73db9f8392f7048c8a244809f154d7c39f354e2167f6c477630aa517ed04";
|
ln -s ${capstone}/lib/libcapstone.a prebuilt/
|
||||||
};
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [ setuptools ];
|
propagatedBuildInputs = [ setuptools ];
|
||||||
|
|
||||||
patches = [
|
checkPhase = ''
|
||||||
(fetchpatch {
|
mv capstone capstone.hidden
|
||||||
stripLen = 2;
|
patchShebangs test_*
|
||||||
url = "https://patch-diff.githubusercontent.com/raw/aquynh/capstone/pull/783/commits/23fe9f36622573c747e2bab6119ff245437bf276.patch";
|
make check
|
||||||
sha256 = "0yizqrdlxqxn16873593kdx2vrr7gvvilhgcf9xy6hr0603d3m5r";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
patchShebangs src/make.sh
|
|
||||||
'';
|
|
||||||
|
|
||||||
preCheck = ''
|
|
||||||
mv src/libcapstone.so capstone
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "http://www.capstone-engine.org/";
|
homepage = "http://www.capstone-engine.org/";
|
||||||
license = licenses.bsdOriginal;
|
license = licenses.bsdOriginal;
|
||||||
description = "Capstone disassembly engine";
|
description = "Python bindings for Capstone disassembly engine";
|
||||||
maintainers = with maintainers; [ bennofs ];
|
maintainers = with maintainers; [ bennofs ris ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1816,7 +1816,7 @@ in {
|
||||||
inherit (self) python numpy boost;
|
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 { };
|
capturer = callPackage ../development/python-modules/capturer { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue