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 ];