2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, buildPythonPackage, setuptools, unicorn-emu }:
|
2017-09-10 14:19:41 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "unicorn";
|
2021-01-24 00:29:22 +00:00
|
|
|
version = lib.getVersion unicorn-emu;
|
2017-09-10 14:19:41 +01:00
|
|
|
|
2019-12-31 21:24:13 +00:00
|
|
|
src = unicorn-emu.src;
|
2020-10-29 18:22:04 +00:00
|
|
|
sourceRoot = "source/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
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-12-31 21:24:13 +00:00
|
|
|
description = "Python bindings for Unicorn CPU emulator engine";
|
2020-10-02 08:58:50 +01:00
|
|
|
homepage = "https://www.unicorn-engine.org/";
|
2017-09-10 14:19:41 +01:00
|
|
|
license = [ licenses.gpl2 ];
|
2019-12-31 21:24:13 +00:00
|
|
|
maintainers = with maintainers; [ bennofs ris ];
|
2017-09-10 14:19:41 +01:00
|
|
|
};
|
|
|
|
}
|