summary refs log tree commit diff
path: root/pkgs/development/libraries/unicorn-emu/default.nix
blob: 7917b69540648eea1d65beb37360e429fef88210 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ stdenv, fetchurl, pkgconfig, python }:

stdenv.mkDerivation rec {
  pname = "unicorn-emulator";
  version = "1.0.1";

  src = fetchurl {
    url    = "https://github.com/unicorn-engine/unicorn/archive/${version}.tar.gz";
    sha256 = "0z01apwmvhvdldm372ww9pjfn45awkw3m90c0h4v0nj0ihmlysis";
  };

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

  nativeBuildInputs = [ pkgconfig python ];
  enableParallelBuilding = true;

  meta = {
    description = "Lightweight multi-platform CPU emulator library";
    homepage    = "http://www.unicorn-engine.org";
    license     = stdenv.lib.licenses.bsd3;
    platforms   = stdenv.lib.platforms.unix;
    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
  };
}