From f204042a37ff26330b38363f2b3d60e93ce76baa Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Wed, 28 May 2025 14:09:15 +0200 Subject: [PATCH] libfaketime: fix tests on loongarch64 and riscv64 --- pkgs/by-name/li/libfaketime/package.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/li/libfaketime/package.nix b/pkgs/by-name/li/libfaketime/package.nix index 4a48a3881806..6feb112f8074 100644 --- a/pkgs/by-name/li/libfaketime/package.nix +++ b/pkgs/by-name/li/libfaketime/package.nix @@ -49,7 +49,16 @@ stdenv.mkDerivation rec { PREFIX = placeholder "out"; LIBDIRNAME = "/lib"; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=cast-function-type -Wno-error=format-truncation"; + env.NIX_CFLAGS_COMPILE = toString ( + lib.optionals stdenv.cc.isClang [ + "-Wno-error=cast-function-type" + "-Wno-error=format-truncation" + ] + # https://github.com/wolfcw/libfaketime/blob/6714b98794a9e8a413bf90d2927abf5d888ada99/README#L101-L104 + ++ lib.optionals (stdenv.hostPlatform.isLoongArch64 || stdenv.hostPlatform.isRiscV64) [ + "-DFORCE_PTHREAD_NONVER" + ] + ); nativeCheckInputs = [ perl ];