From 827142a7fa9aeec6aec3d4ddd8cb7053c5f2d870 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Thu, 30 Nov 2017 00:11:45 -0600 Subject: [PATCH] nixpkgs: add unicorn-emulator library 1.0.1 Signed-off-by: Austin Seipp --- .../libraries/unicorn-emu/default.nix | 26 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 27 insertions(+) create mode 100644 pkgs/development/libraries/unicorn-emu/default.nix diff --git a/pkgs/development/libraries/unicorn-emu/default.nix b/pkgs/development/libraries/unicorn-emu/default.nix new file mode 100644 index 000000000000..9f9d8e62de50 --- /dev/null +++ b/pkgs/development/libraries/unicorn-emu/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, bash, pkgconfig, python }: + +stdenv.mkDerivation rec { + name = "unicorn-emulator-${version}"; + 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 ''; + 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.linux; + maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 945a03484d34..3605a92673f7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -855,6 +855,7 @@ with pkgs; traefik = callPackage ../servers/traefik { }; capstone = callPackage ../development/libraries/capstone { }; + unicorn-emu = callPackage ../development/libraries/unicorn-emu { }; cataract = callPackage ../applications/misc/cataract { }; cataract-unstable = callPackage ../applications/misc/cataract/unstable.nix { };