2020-07-26 15:47:12 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, python, cmocka, hexdump, writeScriptBin, binutils-unwrapped }:
|
2017-11-30 06:11:45 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "unicorn-emulator";
|
2020-07-26 15:47:12 +01:00
|
|
|
version = "1.0.2-rc4";
|
2017-11-30 06:11:45 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/unicorn-engine/unicorn/archive/${version}.tar.gz";
|
2020-07-26 15:47:12 +01:00
|
|
|
sha256 = "05w43jq3r97l3c8ggc745ai8m5l93p1b6q6cfp1zwzz6hl5kifiv";
|
2017-11-30 06:11:45 +00:00
|
|
|
};
|
|
|
|
|
2020-07-26 15:47:12 +01:00
|
|
|
PREFIX = placeholder "out";
|
|
|
|
MACOS_UNIVERSAL = stdenv.lib.optionalString stdenv.isDarwin "no";
|
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error";
|
|
|
|
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
cmocka
|
|
|
|
hexdump
|
|
|
|
python.pkgs.setuptools
|
|
|
|
];
|
2017-11-30 06:11:45 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig python ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Lightweight multi-platform CPU emulator library";
|
|
|
|
homepage = "http://www.unicorn-engine.org";
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
2019-12-31 21:22:44 +00:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2017-11-30 06:11:45 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|