Author: ludo Date: Sun Feb 13 14:26:18 2011 New Revision: 25942 URL: https://svn.nixos.org/websvn/nix/?rev=25942&sc=1
Log: guile: Add `xbuild_gnu' and `xbuild_mingw'. Modified: hydra-config/gnu/trunk/cross-systems.nix hydra-config/gnu/trunk/guile/release.nix Modified: hydra-config/gnu/trunk/cross-systems.nix ============================================================================== --- hydra-config/gnu/trunk/cross-systems.nix Sun Feb 13 12:35:23 2011 (r25941) +++ hydra-config/gnu/trunk/cross-systems.nix Sun Feb 13 14:26:18 2011 (r25942) @@ -1,5 +1,5 @@ /* Continuous integration of GNU with Hydra/Nix. - Copyright (C) 2010 Ludovic Courtès <[email protected]> + Copyright (C) 2010, 2011 Ludovic Courtès <[email protected]> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -59,4 +59,11 @@ platform = pkgs.platforms.pc; libc = "glibc"; }; + + i686_pc_mingw32 = { + config = "i686-pc-mingw32"; + arch = "x86"; + libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain + platform = pkgs.platforms.pc; + }; } Modified: hydra-config/gnu/trunk/guile/release.nix ============================================================================== --- hydra-config/gnu/trunk/guile/release.nix Sun Feb 13 12:35:23 2011 (r25941) +++ hydra-config/gnu/trunk/guile/release.nix Sun Feb 13 14:26:18 2011 (r25942) @@ -37,6 +37,7 @@ }; pkgs = import nixpkgs {}; + crossSystems = (import ../cross-systems.nix) { inherit pkgs; }; buildInputsFrom = pkgs: with pkgs; [ readline libtool gmp gawk makeWrapper @@ -116,6 +117,27 @@ [ "CPPFLAGS=-DSCM_DEBUG=1" ] ]; + makeCrossBuild = from: to: + { tarball ? jobs.tarball {}, + native_guile # a native Guile build + }: + + let + crosspkgs = import nixpkgs { system = from; crossSystem = to; }; + in + crosspkgs.releaseTools.nixBuild ({ + name = "guile"; + src = tarball; + preConfigure = "export GUILE_FOR_BUILD=${native_guile}/bin/guile"; + buildNativeInputs = + [ native_guile crosspkgs.gawk crosspkgs.makeWrapper ]; + buildInputs = with crosspkgs; + [ readline libtool gmp + libunistring pkgconfig boehmgc libffi + ]; + doCheck = false; + }).hostDrv; + jobs = rec { tarball = @@ -310,6 +332,15 @@ patches = [ ./tinycc-isnan.patch ]; inherit meta buildOutOfSourceTree succeedOnFailure keepBuildDirectory; }; + + + xbuild_gnu = + # Cross build to GNU. + makeCrossBuild "i686-linux" (crossSystems.i586_pc_gnu); + + xbuild_mingw = + # Cross build to MinGW. + makeCrossBuild "i686-linux" (crossSystems.i686_pc_mingw32); } // _______________________________________________ nix-commits mailing list [email protected] http://mail.cs.uu.nl/mailman/listinfo/nix-commits
