aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/unicorn/default.nix
blob: 8bd6507bb5ba01afccef2cdb70785f26fb0eb42c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ stdenv, buildPythonPackage, setuptools, unicorn-emu }:

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

  src = unicorn-emu.src;
  sourceRoot = "source/bindings/python";

  prePatch = ''
    ln -s ${unicorn-emu}/lib/libunicorn${stdenv.targetPlatform.extensions.sharedLibrary} prebuilt/
    ln -s ${unicorn-emu}/lib/libunicorn.a prebuilt/
  '';

  propagatedBuildInputs = [ setuptools ];

  meta = with stdenv.lib; {
    description = "Python bindings for Unicorn CPU emulator engine";
    homepage = "https://www.unicorn-engine.org/";
    license = [ licenses.gpl2 ];
    maintainers = with maintainers; [ bennofs ris ];
  };
}