pythonPackages.unicorn: redesign to become a wrapper package around unicorn-emu

this allows us to easily keep the two in sync and gives a more flexible
result, also add self as co-maintainer.
This commit is contained in:
Robert Scott 2019-12-31 21:24:13 +00:00 committed by Austin Seipp
parent 7766de0a53
commit 8b3e1e72a7

View File

@ -1,23 +1,23 @@
{ stdenv, buildPackages, buildPythonPackage, fetchPypi }: { stdenv, buildPythonPackage, setuptools, unicorn-emu }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "unicorn"; pname = "unicorn";
version = "1.0.1"; version = stdenv.lib.getVersion unicorn-emu;
src = fetchPypi { src = unicorn-emu.src;
inherit pname version; sourceRoot = "unicorn-${version}/bindings/python";
sha256 = "0a5b4vh734b3wfkgapzzf8x18rimpmzvwwkly56da84n27wfw9bg";
};
# needs python2 at build time prePatch = ''
PYTHON=buildPackages.python2.interpreter; ln -s ${unicorn-emu}/lib/libunicorn${stdenv.targetPlatform.extensions.sharedLibrary} prebuilt/
ln -s ${unicorn-emu}/lib/libunicorn.a prebuilt/
'';
setupPyBuildFlags = [ "--plat-name" "linux" ]; propagatedBuildInputs = [ setuptools ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Unicorn CPU emulator engine"; description = "Python bindings for Unicorn CPU emulator engine";
homepage = "http://www.unicorn-engine.org/"; homepage = "http://www.unicorn-engine.org/";
license = [ licenses.gpl2 ]; license = [ licenses.gpl2 ];
maintainers = [ maintainers.bennofs ]; maintainers = with maintainers; [ bennofs ris ];
}; };
} }