arangodb: no warning when defaulting target arch

This commit is contained in:
John Soo 2022-10-30 10:16:05 -07:00
parent b594ac0d72
commit f5bab1e083
No known key found for this signature in database
GPG Key ID: D8A148F8CE4DDBC2

View File

@ -18,26 +18,19 @@
}: }:
let let
pname = "arangodb"; defaultTargetArchitecture =
if gcc10Stdenv.targetPlatform.isx86
default_arch =
if gcc10Stdenv.isx86_64
then "haswell" then "haswell"
else if gcc10Stdenv.isAarch64 else "core";
then "zen"
else "none";
target_arch = targetArch =
if isNull targetArchitecture if isNull targetArchitecture
then then defaultTargetArchitecture
lib.warn
"${pname} target architecture not specified, choosing ${default_arch}"
default_arch
else targetArchitecture; else targetArchitecture;
in in
gcc10Stdenv.mkDerivation rec { gcc10Stdenv.mkDerivation rec {
inherit pname; pname = "arangodb";
version = "3.10.0"; version = "3.10.0";
src = fetchFromGitHub { src = fetchFromGitHub {
@ -71,7 +64,7 @@ gcc10Stdenv.mkDerivation rec {
"-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
# avoid reading /proc/cpuinfo for feature detection # avoid reading /proc/cpuinfo for feature detection
"-DTARGET_ARCHITECTURE=${target_arch}" "-DTARGET_ARCHITECTURE=${targetArch}"
]; ];
meta = with lib; { meta = with lib; {