nixpkgs/pkgs/development/libraries/fflas-ffpack/default.nix

55 lines
3.0 KiB
Nix
Raw Normal View History

2018-08-14 07:00:54 +01:00
{ stdenv, fetchFromGitHub, autoreconfHook, givaro, pkgconfig, blas
, gmpxx
}:
2016-10-12 08:29:48 +01:00
stdenv.mkDerivation rec {
pname = "fflas-ffpack";
2019-09-04 17:13:00 +01:00
version = "2.4.3";
2018-08-14 07:00:54 +01:00
2016-10-12 08:29:48 +01:00
src = fetchFromGitHub {
owner = "linbox-team";
2019-09-09 00:38:31 +01:00
repo = pname;
rev = version;
2019-09-04 17:13:00 +01:00
sha256 = "1ynbjd72qrwp0b4kpn0p5d7gddpvj8dlb5fwdxajr5pvkvi3if74";
2016-10-12 08:29:48 +01:00
};
2018-08-14 07:00:54 +01:00
checkInputs = [
gmpxx
];
2018-08-14 07:00:54 +01:00
enableParallelBuilding = true;
nativeBuildInputs = [
autoreconfHook
pkgconfig
] ++ stdenv.lib.optionals doCheck checkInputs;
2018-08-14 07:00:54 +01:00
buildInputs = [ givaro blas ];
configureFlags = [
2018-08-14 07:00:54 +01:00
"--with-blas-libs=-l${blas.linkName}"
"--with-lapack-libs=-l${blas.linkName}"
] ++ stdenv.lib.optionals stdenv.isx86_64 {
# disable SIMD instructions (which are enabled *when available* by default)
# for now we need to be careful to disable *all* relevant versions of an instruction set explicitly (https://github.com/linbox-team/fflas-ffpack/issues/284)
default = [ "--disable-sse3" "--disable-ssse3" "--disable-sse41" "--disable-sse42" "--disable-avx" "--disable-avx2" "--disable-avx512f" "--disable-avx512dq" "--disable-avx512vl" "--disable-fma" "--disable-fma4" ];
westmere = [ "--disable-avx" "--disable-avx2" "--disable-avx512f" "--disable-avx512dq" "--disable-avx512vl" "--disable-fma" "--disable-fma4" ];
sandybridge = [ "--disable-avx2" "--disable-avx512f" "--disable-avx512dq" "--disable-avx512vl" "--disable-fma" "--disable-fma4" ];
ivybridge = [ "--disable-avx2" "--disable-avx512f" "--disable-avx512dq" "--disable-avx512vl" "--disable-fma" "--disable-fma4" ];
haswell = [ "--disable-fma4" ];
broadwell = [ "--disable-fma4" ];
skylake = [ "--disable-fma4" ];
skylake-avx512 = [ "--disable-fma4" ];
}.${stdenv.hostPlatform.platform.gcc.arch or "default"};
2018-08-14 07:00:54 +01:00
doCheck = true;
2018-08-14 07:00:54 +01:00
meta = with stdenv.lib; {
2016-10-12 08:29:48 +01:00
inherit version;
description = ''Finite Field Linear Algebra Subroutines'';
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ raskin timokau ];
platforms = platforms.unix;
homepage = https://linbox-team.github.io/fflas-ffpack/;
2016-10-12 08:29:48 +01:00
};
}