diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/boost')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/boost/1.67.nix | 4 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/boost/1.71.nix | 2 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/boost/generic.nix | 15 |
3 files changed, 11 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/libraries/boost/1.67.nix b/nixpkgs/pkgs/development/libraries/boost/1.67.nix index 31f545ab12be..29993ed02b8c 100644 --- a/nixpkgs/pkgs/development/libraries/boost/1.67.nix +++ b/nixpkgs/pkgs/development/libraries/boost/1.67.nix @@ -1,4 +1,4 @@ -{ stdenv, callPackage, fetchurl, fetchpatch, ... } @ args: +{ lib, stdenv, callPackage, fetchurl, fetchpatch, ... } @ args: callPackage ./generic.nix (args // { version = "1.67.0"; @@ -9,7 +9,7 @@ callPackage ./generic.nix (args // { sha256 = "0x65nkwzv8fdacj8sw5njl3v63jj19dirrpklbwy6qpsncw7fc7h"; stripLen = 1; }) - ] ++ stdenv.lib.optionals stdenv.cc.isClang [ + ] ++ lib.optionals stdenv.cc.isClang [ # Fixes https://github.com/boostorg/atomic/issues/15 (fetchpatch { url = "https://github.com/boostorg/atomic/commit/6e14ca24dab50ad4c1fa8c27c7dd6f1cb791b534.patch"; diff --git a/nixpkgs/pkgs/development/libraries/boost/1.71.nix b/nixpkgs/pkgs/development/libraries/boost/1.71.nix index f66bd4cd6fb1..7b128e25bb60 100644 --- a/nixpkgs/pkgs/development/libraries/boost/1.71.nix +++ b/nixpkgs/pkgs/development/libraries/boost/1.71.nix @@ -5,7 +5,7 @@ callPackage ./generic.nix (args // rec { src = fetchurl { #url = "mirror://sourceforge/boost/boost_1_71_0.tar.bz2"; - urls = [ + urls = [ "mirror://sourceforge/boost/boost_1_71_0.tar.bz2" "https://dl.bintray.com/boostorg/release/1.71.0/source/boost_1_71_0.tar.bz2" ]; diff --git a/nixpkgs/pkgs/development/libraries/boost/generic.nix b/nixpkgs/pkgs/development/libraries/boost/generic.nix index ec3a28e2b1a3..abff1268bfae 100644 --- a/nixpkgs/pkgs/development/libraries/boost/generic.nix +++ b/nixpkgs/pkgs/development/libraries/boost/generic.nix @@ -1,4 +1,4 @@ -{ stdenv, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, libiconv +{ lib, stdenv, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, libiconv , fetchpatch , which , buildPackages @@ -14,7 +14,8 @@ , enableNumpy ? false , taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic)) , patches ? [] -, mpi ? null +, useMpi ? false +, mpi , extraB2Args ? [] # Attributes inherit from specific versions @@ -30,9 +31,9 @@ assert enablePython -> stdenv.hostPlatform == stdenv.buildPlatform; assert enableNumpy -> enablePython; # Boost <1.69 can't be build with clang >8, because pth was removed -assert with stdenv.lib; ((toolset == "clang" && !(versionOlder stdenv.cc.version "8.0.0")) -> !(versionOlder version "1.69")); +assert with lib; ((toolset == "clang" && !(versionOlder stdenv.cc.version "8.0.0")) -> !(versionOlder version "1.69")); -with stdenv.lib; +with lib; let variant = concatStringsSep "," @@ -94,7 +95,7 @@ let ++ optional (variant == "release") "debug-symbols=off" ++ optional (toolset != null) "toolset=${toolset}" ++ optional (!enablePython) "--without-python" - ++ optional (mpi != null || stdenv.hostPlatform != stdenv.buildPlatform) "--user-config=user-config.jam" + ++ optional (useMpi || stdenv.hostPlatform != stdenv.buildPlatform) "--user-config=user-config.jam" ++ optionals (stdenv.hostPlatform.libc == "msvcrt") [ "threadapi=win32" ] ++ extraB2Args @@ -140,7 +141,7 @@ stdenv.mkDerivation { substituteInPlace tools/build/src/tools/clang-darwin.jam \ --replace '@rpath/$(<[1]:D=)' "$out/lib/\$(<[1]:D=)"; fi; - '' + optionalString (mpi != null) '' + '' + optionalString useMpi '' cat << EOF >> user-config.jam using mpi : ${mpi}/bin/mpiCC ; EOF @@ -150,7 +151,7 @@ stdenv.mkDerivation { EOF ''; - NIX_CFLAGS_LINK = stdenv.lib.optionalString stdenv.isDarwin + NIX_CFLAGS_LINK = lib.optionalString stdenv.isDarwin "-headerpad_max_install_names"; enableParallelBuilding = true; |