5 # boost derivation to use for the src and version.
6 # This is used by the boost derivation to build
7 # a b2 matching their version (by overriding this
8 # argument). Infinite recursion is not an issue
9 # since we only look at src and version of boost.
14 defaultVersion = "4.4.1";
18 pname = "boost-build";
21 then "boost-${useBoost.version}"
24 src = useBoost.src or (fetchFromGitHub {
28 sha256 = "1r4rwlq87ydmsdqrik4ly5iai796qalvw7603mridg2nwcbbnf54";
31 # b2 is in a subdirectory of boost source tarballs
32 postUnpack = lib.optionalString (useBoost ? src) ''
33 sourceRoot="$sourceRoot/tools/build"
36 patches = useBoost.boostBuildPatches or [];
38 # Upstream defaults to gcc on darwin, but we use clang.
40 substituteInPlace src/build-system.jam \
41 --replace "default-toolset = darwin" "default-toolset = clang-darwin"
42 '' + lib.optionalString (useBoost ? version && lib.versionAtLeast useBoost.version "1.82") ''
43 patchShebangs --build src/engine/build.sh
59 ./b2 install --prefix="$out"
61 # older versions of b2 created this symlink,
62 # which we want to support building via useBoost.
63 test -e "$out/bin/bjam" || ln -s b2 "$out/bin/bjam"
69 homepage = "https://www.boost.org/build/";
70 license = lib.licenses.boost;
71 platforms = platforms.unix;
72 maintainers = with maintainers; [ ivan-tkatchev ];