about summary refs log tree commit diff
path: root/pkgs/development/tools/analysis
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-09-20 09:33:37 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-09-20 09:33:37 +0000
commitf85146e2fc3e640486b565440f13222613df51c7 (patch)
treef3109ceb0590a822929ae9eb808d552b3c29581c /pkgs/development/tools/analysis
parentb1a7cd1692e7b964cc6248aad9cc618ede99d141 (diff)
Making radare more flexible on build options.
svn path=/nixpkgs/trunk/; revision=17294
Diffstat (limited to 'pkgs/development/tools/analysis')
-rw-r--r--pkgs/development/tools/analysis/radare/default.nix25
1 files changed, 19 insertions, 6 deletions
diff --git a/pkgs/development/tools/analysis/radare/default.nix b/pkgs/development/tools/analysis/radare/default.nix
index 236fcf3f6303f..29451430d43ce 100644
--- a/pkgs/development/tools/analysis/radare/default.nix
+++ b/pkgs/development/tools/analysis/radare/default.nix
@@ -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";