mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 13:19:10 +03:00
boost159: fix build on aarch64-darwin
This commit is contained in:
parent
bdd431d5a0
commit
de396a3c0a
@ -1,8 +1,21 @@
|
|||||||
{ callPackage, fetchurl, ... } @ args:
|
{ callPackage, fetchurl, fetchpatch, ... } @ args:
|
||||||
|
|
||||||
callPackage ./generic.nix (args // rec {
|
callPackage ./generic.nix (args // rec {
|
||||||
version = "1.59.0";
|
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 {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2";
|
url = "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2";
|
||||||
sha256 = "1jj1aai5rdmd72g90a3pd8sw9vi32zad46xv5av8fhnr48ir6ykj";
|
sha256 = "1jj1aai5rdmd72g90a3pd8sw9vi32zad46xv5av8fhnr48ir6ykj";
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
, enableNumpy ? false
|
, enableNumpy ? false
|
||||||
, taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic))
|
, taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic))
|
||||||
, patches ? []
|
, patches ? []
|
||||||
|
, boostBuildPatches ? []
|
||||||
, useMpi ? false
|
, useMpi ? false
|
||||||
, mpi
|
, mpi
|
||||||
, extraB2Args ? []
|
, extraB2Args ? []
|
||||||
@ -170,6 +171,10 @@ stdenv.mkDerivation {
|
|||||||
(stdenv.hostPlatform.isMips64n64 && (versionOlder version "1.65"));
|
(stdenv.hostPlatform.isMips64n64 && (versionOlder version "1.65"));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
inherit boostBuildPatches;
|
||||||
|
};
|
||||||
|
|
||||||
preConfigure = optionalString useMpi ''
|
preConfigure = optionalString useMpi ''
|
||||||
cat << EOF >> user-config.jam
|
cat << EOF >> user-config.jam
|
||||||
using mpi : ${mpi}/bin/mpiCC ;
|
using mpi : ${mpi}/bin/mpiCC ;
|
||||||
|
@ -33,6 +33,8 @@ stdenv.mkDerivation {
|
|||||||
sourceRoot="$sourceRoot/tools/build"
|
sourceRoot="$sourceRoot/tools/build"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
patches = useBoost.boostBuildPatches or [];
|
||||||
|
|
||||||
# Upstream defaults to gcc on darwin, but we use clang.
|
# Upstream defaults to gcc on darwin, but we use clang.
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace src/build-system.jam \
|
substituteInPlace src/build-system.jam \
|
||||||
|
Loading…
Reference in New Issue
Block a user