From 843684e44e50a0ff2f8988c9f5ff9f58dcea4919 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 21 Jan 2022 14:39:41 +0800 Subject: [PATCH 1/3] release-lib: add support for riscv64-linux (cherry picked from commit NickCao@3422a2203e7a2ffa4402bd9750d3de55939c8c8a) --- pkgs/top-level/release-lib.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix index 45874d33b0f22..38e6f8072776c 100644 --- a/pkgs/top-level/release-lib.nix +++ b/pkgs/top-level/release-lib.nix @@ -27,6 +27,7 @@ rec { pkgs_x86_64_linux = packageSet' { system = "x86_64-linux"; }; pkgs_i686_linux = packageSet' { system = "i686-linux"; }; pkgs_aarch64_linux = packageSet' { system = "aarch64-linux"; }; + pkgs_riscv64_linux = packageSet' { system = "riscv64-linux"; }; pkgs_aarch64_darwin = packageSet' { system = "aarch64-darwin"; }; pkgs_armv6l_linux = packageSet' { system = "armv6l-linux"; }; pkgs_armv7l_linux = packageSet' { system = "armv7l-linux"; }; @@ -40,6 +41,7 @@ rec { if system == "x86_64-linux" then pkgs_x86_64_linux else if system == "i686-linux" then pkgs_i686_linux else if system == "aarch64-linux" then pkgs_aarch64_linux + else if system == "riscv64-linux" then pkgs_riscv64_linux else if system == "aarch64-darwin" then pkgs_aarch64_darwin else if system == "armv6l-linux" then pkgs_armv6l_linux else if system == "armv7l-linux" then pkgs_armv7l_linux From 182c974f574f82115304ff61023493af208ed720 Mon Sep 17 00:00:00 2001 From: Madoura Date: Thu, 14 Jul 2022 02:34:26 -0500 Subject: [PATCH 2/3] nlohmann_json: Enable JSON_FastTests, use JSON_BuildTests instead of BuildTests --- pkgs/development/libraries/nlohmann_json/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/nlohmann_json/default.nix b/pkgs/development/libraries/nlohmann_json/default.nix index 70699db418ad1..3c8244c755320 100644 --- a/pkgs/development/libraries/nlohmann_json/default.nix +++ b/pkgs/development/libraries/nlohmann_json/default.nix @@ -24,7 +24,8 @@ in stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ]; cmakeFlags = [ - "-DBuildTests=${if finalAttrs.doCheck then "ON" else "OFF"}" + "-DJSON_BuildTests=${if finalAttrs.doCheck then "ON" else "OFF"}" + "-DJSON_FastTests=ON" "-DJSON_MultipleHeaders=ON" ] ++ lib.optional finalAttrs.doCheck "-DJSON_TestDataDirectory=${testData}"; From b3851cdeb076471199eb63eccf42f964de997361 Mon Sep 17 00:00:00 2001 From: Madoura Date: Thu, 14 Jul 2022 19:54:23 -0500 Subject: [PATCH 3/3] aws-sdk-cpp: fix build on RISC-V hosts --- pkgs/development/libraries/aws-sdk-cpp/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/aws-sdk-cpp/default.nix b/pkgs/development/libraries/aws-sdk-cpp/default.nix index efe8129d3b4f6..25fa023abd7d8 100644 --- a/pkgs/development/libraries/aws-sdk-cpp/default.nix +++ b/pkgs/development/libraries/aws-sdk-cpp/default.nix @@ -92,6 +92,8 @@ stdenv.mkDerivation rec { # propagation is needed for Security.framework to be available when linking propagatedBuildInputs = [ aws-crt-cpp ]; + # Ensure the linker is using atomic when compiling for RISC-V, otherwise fails + LDFLAGS = lib.optionalString stdenv.hostPlatform.isRiscV "-latomic"; cmakeFlags = [ "-DBUILD_DEPS=OFF"