Merge pull request #29814 from abbradar/new-boost
Update Boost to 1.65 and make it default
This commit is contained in:
12
pkgs/development/libraries/boost/1.65.nix
Normal file
12
pkgs/development/libraries/boost/1.65.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ stdenv, callPackage, fetchurl, ... } @ args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "1.65.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/boost/boost_1_65_1.tar.bz2";
|
||||
# SHA256 from http://www.boost.org/users/history/version_1_65_1.html
|
||||
sha256 = "9807a5d16566c57fd74fb522764e0b134a8bbe6b6e8967b83afefd30dcd3be81";
|
||||
};
|
||||
|
||||
})
|
||||
@@ -9,6 +9,8 @@
|
||||
, enableStatic ? !enableShared
|
||||
, enablePIC ? false
|
||||
, enableExceptions ? false
|
||||
, enablePython ? hostPlatform == buildPlatform
|
||||
, enableNumpy ? false, numpy ? null
|
||||
, taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic))
|
||||
, patches ? null
|
||||
, mpi ? null
|
||||
@@ -21,6 +23,9 @@
|
||||
# We must build at least one type of libraries
|
||||
assert !enableShared -> enableStatic;
|
||||
|
||||
assert enablePython -> hostPlatform == buildPlatform;
|
||||
assert enableNumpy -> enablePython;
|
||||
|
||||
with stdenv.lib;
|
||||
let
|
||||
|
||||
@@ -62,7 +67,8 @@ let
|
||||
] ++ optional (link != "static") "runtime-link=${runtime-link}" ++ [
|
||||
"link=${link}"
|
||||
"${cflags}"
|
||||
] ++ optional (variant == "release") "debug-symbols=off";
|
||||
] ++ optional (variant == "release") "debug-symbols=off"
|
||||
++ optional (!enablePython) "--without-python";
|
||||
|
||||
nativeB2Flags = [
|
||||
"-sEXPAT_INCLUDE=${expat.dev}/include"
|
||||
@@ -76,7 +82,6 @@ let
|
||||
"-sEXPAT_LIBPATH=${expat.crossDrv}/lib"
|
||||
"--user-config=user-config.jam"
|
||||
"toolset=gcc-cross"
|
||||
"--without-python"
|
||||
] ++ optionals (hostPlatform.libc == "msvcrt") [
|
||||
"target-os=windows"
|
||||
"threadapi=win32"
|
||||
@@ -148,8 +153,10 @@ stdenv.mkDerivation {
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = [ expat zlib bzip2 libiconv ]
|
||||
++ stdenv.lib.optionals (hostPlatform == buildPlatform) [ python icu ]
|
||||
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||
++ optional (hostPlatform == buildPlatform) icu
|
||||
++ optional stdenv.isDarwin fixDarwinDylibNames
|
||||
++ optional enablePython python
|
||||
++ optional enableNumpy numpy;
|
||||
|
||||
configureScript = "./bootstrap.sh";
|
||||
configureFlags = commonConfigureFlags
|
||||
|
||||
Reference in New Issue
Block a user