Author: viric
Date: Sat Dec  4 10:35:04 2010
New Revision: 24965
URL: https://svn.nixos.org/websvn/nix/?rev=24965&sc=1

Log:
Making gdb cross-build (python apart)

Modified:
   nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/gdb/default.nix

Modified: 
nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/gdb/default.nix
==============================================================================
--- nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/gdb/default.nix 
Fri Dec  3 11:27:57 2010        (r24964)
+++ nixpkgs/branches/stdenv-updates/pkgs/development/tools/misc/gdb/default.nix 
Sat Dec  4 10:35:04 2010        (r24965)
@@ -13,7 +13,10 @@
     sha256 = "1w0h6hya0bl46xddd57mdzwmffplwglhnh9x9hv46ll4mf44ni5z";
   };
 
-  buildInputs = [ ncurses readline gmp mpfr expat texinfo python ]
+  # I think python is not a native input, but I leave it
+  # here while I will not need it cross building
+  buildNativeInputs = [ texinfo python ];
+  buildInputs = [ ncurses readline gmp mpfr expat ]
     ++ stdenv.lib.optional doCheck dejagnu;
 
   configureFlags =
@@ -22,6 +25,14 @@
     '' + stdenv.lib.optionalString (target != null)
        " --target=${target.config}";
 
+  crossAttrs = {
+    configureFlags =
+      '' --with-gmp=${gmp.hostDrv} --with-mpfr=${mpfr.hostDrv} 
--with-system-readline
+         --with-expat --with-libexpat-prefix=${expat.hostDrv}
+      '' + stdenv.lib.optionalString (target != null)
+         " --target=${target.config}";
+  };
+
   postInstall =
     '' # Remove Info files already provided by Binutils and other packages.
        rm -v $out/share/info/{standards,configure,bfd}.info
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to