Author: viric
Date: Wed Sep 15 09:56:06 2010
New Revision: 23807
URL: https://svn.nixos.org/websvn/nix/?rev=23807&sc=1
Log:
Making lua and boost cross-build.
Modified:
nixpkgs/trunk/pkgs/development/interpreters/lua-5/default.nix
nixpkgs/trunk/pkgs/development/libraries/boost/default.nix
Modified: nixpkgs/trunk/pkgs/development/interpreters/lua-5/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/interpreters/lua-5/default.nix Wed Sep
15 08:42:46 2010 (r23806)
+++ nixpkgs/trunk/pkgs/development/interpreters/lua-5/default.nix Wed Sep
15 09:56:06 2010 (r23807)
@@ -23,6 +23,15 @@
'';
buildInputs = [ ncurses readline ];
+ crossAttrs = {
+ preBuild = ''
+ sed -i -e "s/ gcc/$crossConfig-gcc/" \
+ -e "s/ ar/$crossConfig-ar/" \
+ -e "s/ ranlib/$crossConfig-ranlib/" \
+ src/Makefile
+ '';
+ };
+
meta = {
homepage = "http://www.lua.org";
description = "Lua is a powerful, fast, lightweight, embeddable scripting
language.";
Modified: nixpkgs/trunk/pkgs/development/libraries/boost/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/libraries/boost/default.nix Wed Sep 15
08:42:46 2010 (r23806)
+++ nixpkgs/trunk/pkgs/development/libraries/boost/default.nix Wed Sep 15
09:56:06 2010 (r23807)
@@ -58,4 +58,23 @@
buildPhase = "./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat}/include
-sEXPAT_LIBPATH=${expat}/lib --layout=${finalLayout} variant=${variant}
threading=${threading} link=${link} ${cflags} install";
installPhase = ":";
+
+ crossAttrs = rec {
+ buildInputs = [ expat.hostDrv zlib.hostDrv bzip2.hostDrv ];
+ # all buildInputs set previously fell into propagatedBuildInputs, as
usual, so we have to
+ # override them.
+ propagatedBuildInputs = buildInputs;
+ # We want to substitute the contents of configureFlags, removing thus the
+ # usual --build and --host added on cross building.
+ preConfigure = ''
+ export configureFlags="--prefix=$out --without-icu"
+ '';
+ buildPhase = ''
+ set -x
+ cat << EOF > user-config.jam
+ using gcc : cross : $crossConfig-g++ ;
+ EOF
+ ./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include
-sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${finalLayout}
--user-config=user-config.jam toolset=gcc-cross variant=${variant}
threading=${threading} link=${link} ${cflags} --without-python install
+ '';
+ };
}
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits