From e74305a9b3051fa35fe21748d098e33db838fd33 Mon Sep 17 00:00:00 2001 From: oxalica Date: Fri, 26 Feb 2021 01:23:09 +0800 Subject: [PATCH 1/2] boost: fix meta.badPlatforms --- pkgs/development/libraries/boost/generic.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index abff1268bfae4..422c1d7b391cb 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -132,7 +132,8 @@ stdenv.mkDerivation { license = licenses.boost; platforms = platforms.unix ++ platforms.windows; badPlatforms = optional (versionOlder version "1.59") "aarch64-linux" - ++ optional ((versionOlder version "1.57") || version == "1.58") "x86_64-darwin"; + ++ optional ((versionOlder version "1.57") || version == "1.58") "x86_64-darwin" + ++ optionals (versionOlder version "1.73") lib.platforms.riscv; maintainers = with maintainers; [ peti ]; }; From 8978e4bde0019a719c0e301b9909592340885c57 Mon Sep 17 00:00:00 2001 From: oxalica Date: Sat, 27 Feb 2021 11:06:21 +0800 Subject: [PATCH 2/2] boost: fix cross-compile support --- pkgs/development/libraries/boost/generic.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 422c1d7b391cb..6158eb8751173 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -150,6 +150,9 @@ stdenv.mkDerivation { cat << EOF >> user-config.jam using gcc : cross : ${stdenv.cc.targetPrefix}c++ ; EOF + # Build b2 with buildPlatform CC/CXX. + sed '2i export CC=$CC_FOR_BUILD; export CXX=$CXX_FOR_BUILD' \ + -i ./tools/build/src/engine/build.sh ''; NIX_CFLAGS_LINK = lib.optionalString stdenv.isDarwin