Merge #145974: unicorn: fix build on aarch64 + py checks

This commit is contained in:
Vladimír Čunát 2021-11-20 16:34:57 +01:00
commit 118dfcc019
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
2 changed files with 20 additions and 9 deletions

View File

@ -30,14 +30,15 @@
let
# Only the pinned release in setup.py works properly
unicorn' = unicorn.overridePythonAttrs (old: rec {
pname = "unicorn";
version = "1.0.2-rc4";
src = fetchFromGitHub {
owner = "unicorn-engine";
repo = pname;
rev = version;
sha256 = "17nyccgk7hpc4hab24yn57f1xnmr7kq4px98zbp2bkwcrxny8gwy";
pname = "unicorn";
version = "1.0.2-rc4";
src = fetchFromGitHub {
owner = "unicorn-engine";
repo = pname;
rev = version;
sha256 = "17nyccgk7hpc4hab24yn57f1xnmr7kq4px98zbp2bkwcrxny8gwy";
};
doCheck = false;
});
in

View File

@ -19,12 +19,22 @@ buildPythonPackage rec {
ln -s ${unicorn-emu}/lib/libunicorn.a prebuilt/
'';
# needed on non-x86 linux
setupPyBuildFlags = lib.optionals stdenv.isLinux [ "--plat-name" "linux" ];
propagatedBuildInputs = [
setuptools
];
# No tests present
doCheck = false;
checkPhase = ''
runHook preCheck
mv unicorn unicorn.hidden
patchShebangs sample_*.py shellcode.py
sh -e sample_all.sh
runHook postCheck
'';
pythonImportsCheck = [
"unicorn"