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