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";
|
2021-12-28 22:48:53 +00:00
|
|
|
version = "4.2.0";
|
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}";
|
2021-12-28 22:48:53 +00:00
|
|
|
sha256 = "sha256-KR0WJc0CSvaBnPRott4hQJhWNBb/Wi6MIhcTExtVobQ=";
|
2016-10-10 14:31:38 +00:00
|
|
|
};
|
2018-08-14 00:13:40 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2022-03-31 01:11:06 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook autoconf automake ];
|
|
|
|
buildInputs = [libtool];
|
2020-03-31 14:47:18 +00:00
|
|
|
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 = {
|
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
|
|
|
};
|
|
|
|
}
|