Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from Jan 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkgs/development/libraries/unicorn-emu/default.nix
Expand Up @@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
};

configurePhase = '' patchShebangs make.sh '';
buildPhase = '' ./make.sh '';
buildPhase = '' ./make.sh '' + stdenv.lib.optionalString stdenv.isDarwin "macos-universal-no";
installPhase = '' env PREFIX=$out ./make.sh install '';

nativeBuildInputs = [ pkgconfig python ];
Expand All @@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
description = "Lightweight multi-platform CPU emulator library";
homepage = "http://www.unicorn-engine.org";
license = stdenv.lib.licenses.bsd3;
platforms = stdenv.lib.platforms.linux;
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
};
}
22 changes: 11 additions & 11 deletions pkgs/development/python-modules/unicorn/default.nix
@@ -1,23 +1,23 @@
{ stdenv, buildPackages, buildPythonPackage, fetchPypi }:
{ stdenv, buildPythonPackage, setuptools, unicorn-emu }:

buildPythonPackage rec {
pname = "unicorn";
version = "1.0.1";
version = stdenv.lib.getVersion unicorn-emu;

src = fetchPypi {
inherit pname version;
sha256 = "0a5b4vh734b3wfkgapzzf8x18rimpmzvwwkly56da84n27wfw9bg";
};
src = unicorn-emu.src;
sourceRoot = "unicorn-${version}/bindings/python";

# needs python2 at build time
PYTHON=buildPackages.python2.interpreter;
prePatch = ''
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; {
description = "Unicorn CPU emulator engine";
description = "Python bindings for Unicorn CPU emulator engine";
homepage = "http://www.unicorn-engine.org/";
license = [ licenses.gpl2 ];
maintainers = [ maintainers.bennofs ];
maintainers = with maintainers; [ bennofs ris ];
};
}