nixpkgs/pkgs/development/python-modules/capstone/default.nix
Alyssa Ross 9de30004db
python3.pkgs.capstone: mark broken on non-x86_64
Since this tries to build an x86_64 wheel, it won't work on any
non-x86_64 platform.  It doesn't make sense to single out aarch64
here.
2021-11-13 11:36:25 +00:00

38 lines
910 B
Nix

{ lib
, buildPythonPackage
, capstone
, stdenv
, setuptools
}:
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/
substituteInPlace setup.py --replace manylinux1 manylinux2014
'';
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 ];
# creates a manylinux2014-x86_64 wheel
broken = !stdenv.isx86_64;
};
}