From c27291414f02d7c3ae7ba51bb66228fedd61a71a Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 14 Nov 2021 17:24:20 +0000 Subject: [PATCH] python3Packages.unicorn: add custom checkPhase --- pkgs/development/python-modules/angr/default.nix | 15 ++++++++------- .../python-modules/unicorn/default.nix | 10 ++++++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/angr/default.nix b/pkgs/development/python-modules/angr/default.nix index d7b540f50ca9..c00cc93031ad 100644 --- a/pkgs/development/python-modules/angr/default.nix +++ b/pkgs/development/python-modules/angr/default.nix @@ -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 diff --git a/pkgs/development/python-modules/unicorn/default.nix b/pkgs/development/python-modules/unicorn/default.nix index c9043afa85d9..14988bde2869 100644 --- a/pkgs/development/python-modules/unicorn/default.nix +++ b/pkgs/development/python-modules/unicorn/default.nix @@ -30,6 +30,16 @@ buildPythonPackage rec { "unicorn" ]; + checkPhase = '' + runHook preCheck + + mv unicorn unicorn.hidden + patchShebangs sample_*.py shellcode.py + sh -e sample_all.sh + + runHook postCheck + ''; + meta = with lib; { description = "Python bindings for Unicorn CPU emulator engine"; homepage = "https://www.unicorn-engine.org/";