diff options
author | Shea Levy <shea@shealevy.com> | 2014-01-14 07:23:48 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2014-01-14 07:23:48 -0500 |
commit | cc26a4b80328ac86f572feca3b6152bb75748f60 (patch) | |
tree | ebd5c6257938f8a54e3546f531d6c1bd0aa09fc5 /pkgs/development/libraries/boost/1.55.nix | |
parent | f0037b85d15591f2bd04f29ddf739500b2187fd6 (diff) | |
download | nixpkgs-cc26a4b80328ac86f572feca3b6152bb75748f60.tar nixpkgs-cc26a4b80328ac86f572feca3b6152bb75748f60.tar.gz nixpkgs-cc26a4b80328ac86f572feca3b6152bb75748f60.tar.bz2 nixpkgs-cc26a4b80328ac86f572feca3b6152bb75748f60.tar.lz nixpkgs-cc26a4b80328ac86f572feca3b6152bb75748f60.tar.xz nixpkgs-cc26a4b80328ac86f572feca3b6152bb75748f60.tar.zst nixpkgs-cc26a4b80328ac86f572feca3b6152bb75748f60.zip |
boost: enable setting toolset
Contribution suggested/initially implemented by Martin Bravenboer Signed-off-by: Shea Levy <shea@shealevy.com>
Diffstat (limited to 'pkgs/development/libraries/boost/1.55.nix')
-rw-r--r-- | pkgs/development/libraries/boost/1.55.nix | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pkgs/development/libraries/boost/1.55.nix b/pkgs/development/libraries/boost/1.55.nix index 3ae54c22be3..1847a236fd0 100644 --- a/pkgs/development/libraries/boost/1.55.nix +++ b/pkgs/development/libraries/boost/1.55.nix @@ -1,4 +1,5 @@ { stdenv, fetchurl, icu, expat, zlib, bzip2, python +, toolset ? null , enableRelease ? true , enableDebug ? false , enableSingleThreaded ? false @@ -35,6 +36,8 @@ let "cflags=-fexceptions" else ""; + + withToolset = stdenv.lib.optionalString (toolset != null) " --with-toolset=${toolset}"; in stdenv.mkDerivation { @@ -59,15 +62,15 @@ stdenv.mkDerivation { buildInputs = [icu expat zlib bzip2 python]; configureScript = "./bootstrap.sh"; - configureFlags = "--with-icu=${icu} --with-python=${python}/bin/python"; + configureFlags = "--with-icu=${icu} --with-python=${python}/bin/python" + withToolset; - buildPhase = "./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=${layout} variant=${variant} threading=${threading} link=${link} ${cflags} install"; + buildPhase = "${stdenv.lib.optionalString (toolset == "clang") "unset NIX_ENFORCE_PURITY; "}./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=${layout} variant=${variant} threading=${threading} link=${link} ${cflags} install${withToolset}"; # normal install does not install bjam, this is a separate step installPhase = '' cd tools/build/v2 - sh bootstrap.sh - ./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=${layout} variant=${variant} threading=${threading} link=${link} ${cflags} install + sh bootstrap.sh${withToolset} + ./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=${layout} variant=${variant} threading=${threading} link=${link} ${cflags} install${withToolset} ''; crossAttrs = rec { |