diff options
author | Andrew Childs <lorne@cons.org.nz> | 2022-02-15 00:37:55 +0900 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2022-05-08 22:22:22 +0300 |
commit | de396a3c0a6f6b6c94c1fb188a476cb274b7d351 (patch) | |
tree | e60affbced58b0ff11932e545fccd0faa7a4b0c8 /pkgs/development | |
parent | bdd431d5a014598daf7505e34ad5c71b896cf09b (diff) | |
download | nixpkgs-de396a3c0a6f6b6c94c1fb188a476cb274b7d351.tar nixpkgs-de396a3c0a6f6b6c94c1fb188a476cb274b7d351.tar.gz nixpkgs-de396a3c0a6f6b6c94c1fb188a476cb274b7d351.tar.bz2 nixpkgs-de396a3c0a6f6b6c94c1fb188a476cb274b7d351.tar.lz nixpkgs-de396a3c0a6f6b6c94c1fb188a476cb274b7d351.tar.xz nixpkgs-de396a3c0a6f6b6c94c1fb188a476cb274b7d351.tar.zst nixpkgs-de396a3c0a6f6b6c94c1fb188a476cb274b7d351.zip |
boost159: fix build on aarch64-darwin
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/boost/1.59.nix | 15 | ||||
-rw-r--r-- | pkgs/development/libraries/boost/generic.nix | 5 | ||||
-rw-r--r-- | pkgs/development/tools/boost-build/default.nix | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/pkgs/development/libraries/boost/1.59.nix b/pkgs/development/libraries/boost/1.59.nix index 88e584f5e41..a417f3e2639 100644 --- a/pkgs/development/libraries/boost/1.59.nix +++ b/pkgs/development/libraries/boost/1.59.nix @@ -1,8 +1,21 @@ -{ callPackage, fetchurl, ... } @ args: +{ callPackage, fetchurl, fetchpatch, ... } @ args: callPackage ./generic.nix (args // rec { version = "1.59.0"; + boostBuildPatches = [ + # Fixes a segfault on aarch64-darwin from an implicitly defined varargs function. + # https://github.com/boostorg/build/pull/238 + (fetchpatch { + url = "https://github.com/boostorg/build/commit/48e9017139dd94446633480661e5447c7e0d8b1b.diff"; + excludes = [ + # Doesn't apply, isn't critical. + "src/engine/filesys.h" + ]; + sha256 = "sha256-/HLOJKBcGqcK9yBYKSRCSMmTNhCH3sSpK1s3OzkIqx8"; + }) + ]; + src = fetchurl { url = "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"; sha256 = "1jj1aai5rdmd72g90a3pd8sw9vi32zad46xv5av8fhnr48ir6ykj"; diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 34ab5554e74..b9bdec0cd07 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -15,6 +15,7 @@ , enableNumpy ? false , taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic)) , patches ? [] +, boostBuildPatches ? [] , useMpi ? false , mpi , extraB2Args ? [] @@ -170,6 +171,10 @@ stdenv.mkDerivation { (stdenv.hostPlatform.isMips64n64 && (versionOlder version "1.65")); }; + passthru = { + inherit boostBuildPatches; + }; + preConfigure = optionalString useMpi '' cat << EOF >> user-config.jam using mpi : ${mpi}/bin/mpiCC ; diff --git a/pkgs/development/tools/boost-build/default.nix b/pkgs/development/tools/boost-build/default.nix index 044589a9664..cc15d9a67cc 100644 --- a/pkgs/development/tools/boost-build/default.nix +++ b/pkgs/development/tools/boost-build/default.nix @@ -33,6 +33,8 @@ stdenv.mkDerivation { sourceRoot="$sourceRoot/tools/build" ''; + patches = useBoost.boostBuildPatches or []; + # Upstream defaults to gcc on darwin, but we use clang. postPatch = '' substituteInPlace src/build-system.jam \ |