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