2018-08-14 06:00:54 +00:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, givaro, pkgconfig, blas
|
2018-03-07 17:45:46 +00:00
|
|
|
, gmpxx
|
|
|
|
}:
|
2016-10-12 07:29:48 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fflas-ffpack";
|
2019-09-04 16:13:00 +00:00
|
|
|
version = "2.4.3";
|
2018-08-14 06:00:54 +00:00
|
|
|
|
2016-10-12 07:29:48 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linbox-team";
|
|
|
|
repo = "${pname}";
|
2019-09-04 16:13:00 +00:00
|
|
|
rev = "${version}";
|
|
|
|
sha256 = "1ynbjd72qrwp0b4kpn0p5d7gddpvj8dlb5fwdxajr5pvkvi3if74";
|
2016-10-12 07:29:48 +00:00
|
|
|
};
|
2018-08-14 06:00:54 +00:00
|
|
|
|
2018-03-07 17:45:46 +00:00
|
|
|
checkInputs = [
|
|
|
|
gmpxx
|
|
|
|
];
|
2018-08-14 06:00:54 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-03-07 17:45:46 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
pkgconfig
|
|
|
|
] ++ stdenv.lib.optionals doCheck checkInputs;
|
2018-08-14 06:00:54 +00:00
|
|
|
|
|
|
|
buildInputs = [ givaro blas ];
|
|
|
|
|
2018-03-07 17:45:46 +00:00
|
|
|
configureFlags = [
|
2018-08-14 06:00:54 +00:00
|
|
|
"--with-blas-libs=-l${blas.linkName}"
|
|
|
|
"--with-lapack-libs=-l${blas.linkName}"
|
2019-04-21 17:06:50 +00:00
|
|
|
] ++ stdenv.lib.optionals stdenv.isx86_64 {
|
2018-03-07 17:45:46 +00:00
|
|
|
# disable SIMD instructions (which are enabled *when available* by default)
|
2019-08-13 21:52:01 +00: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 17:06:50 +00:00
|
|
|
}.${stdenv.hostPlatform.platform.gcc.arch or "default"};
|
2018-08-14 06:00:54 +00:00
|
|
|
|
2018-03-07 17:45:46 +00:00
|
|
|
doCheck = true;
|
2018-08-14 06:00:54 +00:00
|
|
|
|
2016-10-12 07:29:48 +00:00
|
|
|
meta = {
|
|
|
|
inherit version;
|
|
|
|
description = ''Finite Field Linear Algebra Subroutines'';
|
|
|
|
license = stdenv.lib.licenses.lgpl21Plus;
|
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
2018-08-14 06:00:54 +00:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = https://linbox-team.github.io/fflas-ffpack/;
|
2016-10-12 07:29:48 +00:00
|
|
|
};
|
|
|
|
}
|