2021-01-21 09:00:13 -08:00
|
|
|
{ lib, stdenv, fetchFromGitHub, automake, autoconf, libtool, autoreconfHook, gmpxx }:
|
2016-10-10 07:31:38 -07:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "givaro";
|
2019-06-16 17:12:02 -07:00
|
|
|
version = "4.1.1";
|
2016-10-10 07:31:38 -07:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linbox-team";
|
2019-09-08 16:38:31 -07:00
|
|
|
repo = pname;
|
2016-10-10 07:31:38 -07:00
|
|
|
rev = "v${version}";
|
2019-06-16 17:12:02 -07:00
|
|
|
sha256 = "11wz57q6ijsvfs5r82masxgr319as92syi78lnl9lgdblpc6xigk";
|
2016-10-10 07:31:38 -07:00
|
|
|
};
|
2018-08-13 17:13:40 -07:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-09-05 14:26:13 -07:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2020-03-31 07:47:18 -07:00
|
|
|
buildInputs = [autoconf automake libtool];
|
|
|
|
propagatedBuildInputs = [ gmpxx ];
|
2018-08-13 17:13:40 -07:00
|
|
|
|
2018-03-07 15:05:52 -08:00
|
|
|
configureFlags = [
|
|
|
|
"--disable-optimization"
|
2021-01-21 09:00:13 -08:00
|
|
|
] ++ lib.optionals stdenv.isx86_64 [
|
2018-03-07 15:05:52 -08:00
|
|
|
# disable SIMD instructions (which are enabled *when available* by default)
|
2020-08-04 19:32:41 -07:00
|
|
|
"--${if stdenv.hostPlatform.sse3Support then "enable" else "disable"}-sse3"
|
|
|
|
"--${if stdenv.hostPlatform.ssse3Support then "enable" else "disable"}-ssse3"
|
|
|
|
"--${if stdenv.hostPlatform.sse4_1Support then "enable" else "disable"}-sse41"
|
|
|
|
"--${if stdenv.hostPlatform.sse4_2Support then "enable" else "disable"}-sse42"
|
|
|
|
"--${if stdenv.hostPlatform.avxSupport then "enable" else "disable"}-avx"
|
|
|
|
"--${if stdenv.hostPlatform.avx2Support then "enable" else "disable"}-avx2"
|
|
|
|
"--${if stdenv.hostPlatform.fmaSupport then "enable" else "disable"}-fma"
|
|
|
|
"--${if stdenv.hostPlatform.fma4Support then "enable" else "disable"}-fma4"
|
|
|
|
];
|
2018-08-13 17:13:40 -07: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 07:31:38 -07:00
|
|
|
meta = {
|
|
|
|
inherit version;
|
2021-01-15 20:20:42 -08:00
|
|
|
description = "A C++ library for arithmetic and algebraic computations";
|
2021-01-21 09:00:13 -08:00
|
|
|
license = lib.licenses.cecill-b;
|
|
|
|
maintainers = [lib.maintainers.raskin];
|
|
|
|
platforms = lib.platforms.unix;
|
2016-10-10 07:31:38 -07:00
|
|
|
};
|
|
|
|
}
|