mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-13 02:39:58 +00:00
boost191: fix loongarch64-linux build (#560714)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
bison,
|
||||
# boost derivation to use for the src and version.
|
||||
# This is used by the boost derivation to build
|
||||
@@ -34,6 +35,22 @@ stdenv.mkDerivation {
|
||||
|
||||
patches =
|
||||
useBoost.boostBuildPatches or [ ]
|
||||
++
|
||||
lib.optional
|
||||
(
|
||||
useBoost ? version
|
||||
&& lib.versionAtLeast useBoost.version "1.91"
|
||||
&& lib.versionOlder useBoost.version "1.92"
|
||||
&& stdenv.hostPlatform.isLoongArch64
|
||||
)
|
||||
# Fix crash in var_defines when define string is empty
|
||||
# https://github.com/boostorg/boost/issues/1141
|
||||
(
|
||||
fetchpatch {
|
||||
url = "https://github.com/boostorg/build/commit/708353cdeb6006757e7c6971283efb53f718ae25.patch";
|
||||
hash = "sha256-9WWgQPyiKrvQY1ox6sdWoeksgNPDIy0DAbDOfQKJ5y0=";
|
||||
}
|
||||
)
|
||||
++ lib.optional (
|
||||
useBoost ? version
|
||||
&& lib.versionAtLeast useBoost.version "1.81"
|
||||
|
||||
@@ -269,7 +269,23 @@ stdenv.mkDerivation {
|
||||
hash = "sha256-0IHK55JSujYcwEVOuLkwOa/iPEkdAKQlwVWR42p/X2U=";
|
||||
}
|
||||
)
|
||||
|
||||
++
|
||||
lib.optional
|
||||
(
|
||||
lib.versionAtLeast version "1.91"
|
||||
&& lib.versionOlder version "1.92"
|
||||
&& stdenv.hostPlatform.isLoongArch64
|
||||
)
|
||||
# Fix crash in var_defines when define string is empty
|
||||
# https://github.com/boostorg/boost/issues/1141
|
||||
(
|
||||
fetchpatch {
|
||||
url = "https://github.com/boostorg/build/commit/708353cdeb6006757e7c6971283efb53f718ae25.patch";
|
||||
stripLen = 1;
|
||||
extraPrefix = "tools/build/";
|
||||
hash = "sha256-uFdxuL3DXvr/jmz7jv/q76/S8JaNF//2ogTMwG/D2nY=";
|
||||
}
|
||||
)
|
||||
++ lib.optionals (version == "1.87.0") [
|
||||
# Fix operator<< for shared_ptr and intrusive_ptr
|
||||
# https://github.com/boostorg/smart_ptr/issues/115
|
||||
|
||||
Reference in New Issue
Block a user