From 50bf72a24901303d6f1f31b15e4509af3ee4adda Mon Sep 17 00:00:00 2001 From: psondej Date: Sun, 17 Dec 2023 22:28:17 +0100 Subject: [PATCH] unicorn: fix build on riscv --- pkgs/development/libraries/unicorn/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/unicorn/default.nix b/pkgs/development/libraries/unicorn/default.nix index 89adbc102578..b6a91a7367a4 100644 --- a/pkgs/development/libraries/unicorn/default.nix +++ b/pkgs/development/libraries/unicorn/default.nix @@ -29,6 +29,9 @@ stdenv.mkDerivation rec { IOKit ]; + # Ensure the linker is using atomic when compiling for RISC-V, otherwise fails + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isRiscV "-latomic"; + cmakeFlags = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ # Some x86 tests are interrupted by signal 10 "-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;test_x86"