2019-12-31 21:24:13 +00:00
|
|
|
{ stdenv, buildPythonPackage, setuptools, unicorn-emu }:
|
2017-09-10 14:19:41 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "unicorn";
|
2019-12-31 21:24:13 +00:00
|
|
|
version = stdenv.lib.getVersion unicorn-emu;
|
2017-09-10 14:19:41 +01:00
|
|
|
|
2019-12-31 21:24:13 +00:00
|
|
|
src = unicorn-emu.src;
|
|
|
|
sourceRoot = "unicorn-${version}/bindings/python";
|
2017-09-10 14:19:41 +01:00
|
|
|
|
2019-12-31 21:24:13 +00:00
|
|
|
prePatch = ''
|
|
|
|
ln -s ${unicorn-emu}/lib/libunicorn${stdenv.targetPlatform.extensions.sharedLibrary} prebuilt/
|
|
|
|
ln -s ${unicorn-emu}/lib/libunicorn.a prebuilt/
|
|
|
|
'';
|
2017-09-10 14:19:41 +01:00
|
|
|
|
2019-12-31 21:24:13 +00:00
|
|
|
propagatedBuildInputs = [ setuptools ];
|
2017-09-10 14:19:41 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2019-12-31 21:24:13 +00:00
|
|
|
description = "Python bindings for Unicorn CPU emulator engine";
|
2017-09-10 14:19:41 +01:00
|
|
|
homepage = "http://www.unicorn-engine.org/";
|
|
|
|
license = [ licenses.gpl2 ];
|
2019-12-31 21:24:13 +00:00
|
|
|
maintainers = with maintainers; [ bennofs ris ];
|
2017-09-10 14:19:41 +01:00
|
|
|
};
|
|
|
|
}
|