Making radare more flexible on build options.

svn path=/nixpkgs/trunk/; revision=17294
This commit is contained in:
Lluís Batlle i Rossell 2009-09-20 09:33:37 +00:00
parent b1a7cd1692
commit f85146e2fc
2 changed files with 23 additions and 6 deletions

View File

@ -1,7 +1,18 @@
{stdenv, fetchurl, pkgconfig, gtk, libusb, readline, lua, gtkdialog,
python, ruby, libewf, vte, perl}:
{stdenv, fetchurl, pkgconfig, libusb, readline, lua, libewf, perl,
gtk ? null, vte ? null, gtkdialog ? null,
python ? null,
ruby ? null,
useX11, rubyBindings, pythonBindings, luaBindings}:
stdenv.mkDerivation {
assert useX11 -> (gtk != null && vte != null && gtkdialog != null);
assert rubyBindings -> ruby != null;
assert pythonBindings -> python != null;
let
optional = stdenv.lib.optional;
in
stdenv.mkDerivation
{
name = "radare-1.4.2";
src = fetchurl {
@ -9,10 +20,12 @@ stdenv.mkDerivation {
sha256 = "09pai3k4x3kzq7zjfd8425jjb16fpximrhp5wyy6pwgdc82q30sd";
};
# patches = [ ./lua.patch ];
buildInputs = [pkgconfig gtk readline libusb lua gtkdialog python
ruby libewf vte perl];
buildInputs = [pkgconfig readline libusb libewf perl]
++ optional useX11 [gtkdialog vte gtk]
++ optional rubyBindings [ruby]
++ optional pythonBindings [python]
++ optional luaBindings [lua];
meta = {
description = "Free advanced command line hexadecimal editor";

View File

@ -2722,6 +2722,10 @@ let
inherit (gtkLibs) gtk;
inherit (gnome) vte;
lua = lua5;
useX11 = getConfig ["radare" "useX11"] false;
pythonBindings = getConfig ["radare" "pythonBindings"] false;
rubyBindings = getConfig ["radare" "rubyBindings"] false;
luaBindings = getConfig ["radare" "luaBindings"] false;
};
ragel = import ../development/tools/parsing/ragel {