2019-04-21 18:06:50 +01:00
|
|
|
{ stdenv, fetchFromGitHub, automake, autoconf, libtool, autoreconfHook, gmpxx }:
|
2016-10-10 15:31:38 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "givaro";
|
2019-06-17 01:12:02 +01:00
|
|
|
version = "4.1.1";
|
2016-10-10 15:31:38 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linbox-team";
|
2019-09-09 00:38:31 +01:00
|
|
|
repo = pname;
|
2016-10-10 15:31:38 +01:00
|
|
|
rev = "v${version}";
|
2019-06-17 01:12:02 +01:00
|
|
|
sha256 = "11wz57q6ijsvfs5r82masxgr319as92syi78lnl9lgdblpc6xigk";
|
2016-10-10 15:31:38 +01:00
|
|
|
};
|
2018-08-14 01:13:40 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2020-03-31 15:47:18 +01:00
|
|
|
buildInputs = [autoconf automake libtool];
|
|
|
|
propagatedBuildInputs = [ gmpxx ];
|
2018-08-14 01:13:40 +01:00
|
|
|
|
2018-03-07 23:05:52 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--disable-optimization"
|
2019-04-21 18:06:50 +01:00
|
|
|
] ++ stdenv.lib.optionals stdenv.isx86_64 {
|
2018-03-07 23:05:52 +00:00
|
|
|
# disable SIMD instructions (which are enabled *when available* by default)
|
2019-08-13 22:52:01 +01:00
|
|
|
default = [ "--disable-sse3" "--disable-ssse3" "--disable-sse41" "--disable-sse42" "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
|
|
|
|
westmere = [ "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
|
|
|
|
sandybridge = [ "--disable-avx2" "--disable-fma" "--disable-fma4" ];
|
|
|
|
ivybridge = [ "--disable-avx2" "--disable-fma" "--disable-fma4" ];
|
|
|
|
haswell = [ "--disable-fma4" ];
|
|
|
|
broadwell = [ "--disable-fma4" ];
|
|
|
|
skylake = [ "--disable-fma4" ];
|
|
|
|
skylake-avx512 = [ "--disable-fma4" ];
|
2019-04-21 18:06:50 +01:00
|
|
|
}.${stdenv.hostPlatform.platform.gcc.arch or "default"};
|
2018-08-14 01:13:40 +01:00
|
|
|
|
|
|
|
# On darwin, tests are linked to dylib in the nix store, so we need to make
|
|
|
|
# sure tests run after installPhase.
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckTarget = "check";
|
|
|
|
doCheck = false;
|
|
|
|
|
2016-10-10 15:31:38 +01:00
|
|
|
meta = {
|
|
|
|
inherit version;
|
|
|
|
description = ''A C++ library for arithmetic and algebraic computations'';
|
|
|
|
license = stdenv.lib.licenses.cecill-b;
|
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
2018-08-14 01:13:40 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2016-10-10 15:31:38 +01:00
|
|
|
};
|
|
|
|
}
|